Commit 42e09b82 authored by ransome1's avatar ransome1
Browse files

Finished MacOS submission, worked on CSS, improved ipc communication (added...

Finished MacOS submission, worked on CSS, improved ipc communication (added handle/invoke), added missing translations, worked on README.md
parent 69f4d81f
# sleek
## sleek is a free and open-source (FOSS) todo manager that makes use of the todo.txt format. Available for Linux, Windows and MacOS
## sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. It's available for Windows, MacOS and Linux
+ [Screenshots](#screenshots)
+ [Support sleek](#support-sleek)
+ [Get it from Microsoft Store](#get-sleek-from-microsoft-store)
......@@ -13,13 +13,11 @@
+ [Features](#features)
+ [Used libraries](#used-libraries)
sleek is a free and open-source (FOSS) todo manager that makes use of the todo.txt format. sleeks GUI is modern and simple but still offers a decent set of functions which help users getting things done. sleek is available as a client for Windows, MacOS and Linux.
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.
Users can add contexts, projects, priorities, due dates, recurrences or threshold dates to their todos. These todo.txt attributes can then be used in full-text search, as filters or to group and sort the todo list.
All classic todo.txt attributes are supported and enhanced by additional features. Creating todos is straightforward, and tag-based filtering in tandem with highly customisable grouping and smart full-text search allow for rapid information retrieval. Completed todos can be hidden or archived into separate done.txt files. Easy integration with other todo.txt apps is facilitated by continuously scanning todo.txt files for changes.
sleek manages and watches multiple todo.txt files continuously for changes, which makes it easy to integrate sleek with other todo.txt apps. Also users can switch to dark mode and choose from multiple languages.
Todos with due date or repeating todos will trigger notifications and completed todos can be hidden or archived into separate done.txt files. If users have tons of todos, a compact view can come in handy.
sleek is available for Windows, MacOS and Linux, and in several languages. For a detailed list of features, see below.
### Screenshots
![Alt text](assets/screenshots/mac/main.png?raw=true "Screenshot of sleek's todo list view")
......@@ -73,35 +71,32 @@ You can download sleek for Windows, MacOS and Linux from
4. Build sleek `yarn build:windows` or `yarn build:linux` or `yarn build:macos`
### Features
* sleek can use existing todo.txt files or create new ones
* Todos can be enriched and searched for by
* Uses existing todo.txt files or creates new ones
* Add and search for todos by
- priorities
- contexts
- projects
- due dates
- creation dates
- <a href="https://github.com/ransome1/sleek/wiki/Recurring-todos-(rec:)">recurrences</a>
- <a href="https://github.com/ransome1/sleek/wiki/Deferred-todos-(t:)">threshold dates</a>
* Todo list can be sorted by priorities, due dates, creation dates, contexts and projects or simply by file order
* Todos can be filtered by contexts, projects and priorities
* Todos can be looked up by a full-text search that is compatible with the todo.txt syntax
* Autocomplete function suggests available contexts and projects
* Dates and priorities can be selected by built-in picker elements
* <a href="https://github.com/ransome1/sleek/wiki/Keyboard-shortcuts">Keyboard shortcuts following todotxt.net</a>
- recurrences (repeating todos)
- threshold dates
* Sort and group todos by priority, due and creation date, context and project or as they occur in the text file
* Filter todos by context, project and priority
* Find todos using full-text search compatible with todo.txt syntax
* Inline autocomplete available
* Dates and priorities can be selected by built-in picker elements
* Navigable via keyboard shortcuts
* Tabindex available
* <a href="https://github.com/ransome1/sleek/wiki/Hidden-todos-(h:)">A todo can be hidden but its attributes will be available in the filter drawer and autocomplete function</a>
* Due dates trigger alarms and appear as badges in sleeks icon
* Dark and light mode can be toggled
* A compact view is available
* Completed todos can be bulk archived to a separate done.txt file
* Completed todos can be shown or hidden
* Options for due date reminders and notification badges
* Easily toggle between dark and light mode
* Compact view and zoom available
* Completed todos can be shown, hidden and archived
* Multi line todos can be created
* Filters can be renamed or deleted by right clicking on them
* Filters are sorted alphanummerically
* Hyperlinks are detected automatically and can be clicked using the icon
* A file watcher rereads the todo.txt file if it has been changed
* Multiple todo.txt files can be managed and switched between using a tab bar or keyboard shortcuts
* Multiple languages are either detected or can be set by hand to
* Filters are sorted alphanummerically and can be renamed or deleted
* Hyperlinks detected automatically
* File watcher scans todo.txt files for changes
* Simultaneously manage multiple todo.txt files
* Language options
- English
- German
- Italian
......@@ -114,9 +109,8 @@ You can download sleek for Windows, MacOS and Linux from
- Hungarian
- Czech
- Polish
* sleek can be minimized to tray
* Existing todos can be used as templates for new ones
* Todo list can be copied to clipboard
A more detailed documentation can be found in <a href="https://github.com/ransome1/sleek/wiki/">sleeks wiki</a>.
### Used libraries
- Electron: https://github.com/electron/electron
......
#!/bin/bash
printf "......................\nresignAndPackage start\n\n"
# Name of your app.
APP="sleek"
# Your Certificate name.
CERT="Robin Ahle (8QSR3UZXP8)"
# The path of your app to sign.
APP_PATH="/Users/ransome/Development/sleek/dist/mas-universal/$APP.app"
# The path to the location you want to put the signed package.
RESULT_PATH="/Users/ransome/Development/sleek/dist/mas-universal/$APP-mac_store.pkg"
# The name of certificates you requested.
APP_KEY="Apple Distribution: $CERT"
INSTALLER_KEY="3rd Party Mac Developer Installer: $CERT"
# The path of your plist files.
PARENT_PLIST="build/entitlements.mas.plist"
CHILD_PLIST="build/entitlements.mas.inherit.plist"
LOGINHELPER_PLIST="build/entitlements.mas.loginhelper.plist"
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Electron Framework"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/MainMenu.nib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/ar.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/bg.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/bn.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/ca.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/chrome_100_percent.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/chrome_200_percent.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/cs.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/da.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/de.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/el.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/en.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/en_GB.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/es.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/es_419.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/et.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/fa.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/fi.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/fil.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/fr.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/gu.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/he.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/hi.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/hr.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/hu.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/icudtl.dat"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/id.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/it.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/ja.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/kn.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/ko.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/lt.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/lv.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/ml.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/mr.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/ms.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/nb.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/nl.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/pl.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/pt_BR.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/pt_PT.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/resources.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/ro.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/ru.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/sk.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/sl.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/sr.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/sv.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/sw.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/ta.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/te.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/th.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/tr.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/uk.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/v8_context_snapshot.arm64.bin"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/v8_context_snapshot.x86_64.bin"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/vi.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/zh_CN.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/zh_TW.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources/zh_TW.lproj/locale.pak"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/Resources/app.asar"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/Resources/icon.icns"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/embedded.provisionprofile"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/Contents/MacOS/$APP Helper"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (GPU).app/Contents/MacOS/$APP Helper (GPU)"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Renderer).app/Contents/MacOS/$APP Helper (Renderer)"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Plugin).app/Contents/MacOS/$APP Helper (Plugin)"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/"
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/Contents/MacOS/$APP Login Helper"
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/MacOS/$APP"
codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"
printf "\nresignAndPackage end\n......................\n"
\ No newline at end of file
{
"name": "sleek",
"productName": "sleek",
"version": "1.1.8-rc.2",
"version": "1.1.7",
"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)",
"category": "ProjectManagement",
......@@ -12,14 +12,14 @@
"tasks"
],
"author": "Robin Ahle <mail@robbfolio.de>",
"copyright": "Copyright © 2021 ${author}",
"copyright": "Copyright © 2022 ${author}",
"license": "MIT",
"repository": "https://github.com/ransome1/sleek/",
"icon": "assets/icons/sleek.png",
"main": "src/main.js",
"buildResources": "src",
"build": {
"buildVersion": "12",
"buildVersion": "14",
"files": [
"!flatpak-node${/*}",
"!snap${/*}",
......@@ -77,6 +77,9 @@
}
},
"mas": {
"asarUnpack": [
"node_modules/fsevents"
],
"hardenedRuntime": false,
"provisioningProfile": "build/distribution.provisionprofile",
"entitlements": "build/entitlements.mas.plist",
......@@ -117,7 +120,6 @@
},
"scripts": {
"build:mas": "yarn build:css && yarn build:pegjs && electron-builder -m mas --universal --publish never && bash build/resignPkg.sh",
"build:dmg": "yarn build:css && yarn build:pegjs && electron-builder -m dmg --universal --publish never",
"build:appx": "yarn build:css && yarn build:pegjs && electron-builder -w appx --publish never",
"build:css": "sass src/scss/style.scss:src/css/style.css",
"build:pegjs": "peggy --format es --output src/js/filterlang.mjs src/js/filterlang.pegjs",
......
......@@ -1664,7 +1664,7 @@ a.priority.C:focus-visible span.tag {
}
.modal.content code {
background: transparent;
padding: 0;
padding: 0.25em 0.5em;
}
.modal.content .delete,
.modal.content .modal-close {
......
......@@ -461,7 +461,7 @@ async function show(todo, templated) {
// this is a new templated todo task
if(templated) {
// erase the original creation date and description
todo.date = new Date();
if(userData.appendStartDate) todo.date = new Date();
todo.text = "____________";
modalFormInput.value = todo.toString();
......
"use strict";
import { translations } from "../render.js";
import { handleError } from "./helper.mjs";
import { buildTable, translations } from "../render.js";
import { setupInterface, handleError } from "./helper.mjs";
import { showDrawer } from "./drawer.mjs";
import { resetFilters } from "./filters.mjs";
import { triggerToggle } from "./toggles.mjs";
//const helper = await import("./helper.mjs");
//const render = await import("../render.js");
// receives todo.txt data from main process as string and passes it to build function
window.api.receive("buildTable", async (args) => {
buildTable(...args).then(function(response) {
console.info(response);
}).catch(function(error) {
handleError(error);
});
});
window.api.receive("triggerFunction", async (name, args) => {
try {
const helper = await import("./helper.mjs");
if(!args) args = new Array;
switch(name) {
......@@ -30,6 +40,14 @@ window.api.receive("triggerFunction", async (name, args) => {
handleError(error);
});
break;
case "showGenericMessage":
const messages = await import("../js/messages.mjs");
messages.showGenericMessage(...args).then(function(response) {
console.info(response);
}).catch(function(error) {
handleError(error);
});
break;
case "archiveTodos":
const prompt = await import("../js/prompt.mjs");
const todos = await import("../js/todos.mjs");
......@@ -61,7 +79,7 @@ window.api.receive("triggerFunction", async (name, args) => {
});
break;
case "setupInterface":
helper.setupInterface().then(function(response) {
setupInterface().then(function(response) {
console.info(response);
}).catch(function(error) {
handleError(error);
......@@ -86,15 +104,4 @@ window.api.receive("triggerFunction", async (name, args) => {
error.functionName = "triggerFunction";
return Promise.reject(error);
}
});
// receives todo.txt data from main process as string and passes it to build function
window.api.receive("buildTable", async (args) => {
const helper = await import("./helper.mjs");
const render = await import("../render.js");
render.buildTable(...args).then(function(response) {
console.info(response);
}).catch(function(error) {
handleError(error);
});
});
\ No newline at end of file
......@@ -9,7 +9,7 @@ import { show, setPriority, resetForm } from "./form.mjs";
import { showDrawer } from "./drawer.mjs";
import { showModal } from "./content.mjs";
import { triggerToggle } from "./toggles.mjs";
import { userData, translations, startFileWatcher } from "../render.js";
import { appData, userData, translations, startFileWatcher } from "../render.js";
const
autoCompleteContainer = document.getElementById("autoCompleteContainer"),
......@@ -570,6 +570,10 @@ export async function registerShortcuts() {
if(event.key==="a" && !isInputFocused()) {
// abort when onboarding is shown
if(isOnboardingOpen()) return false;
// TODO: add archiving on MAS build
if(appData.channel === "Mac App Store") return false;
// handle user confirmation and pass callback function
getConfirmation(archiveTodos, translations.archivingPrompt);
return false;
......
......@@ -23,9 +23,7 @@ todoTableSearch.oninput = debounce(function() {
todoTableSearch.onfocus = function() {
// add blue highlighting to search bar
todoTableSearchContainer.classList.add("is-focused");
todoTableSearchAddTodo.classList.add("is-active")
todoTableSearchAddTodo.classList.add("is-active");
}
todoTableSearch.onblur = function(event) {
......
......@@ -3,7 +3,7 @@ import "../../node_modules/sugar/dist/sugar.min.js";
import "../../node_modules/jstodotxt/jsTodoExtensions.js";
import { _paq } from "./matomo.mjs";
import { userData, translations, buildTable } from "../render.js";
import { userData, appData, translations, buildTable } from "../render.js";
import { categories, selectFilter } from "./filters.mjs";
import { convertDate, isToday, isTomorrow, isPast } from "./date.mjs";
import { createModalJail } from "./jail.mjs";
......@@ -336,7 +336,7 @@ function generateTableRow(todo) {
}
todoTableBodyRow.appendChild(todoTableBodyCellCheckbox);
todoTableBodyRow.appendChild(todoTableBodyCellArchive);
if(appData.channel !== "Mac App Store") todoTableBodyRow.appendChild(todoTableBodyCellArchive);
// add a listener on the checkbox to call the completeItem function
todoTableBodyCellCheckbox.onclick = function() {
......
......@@ -75,6 +75,7 @@
"helpTabRecurrencesTitle1": "Přidávání opakování",
"hiddenTodos": "Skryté",
"inProgress": "Probíhající",
"invertSorting": "Invertní řazení",
"language": "Jazyk",
"messageLoggingBody": "Tento projekt můžete podpořit tak, že povolíte anonymní zapisování chyb a událostí. Bude zapisovat nastalé chyby a také funkce, které využíváte. Tuto funkci můžete zapnout v nastavení.",
"messageShareBody": "Tento projekt si váží poctivých recenzí na <br><i class=\"fas fa-star\"></i>&nbsp;<a href=\"https://sourceforge.net/projects/sleek/reviews\" target=\"_blank\">SourceForge</a>, hlášení o chybách na <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"_blank\">Github</a> a doporučení na",
......@@ -130,6 +131,7 @@
"shortcuts": "Zástupce",
"sleekOnGithub": "sleek na Githubu",
"sortBy": "Seřadit podle",
"sortByFile": "Seřadit jako v souboru",
"sortCompletedLast": "Dokončené na konec",
"submitIssuesOnGithub": "Odeslat chyby na Github",
"switchToSpecificFile": "Přepněte na konkrétní soubor",
......
......@@ -75,6 +75,7 @@
"helpTabRecurrencesTitle1": "Añadiendo recurrencias",
"hiddenTodos": "Tareas ocultas",
"inProgress": "En proceso",
"invertSorting": "Invertir clasificación",
"language": "Idioma",
"messageLoggingBody": "Puede apoyar este proyecto habilitando un registro anónimo de errores y eventos. Registrará los errores que se produzcan y las funciones que utilice. Puede habilitar esta función en la configuración.",
"messageShareBody": "Este proyecto agradece las críticas honestas sobre <i class=\"fas fa-star\"></i>&nbsp;<a href=\"https://sourceforge.net/projects/sleek/reviews\" target=\"_blank\">SourceForge</a>, informes de errores sobre <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"_blank\">Github</a> y recomendaciones sobre",
......@@ -130,6 +131,7 @@
"shortcuts": "Atajos de teclado",
"sleekOnGithub": "sleek en Github",
"sortBy": "Ordenar por",
"sortByFile": "Ordenar como en el archivo",
"sortCompletedLast": "Tareas completadas al final",
"submitIssuesOnGithub": "Enviar problemas en Github",
"switchToSpecificFile": "Cambiar a un archivo específico",
......
......@@ -75,6 +75,7 @@
"helpTabRecurrencesTitle1": "Définir la répétition",
"hiddenTodos": "Tâches cachées",
"inProgress": "En cours",
"invertSorting": "Inverser le tri",
"language": "Langue",
"messageLoggingBody": "Vous pouvez soutenir ce projet en permettant l'enregistrement anonyme des erreurs et des événements. Il enregistrera les erreurs qui se produisent et les fonctionnalités que vous utilisez. Vous pouvez activer cette fonction dans les paramètres.",
"messageShareBody": "Ce projet apprécie les critiques honnêtes sur <br><i class=\"fas fa-star\"></i>&nbsp;<a href=\"https://sourceforge.net/projects/sleek/reviews\" target=\"_blank\">SourceForge</a>, rapports de bugs sur <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"_blank\">Github</a> et recommandations sur",
......@@ -130,6 +131,7 @@
"shortcuts": "Raccourcis clavier",
"sleekOnGithub": "sleek sur GitHub",
"sortBy": "Trier par",
"sortByFile": "Trier comme dans le fichier",
"sortCompletedLast": "Tâches terminées à la fin",
"submitIssuesOnGithub": "Soumettre des problèmes sur Github",
"switchToSpecificFile": "Basculer vers un fichier spécifique",
......
......@@ -75,6 +75,7 @@
"helpTabRecurrencesTitle1": "Ismétlődések hozzáadása",
"hiddenTodos": "Rejtett",
"inProgress": "Folyamatban",
"invertSorting": "Fordított rendezés",
"language": "Nyelv",
"messageLoggingBody": "Az anonimizált hiba- és eseménynaplózás engedélyezésével támogathatja ezt a projektet. Ez naplózza az előforduló hibákat és az Ön által használt funkciókat. Ezt a funkciót a beállításokban engedélyezheti.",
"messageShareBody": "Ez a projekt nagyra értékeli a <br><i class=\"fas fa-star\"></i>&nbsp;<a href=\"https://sourceforge.net/projects/sleek/reviews\" target=\"_blank\">SourceForge</a> oldalon leadott őszinte véleményeket, a <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"_blank\">Github</a> hibakövetőjébe beküldött hibajelentéseket, valamint az ajánlásokat itt:",
......@@ -130,6 +131,7 @@
"shortcuts": "Gyorsbillentyűk",
"sleekOnGithub": "A sleek a GitHubon",
"sortBy": "Rendezési szempont",
"sortByFile": "Rendezés a fájl szerint",
"sortCompletedLast": "Befejezve a végén",
"submitIssuesOnGithub": "Hibák beküldése a GitHubon",
"switchToSpecificFile": "Váltás egy adott fájlra",
......
......@@ -75,6 +75,7 @@
"helpTabRecurrencesTitle1": "Aggiunta di ricorrenze",
"hiddenTodos": "Todo nascosti",
"inProgress": "In progresso",
"invertSorting": "Inverti l'ordinamento",
"language": "Lingua",
"messageLoggingBody": "Puoi supportare questo progetto abilitando un sistema anonimo di registrazione deglie eventi e degli errori. Questo registrerà gli errori che avvengono e le caratteristiche che usi. Puoi abilitare questa caratteristiche nelle impostazioni.",
"messageShareBody": "Questo progetto apprezza recensioni oneste su <br><i class=\"fas fa-star\"></i>&nbsp;<a href=\"https://sourceforge.net/projects/sleek/reviews\" target=\"_blank\">SourceForge</a>, segnalazioni di bug su <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"_blank\">Github</a> e consigli su",
......@@ -130,6 +131,7 @@
"shortcuts": "Scorciatoie",
"sleekOnGithub": "sleek su Github",
"sortBy": "Ordina per",
"sortByFile": "Ordina come in file",
"sortCompletedLast": "Tutto completato alla fine",
"submitIssuesOnGithub": "Segnala problemi su Github",
"switchToSpecificFile": "Passa a un file specifico",
......
......@@ -75,6 +75,7 @@
"helpTabRecurrencesTitle1": "繰り返しを追加",
"hiddenTodos": "隠れたタスク",
"inProgress": "実行中",
"invertSorting": "並べ替えを反転",
"language": "言語",
"messageLoggingBody": "匿名エラー・イベントログを有効することで本プロジェクトに貢献することができる. エラーや利用した機能を記録すること. 設定で有効することが可能. ",
"messageShareBody": "This project appreciates honest reviews on <br><i class=\"fas fa-star\"></i>&nbsp;<a href=\"https://sourceforge.net/projects/sleek/reviews\" target=\"_blank\">SourceForge</a>, bug reports on <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"_blank\">Github</a> and recommendations on",
......@@ -130,6 +131,7 @@
"shortcuts": "ショートカット",
"sleekOnGithub": "Githubで",
"sortBy": "...で並べ替える",
"sortByFile": "ファイルのように並べ替え",
"sortCompletedLast": "完了タスクをリスト最後に表示",
"submitIssuesOnGithub": "GithubでIssueを作成",
"switchToSpecificFile": "特定のファイルに切り替える",
......
......@@ -75,6 +75,7 @@
"helpTabRecurrencesTitle1": "Adicionando recorrências",
"hiddenTodos": "Todos ocultos",
"inProgress": "Em andamento",
"invertSorting": "Inverter classificação",
"language": "Idioma",
"messageLoggingBody": "Você pode apoiar este projeto habilitando um erro anônimo e o registro de eventos. Ele registrará os erros que ocorrem e os recursos que você usa. Você pode habilitar esse recurso nas configurações. ",
"messageShareBody": "Este projeto agradece as análises honestas no <br> <i class =\"fas fa-star\"></i>&nbsp;<a href =\"https: //sourceforge.net/projects/sleek/reviews\" target=\"blank\">SourceForge</a>, relatórios de bug em <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"blank\">Github</a> e recomendações sobre ",
......@@ -130,6 +131,7 @@
"shortcuts": "Atalhos",
"sleekOnGithub": "sleek no Github",
"sortBy": "Ordenar por",
"sortByFile": "Ordenar como no arquivo",
"sortCompletedLast": "Todos completos no final",
"submitIssuesOnGithub": "Envie problemas no Github",
"switchToSpecificFile": "Mudar para um arquivo específico",
......
......@@ -74,7 +74,7 @@
"helpTabRecurrencesBody1": "Eğer bir yapılacağın tekrar etmesini istiyorsanız <strong>rec:</strong> kullanarak bir sıklık belirtmeniz gerekir (örneğin: <strong>rec:d</strong> her gün tekrar eder). sleek arayüzü tekrarlama özeelliği eklemek için gerekli kontrolleri sağlar, ya da dilerseniz kendiniz yapılacağı düzenleyebilirsiniz. Kullanabileceğiniz değerler: <strong>d</strong> (günlük), <strong>b</strong> (her iş günü), <strong>w</strong> (haftalık), <strong>m</strong> (aylık), <strong>y</strong> (yıllık). Eğer isterseniz özel bir sıklık da belirleyebilirsiniz, örneğin: 3 ayda bir tekrarlaması için <strong>rec:3m</strong> kullanabilirsiniz. <a href=\"https://github.com/ransome1/sleek/wiki/Recurring-todos-(rec:)\" target=\"_blank\">sleek'te tekrarlayan olaylarla ilgili ayrıntılı bilgi için tıklayınız</a>.",
"helpTabRecurrencesTitle1": "Tekrarlı Olay Ekleme",
"hiddenTodos": "Gizli",
"inProgress": "Devam Ediyor",
"inProgress": "Sıralamayı ters çevir",
"language": "Dil",
"messageLoggingBody": "Bu projeyi anonim hata ve etkinlik günlüklerini aktifleştirerek destekleyebilirsiniz. Bu özellik kullandığınız özellikleri ve oluşan hataları kaydedecek. Bu özelliği ayarlardan etkinleştirebilirsiniz.",
"messageShareBody": "Bu proje dürüst incelemelerinize önem veriyor <br><i class=\"fas fa-star\"></i>&nbsp;<a href=\"https://sourceforge.net/projects/sleek/reviews\" target=\"_blank\">SourceForge</a>, hata bildirimleri ve öneriler için <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"_blank\">Github</a>",
......@@ -130,6 +130,7 @@
"shortcuts": "Kısayollar",
"sleekOnGithub": "sleek Github",
"sortBy": "Sırala",
"sortByFile": "Dosyadaki gibi sırala",
"sortCompletedLast": "Tamamlananlar en sonda",
"submitIssuesOnGithub": "Github üzerinden sorun bildir",
"switchToSpecificFile": "Belirli bir dosyaya geç",
......
......@@ -75,6 +75,7 @@
"helpTabRecurrencesTitle1": "Adding recurrences",
"hiddenTodos": "隐藏任务",
"inProgress": "进行中",
"invertSorting": "反转排序",
"language": "语言",
"messageLoggingBody": "如果打开匿名的错误/事件报告会有助于未来的开发. 报告里将包括发生的错误和使用的功能. 你可以在设定里打开. ",
"messageShareBody": "这个项目欢迎各位的意见<br><i class=\"fas fa-star\"></i>&nbsp;<a href=\"https://sourceforge.net/projects/sleek/reviews\" target=\"_blank\">SourceForge</a>, <i class=\"fab fa-github\"></i>&nbsp;<a href=\"https://github.com/ransome1/sleek/issues\" target=\"_blank\">Github 报告错误</a> 以及推荐",
......@@ -130,6 +131,7 @@
"shortcuts": "快捷键",
"sleekOnGithub": "sleek on Github",
"sortBy": "排序",
"sortByFile": "按文件排序",
"sortCompletedLast": "已完成任务显示在最后",
"submitIssuesOnGithub": "在Github上提交问题",
"switchToSpecificFile": "切换到特定文件",
......
......@@ -37,7 +37,7 @@ let
// https://github.com/sindresorhus/electron-reloader
// ########################################################################################################################
try {
require("electron-reloader")(module);
if(appData.environment === "development") require("electron-reloader")(module)
} catch {}
// ########################################################################################################################
......@@ -55,7 +55,7 @@ function getChannel() {
} else if(process.windowsStore) {
return "Windows Store";
} else if(process.mas) {
return "Apple App Store";
return "Mac App Store";
} else if(process.env.SNAP) {
return "Snap Store";
} else if(process.env.FLATPAK_ID) {
......@@ -76,13 +76,10 @@ function getContent(file) {
const activeFile = getActiveFile();
if(process.mas) stopAccessingSecurityScopedResource = app.startAccessingSecurityScopedResource(activeFile[3])
if(!fs.existsSync(file)) {
// TODO: understand what's happening here
return Promise.resolve(fs.writeFile(file, "", function(error) {
if(error) {
return Promise.reject("Error: Could not create file");
}
if(error) return Promise.reject("Error: Could not create file")
return "";
}));
}
......@@ -262,12 +259,6 @@ async function startFileWatcher(file, bookmark) {
// persist the new file
userData.set("files", userData.data.files);
// an active filewatcher will be destroyed first
if(fileWatcher) {
fileWatcher.close().then(() => console.log("Info: Filewatcher instance closed"));
await fileWatcher.unwatch();
}
// only for MAS (Sandboxed)
// https://gist.github.com/ngehlert/74d5a26990811eed59c635e49134d669
const activeFile = getActiveFile();
......@@ -279,12 +270,18 @@ async function startFileWatcher(file, bookmark) {
return Promise.reject("Info: File not found on disk, starting onboarding");
}
// an active filewatcher will be destroyed first
if(fileWatcher) {
await fileWatcher.close().then(() => console.log("Info: Filewatcher instance closed"));
await fileWatcher.unwatch();
fileWatcher = null;
}
// create a new filewatcher
fileWatcher = chokidar.watch(file);