Skip to content

Commit

Permalink
Added missing icon for AUR build, added missing build script for AUR …
Browse files Browse the repository at this point in the history
…build process, added config migration, added anonymous user id,
  • Loading branch information
ransome1 committed Oct 31, 2023
1 parent b2f6fc6 commit 81c70d3
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 26 deletions.
Binary file added assets/icons/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion flatpak/com.github.ransome1.sleek.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<developer_name>Robin Ahle</developer_name>
<content_rating type="oars-1.1"/>
<releases>
<release version="2.0.0" date="2023-10-30"/>
<release version="2.0.1" date="2023-10-31"/>
</releases>
<url type="homepage">https://github.com/ransome1/sleek</url>
<url type="contact">https://github.com/ransome1/sleek/issues</url>
Expand Down
2 changes: 1 addition & 1 deletion flatpak/com.github.ransome1.sleek.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=2.0.0
Version=2.0.1
Name=sleek
Exec=sleek
Type=Application
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"main": "./src/main/main.ts",
"scripts": {
"build": "concurrently \"yarn run peggy\" \"yarn run build:main\" \"yarn run build:renderer\"",
"build:dll": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts",
"build:main": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.prod.ts",
"build:renderer": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.prod.ts",
"postinstall": "ts-node .erb/scripts/check-native-dep.js && electron-builder install-app-deps && cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts",
"postinstall": "ts-node .erb/scripts/check-native-dep.js && electron-builder install-app-deps && npm run build:dll",
"lint": "cross-env NODE_ENV=development eslint . --ext .js,.jsx,.ts,.tsx",
"package": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build --publish never",
"dir": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder --dir",
"mac": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build -m --arm64 --publish never",
"mas": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build -m mas --universal --publish never",
"masDev": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build -m 'mas-dev' --arm64 --publish never",
"appimage": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build -l appimage --universal --publish never",
"package": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build --publish never && yarn run build:dll",
"dir": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder --dir --publish never && yarn run build:dll",
"mac": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build -m --arm64 --publish never && yarn run build:dll",
"mas": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build -m mas --universal --publish never && yarn run build:dll",
"masDev": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build -m 'mas-dev' --arm64 --publish never && yarn run build:dll",
"appimage": "ts-node ./.erb/scripts/clean.js dist && yarn run build && electron-builder build -l appimage --universal --publish never && yarn run build:dll",
"peggy": "peggy --format es --output ./src/main/modules/FilterLang/FilterLang.js ./src/main/modules/FilterLang/FilterLang.pegjs",
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir release/app",
"start": "ts-node ./.erb/scripts/check-port-in-use.js && yarn run start:renderer",
Expand Down
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sleek",
"version": "2.0.0",
"version": "2.0.1",
"description": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"synopsis": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sleek
base: core20
version: "2.0.0"
version: "2.0.1"
summary: todo.txt manager for Linux, free and open-source (FOSS)
description: |
sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. Stripped down to only the most necessary features, and with a clean and simple interface, sleek aims to help you focus on getting things done.
Expand Down
16 changes: 15 additions & 1 deletion src/main/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import createTray from './modules/Tray';
import { File, ConfigData } from './util';
import processDataRequest from './modules/ProcessDataRequest';
import handleTheme from './modules/Theme';
import crypto from 'crypto';

const anonymousUserId = crypto.randomUUID() || null;

const userDataDirectory = path.join(app.getPath('userData'), 'userData');
if (!fs.existsSync(userDataDirectory)) fs.mkdirSync(userDataDirectory)
Expand Down Expand Up @@ -62,7 +65,18 @@ const defaultConfigData = {
};

const configPath = path.join(userDataDirectory, 'config.json');
const configStorage = new Store<ConfigData>({ cwd: userDataDirectory, name: 'config' });
const configStorage = new Store<ConfigData>({
cwd: userDataDirectory,
name: 'config',
beforeEachMigration: (store, context) => {
console.log(`[config.json] migrating from ${context.fromVersion}${context.toVersion}`);
},
migrations: {
'2.0.1': store => {
store.set('anonymousUserId', anonymousUserId);
},
}
});
const filtersPath = path.join(userDataDirectory, 'filters.json');
const filterStorage = new Store<{}>({ cwd: userDataDirectory, name: 'filters' });

Expand Down
9 changes: 7 additions & 2 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,15 @@ const App = () => {
}, [zoom]);

useEffect(() => {
if (matomo) {
const anonymousUserId = store.get('anonymousUserId');
if(anonymousUserId && matomo) {
var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
if(anonymousUserId) _mtm.push({'anonymousUserId': anonymousUserId });
var
d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.async = true;
g.src = 'https://www.datenkrake.eu/matomo/js/container_WVsEueTV.js';
s.parentNode.insertBefore(g, s);
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2134,9 +2134,9 @@
"@types/json-schema" "*"

"@types/estree@*", "@types/estree@^1.0.0":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.3.tgz#2be19e759a3dd18c79f9f436bd7363556c1a73dd"
integrity sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==
version "1.0.4"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.4.tgz#d9748f5742171b26218516cf1828b8eafaf8a9fa"
integrity sha512-2JwWnHK9H+wUZNorf2Zr6ves96WHoWDJIftkcxPKsS7Djta6Zu519LarhRNljPXkpsZR2ZMwNCPeW7omW07BJw==

"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33":
version "4.17.39"
Expand Down Expand Up @@ -2222,9 +2222,9 @@
"@types/istanbul-lib-report" "*"

"@types/jest@*", "@types/jest@^29.5.2":
version "29.5.6"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.6.tgz#f4cf7ef1b5b0bfc1aa744e41b24d9cc52533130b"
integrity sha512-/t9NnzkOpXb4Nfvg17ieHE6EeSjDS2SGSpNYfoLbUAeL/EOueU/RSdOWFpfQTXBEM7BguYW1XQ0EbM+6RlIh6w==
version "29.5.7"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.7.tgz#2c0dafe2715dd958a455bc10e2ec3e1ec47b5036"
integrity sha512-HLyetab6KVPSiF+7pFcUyMeLsx25LDNDemw9mGsJBkai/oouwrjTycocSDYopMEwFhN2Y4s9oPyOCZNofgSt2g==
dependencies:
expect "^29.0.0"
pretty-format "^29.0.0"
Expand Down Expand Up @@ -3589,9 +3589,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001524, caniuse-lite@^1.0.30001541:
version "1.0.30001558"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001558.tgz#d2c6e21fdbfe83817f70feab902421a19b7983ee"
integrity sha512-/Et7DwLqpjS47JPEcz6VnxU9PwcIdVi0ciLXRWBQdj1XFye68pSQYpV0QtPTfUKWuOaEig+/Vez2l74eDc1tPQ==
version "1.0.30001559"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001559.tgz#95a982440d3d314c471db68d02664fb7536c5a30"
integrity sha512-cPiMKZgqgkg5LY3/ntGeLFUpi6tzddBNS58A4tnTgQw1zON7u2sZMU7SzOeVH4tj20++9ggL+V6FDOFMTaFFYA==

chalk@^2.4.2:
version "2.4.2"
Expand Down Expand Up @@ -4699,9 +4699,9 @@ electron-store@^8.1.0:
type-fest "^2.17.0"

electron-to-chromium@^1.4.535:
version "1.4.570"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.570.tgz#5fb79061ead248a411bc8532da34d1dbf6ae23c1"
integrity sha512-5GxH0PLSIfXKOUMMHMCT4M0olwj1WwAxsQHzVW5Vh3kbsvGw8b4k7LHQmTLC2aRhsgFzrF57XJomca4XLc/WHA==
version "1.4.571"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.571.tgz#8aa71539eb82db98740c3ec861256cc34e0356fd"
integrity sha512-Sc+VtKwKCDj3f/kLBjdyjMpNzoZsU6WuL/wFb6EH8USmHEcebxRXcRrVpOpayxd52tuey4RUDpUsw5OS5LhJqg==

electron@^25.8.1:
version "25.9.3"
Expand Down

0 comments on commit 81c70d3

Please sign in to comment.