Commit 90129b97 authored by ransome1's avatar ransome1
Browse files

Merge branch 'develop'

parent 3ac1bad9
...@@ -76,6 +76,7 @@ A prioritized backlog of new features and known issues can be found <a href="htt ...@@ -76,6 +76,7 @@ A prioritized backlog of new features and known issues can be found <a href="htt
- start dates - start dates
- <a href="https://github.com/ransome1/sleek/wiki/Recurring-todos">recurrences</a> - <a href="https://github.com/ransome1/sleek/wiki/Recurring-todos">recurrences</a>
* Todo-List can be grouped and sorted by priorities, due dates, contexts or projects * Todo-List can be grouped and sorted by priorities, due dates, contexts or projects
* The sorting order can be defined on all 4 levels
* Todos can be filtered by contexts, projects and priorities * Todos can be filtered by contexts, projects and priorities
* Todos can be looked up by full-text search * Todos can be looked up by full-text search
* Autocomplete function suggests available contexts and projects * Autocomplete function suggests available contexts and projects
...@@ -101,6 +102,7 @@ A prioritized backlog of new features and known issues can be found <a href="htt ...@@ -101,6 +102,7 @@ A prioritized backlog of new features and known issues can be found <a href="htt
- French - French
- Simplified Chinese - Simplified Chinese
- Brazilian Portugese - Brazilian Portugese
- Japanese
* sleek can be minimized to tray * sleek can be minimized to tray
* Existing todos can be used as templates for new ones * Existing todos can be used as templates for new ones
......
{ {
"name": "sleek", "name": "sleek",
"productName": "sleek", "productName": "sleek",
"version": "1.0.6", "version": "1.0.7",
"description": "Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source", "description": "Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source",
"synopsis": "Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source", "synopsis": "Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source",
"category": "ProjectManagement", "category": "ProjectManagement",
...@@ -92,17 +92,18 @@ ...@@ -92,17 +92,18 @@
"artifactName": "${productName}-${version}-${arch}.${ext}" "artifactName": "${productName}-${version}-${arch}.${ext}"
}, },
"scripts": { "scripts": {
"build:windows": "electron-builder -w --publish never", "build:windows": "yarn build:css && yarn build:pegjs && electron-builder -w --publish never",
"build:macos": "electron-builder -m --publish never", "build:macos": "yarn build:css && yarn build:pegjs && electron-builder -m --publish never",
"build:linux": "electron-builder -l --publish never", "build:linux": "yarn build:css && yarn build:pegjs && electron-builder -l --publish never",
"build:appx": "electron-builder -w appx --publish never", "build:appx": "electron-builder -w appx --publish never",
"build:pacman": "electron-builder -l pacman --publish never", "build:pacman": "electron-builder -l pacman --publish never",
"build:appimage": "yarn build:css && electron-builder -l AppImage --publish never", "build:appimage": "yarn build:css && yarn build:pegjs && electron-builder -l AppImage --publish never",
"pack": "electron-builder --dir", "pack": "electron-builder --dir",
"lint": "eslint --ext .js, src --ext .mjs, src", "lint": "eslint --ext .js, src --ext .mjs, src",
"test": "mocha --timeout 10000", "test": "mocha --timeout 10000",
"test1": "mocha ./test/onboarding.js --timeout 10000", "test1": "mocha ./test/onboarding.js --timeout 10000",
"build:css": "sass src/scss/style.scss:src/css/style.css", "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",
"sass": "sass -w src/scss/style.scss:src/css/style.css", "sass": "sass -w src/scss/style.scss:src/css/style.css",
"start": "yarn sass & electron ." "start": "yarn sass & electron ."
}, },
...@@ -121,7 +122,7 @@ ...@@ -121,7 +122,7 @@
}, },
"devDependencies": { "devDependencies": {
"electron": "12.0.10", "electron": "12.0.10",
"electron-builder": "22.10.5", "electron-builder": "^22.11.7",
"eslint": "^7.25.0", "eslint": "^7.25.0",
"mocha": "^9.0.0", "mocha": "^9.0.0",
"sass": "^1.34.1", "sass": "^1.34.1",
......
/* Made with love by @fitri
This is a component of my ReactJS project
https://codepen.io/fitri/full/oWovYj/ */
"use strict";
import { reorderSortingLevel } from "../render.js";
function enableDragSort(listClass) {
const sortableLists = document.getElementsByClassName(listClass);
Array.prototype.map.call(sortableLists, (list) => {enableDragList(list)});
}
function enableDragList(list) {
Array.prototype.map.call(list.children, (item) => {enableDragItem(item)});
}
function enableDragItem(item) {
item.setAttribute("draggable", true)
item.ondrag = handleDrag;
item.ondragend = handleDrop;
}
function handleDrag(item) {
const selectedItem = item.target,
list = selectedItem.parentNode,
x = event.clientX,
y = event.clientY;
selectedItem.classList.add("drag-sort-active");
let swapItem = document.elementFromPoint(x, y) === null ? selectedItem : document.elementFromPoint(x, y);
if (list === swapItem.parentNode) {
swapItem = swapItem !== selectedItem.nextSibling ? swapItem : swapItem.nextSibling;
list.insertBefore(selectedItem, swapItem);
}
}
function handleDrop(item) {
item.target.classList.remove("drag-sort-active");
reorderSortingLevel();
}
//(()=> {enableDragSort("drag-sort-enable")})();
export { enableDragSort };
...@@ -7,7 +7,7 @@ const i18nextOptions = { ...@@ -7,7 +7,7 @@ const i18nextOptions = {
fallbackLng: "en", fallbackLng: "en",
namespace: "translation", namespace: "translation",
defaultNS: "translation", defaultNS: "translation",
supportedLngs: ["de", "en", "it", "es", "fr", "zh", "pt"], supportedLngs: ["de", "en", "it", "es", "fr", "zh", "pt", "jp"],
debug: false, debug: false,
preload: fs.readdirSync(path.join(__dirname, "../locales")).filter((fileName) => { preload: fs.readdirSync(path.join(__dirname, "../locales")).filter((fileName) => {
const joinedPath = path.join(path.join(__dirname, "../locales"), fileName) const joinedPath = path.join(path.join(__dirname, "../locales"), fileName)
......
...@@ -19,16 +19,16 @@ body.dark strong { ...@@ -19,16 +19,16 @@ body.dark strong {
color: #CCCDCF; color: #CCCDCF;
} }
body.dark input, body.dark input,
body.dark select, body.dark select {
body.dark textarea {
border: none !important; border: none !important;
background: #2d2d2d !important; background: transparent !important;
color: white !important; color: white !important;
} }
body.dark input[type=search]::-webkit-search-cancel-button { body.dark input[type=text],
background-color: white; body.dark textarea {
-webkit-mask-image: url("../img/svg/times-circle.svg"); background: #2d2d2d !important;
mask-image: url("../img/svg/times-circle.svg"); border: none;
color: white;
} }
body.dark input:active, body.dark input:active,
body.dark input:focus, body.dark input:focus,
...@@ -200,6 +200,7 @@ body.dark #modalForm i { ...@@ -200,6 +200,7 @@ body.dark #modalForm i {
body.dark #modalForm button { body.dark #modalForm button {
color: white; color: white;
border-color: #3B3B3B !important; border-color: #3B3B3B !important;
border-right: 1px solid #212224 !important;
background: transparent !important; background: transparent !important;
} }
body.dark #modalForm button:hover { body.dark #modalForm button:hover {
...@@ -247,6 +248,10 @@ body.dark #drawerContainer .drawer h4.is-4 { ...@@ -247,6 +248,10 @@ body.dark #drawerContainer .drawer h4.is-4 {
body.dark #drawerContainer .drawer h4.is-4 i { body.dark #drawerContainer .drawer h4.is-4 i {
color: #CCCDCF !important; color: #CCCDCF !important;
} }
body.dark #drawerContainer .drawer::-webkit-scrollbar-thumb:window-inactive,
body.dark #drawerContainer .drawer::-webkit-scrollbar-thumb {
background: #4a4a4a;
}
body.dark #drawerContainer #drawerClose { body.dark #drawerContainer #drawerClose {
background: #3B3B3B !important; background: #3B3B3B !important;
} }
...@@ -256,6 +261,10 @@ body.dark #drawerContainer svg { ...@@ -256,6 +261,10 @@ body.dark #drawerContainer svg {
body.dark #drawerContainer #btnFiltersResetFilters { body.dark #drawerContainer #btnFiltersResetFilters {
background: #212224 !important; background: #212224 !important;
} }
body.dark #todoTableWrapper::-webkit-scrollbar-thumb:window-inactive,
body.dark #todoTableWrapper::-webkit-scrollbar-thumb {
background: #3B3B3B;
}
body.dark #filterContext .card { body.dark #filterContext .card {
background: #3B3B3B; background: #3B3B3B;
} }
...@@ -322,11 +331,6 @@ body.dark .modal .modal-content .card { ...@@ -322,11 +331,6 @@ body.dark .modal .modal-content .card {
body.dark .modal .modal-content .card .card-header-title { body.dark .modal .modal-content .card .card-header-title {
color: white; color: white;
} }
body.dark .modal .modal-content .card .card-content {
/*button {
background: $darker-grey!important;
}*/
}
body.dark .modal .modal-content .card .card-footer, body.dark .modal .modal-content .card .card-footer,
body.dark .modal .modal-content .card .card-footer-item { body.dark .modal .modal-content .card .card-footer-item {
border-color: #2d2d2d; border-color: #2d2d2d;
...@@ -382,6 +386,16 @@ body.dark .modal.content .tabs li.is-active a { ...@@ -382,6 +386,16 @@ body.dark .modal.content .tabs li.is-active a {
color: white; color: white;
border-color: #CCCDCF; border-color: #CCCDCF;
} }
body.dark #sortByContainer li {
background: #2d2d2d;
color: white;
}
body.dark #sortByContainer li i {
color: #ebebeb;
}
body.dark #sortByContainer li.drag-sort-active {
border-left: 0.2em solid white;
}
body.dark .message.fixed { body.dark .message.fixed {
background: transparent !important; background: transparent !important;
} }
...@@ -469,6 +483,10 @@ body { ...@@ -469,6 +483,10 @@ body {
-ms-user-select: none; -ms-user-select: none;
} }
body::-webkit-scrollbar {
display: none;
}
button, button:focus, button:active, button:active, button:after, button::before, button:active:after, .button, .button-is-white { button, button:focus, button:active, button:active, button:after, button::before, button:active:after, .button, .button-is-white {
border: none !important; border: none !important;
box-shadow: none !important; box-shadow: none !important;
...@@ -504,9 +522,6 @@ button, button:focus, button:active, button:active, button:after, button::before ...@@ -504,9 +522,6 @@ button, button:focus, button:active, button:active, button:after, button::before
.is-greyed-out { .is-greyed-out {
filter: opacity(75%) grayscale(100%); filter: opacity(75%) grayscale(100%);
} }
.is-greyed-out .tag {
display: none;
}
table { table {
width: 100%; width: 100%;
...@@ -538,10 +553,6 @@ table.files tr td:last-child i { ...@@ -538,10 +553,6 @@ table.files tr td:last-child i {
color: #3273dc; color: #3273dc;
} }
body::-webkit-scrollbar {
display: none;
}
:focus, :focus,
:focus-visible { :focus-visible {
outline: none; outline: none;
...@@ -549,48 +560,34 @@ body::-webkit-scrollbar { ...@@ -549,48 +560,34 @@ body::-webkit-scrollbar {
} }
button:focus-visible, button:focus-visible,
a:focus-visible { a:focus-visible,
outline: 2px solid #3273dc !important; li:focus-visible,
select:focus,
input:focus,
textarea:focus,
input[type=text]:focus {
box-shadow: 0 0 0 2px #3273dc inset !important;
outline: none !important;
border: none !important;
} }
input[type=search]::-webkit-search-cancel-button { input,
-webkit-appearance: none; select {
height: 1.15em; border: none !important;
width: 1.15em; color: #3273dc !important;
border-radius: 30em;
background-color: #4a4a4a;
-webkit-mask-image: url("../img/svg/times-circle.svg");
mask-image: url("../img/svg/times-circle.svg");
opacity: 0;
pointer-events: none;
cursor: pointer;
} }
input[type=search]:focus::-webkit-search-cancel-button { input[type=text] {
opacity: 0.8; border: 1px solid #ccc !important;
pointer-events: all; color: #2d2d2d !important;
} }
input:focus, input[type=text]::placeholder {
select:focus, color: #ccc !important;
input.is-focused,
input[type=search]:focus,
textarea:focus,
textarea.is-focused,
textarea[type=search]:focus {
border: none;
box-shadow: 0 0 0 2px #3273dc !important;
outline: none;
} }
input, input::placeholder {
input::placeholder, color: #3273dc !important;
select {
width: auto;
font-size: 1em;
color: #3273dc;
box-shadow: none;
background: transparent;
} }
input[type=number] { input[type=number] {
...@@ -602,11 +599,6 @@ input[type=number]::-webkit-outer-spin-button { ...@@ -602,11 +599,6 @@ input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
} }
input[type=checkbox]:focus {
outline: none;
box-shadow: none !important;
}
input[type=range] { input[type=range] {
-webkit-appearance: none; -webkit-appearance: none;
height: 0.25em; height: 0.25em;
...@@ -682,6 +674,9 @@ nav ul:nth-child(2) { ...@@ -682,6 +674,9 @@ nav ul:nth-child(2) {
.contentContainer { .contentContainer {
height: 80%; height: 80%;
} }
.contentContainer p {
padding: 0 10%;
}
#recurrencePicker { #recurrencePicker {
position: relative; position: relative;
...@@ -813,10 +808,13 @@ nav ul:nth-child(2) { ...@@ -813,10 +808,13 @@ nav ul:nth-child(2) {
top: -0.75em; top: -0.75em;
z-index: 35; z-index: 35;
} }
#drawerContainer .drawer .button.is-greyed-out .tag {
display: none;
}
#drawerContainer .drawer h4.is-4 { #drawerContainer .drawer h4.is-4 {
font-size: 1.25em; font-size: 1.25em;
font-family: FreeSansBold; font-family: FreeSansBold;
margin-bottom: 1.5em; margin-bottom: 0.75em;
} }
#drawerContainer .drawer h4.is-4.clickable { #drawerContainer .drawer h4.is-4.clickable {
cursor: pointer; cursor: pointer;
...@@ -829,21 +827,44 @@ nav ul:nth-child(2) { ...@@ -829,21 +827,44 @@ nav ul:nth-child(2) {
padding: 0; padding: 0;
margin: 0 0 1.5em 0; margin: 0 0 1.5em 0;
} }
#drawerContainer .drawer table {
margin-bottom: 2em;
}
#drawerContainer .drawer table tr td:nth-child(odd) { #drawerContainer .drawer table tr td:nth-child(odd) {
width: auto; width: auto;
vertical-align: middle; vertical-align: middle;
} }
#drawerContainer .drawer table tr td:nth-child(even) { #drawerContainer .drawer table tr td:nth-child(even) {
width: 35%; width: auto;
text-align: center; text-align: center;
padding-right: 0 !important; padding-right: 0 !important;
} }
#drawerContainer .drawer.is-active { #drawerContainer .drawer.is-active {
display: block !important; display: block !important;
} }
#drawerContainer .drawer::-webkit-scrollbar {
background-color: transparent;
width: 0.8em;
}
#drawerContainer .drawer::-webkit-scrollbar-thumb:window-inactive,
#drawerContainer .drawer::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 5px;
}
#drawerContainer #viewDrawer .button {
margin: 0;
}
#drawerContainer #viewDrawer table tr th h3 {
margin-top: 1em;
}
#todoTableWrapper::-webkit-scrollbar {
background-color: transparent;
width: 0.8em;
}
#todoTableWrapper::-webkit-scrollbar-thumb:window-inactive,
#todoTableWrapper::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 5px;
}
#drawerContainer:hover #drawerClose { #drawerContainer:hover #drawerClose {
display: inline-block; display: inline-block;
...@@ -887,23 +908,25 @@ nav ul:nth-child(2) { ...@@ -887,23 +908,25 @@ nav ul:nth-child(2) {
display: block; display: block;
} }
#todoTable { #resultStats {
width: 100%;
min-width: 30em;
float: left;
display: none;
padding: 0 2.5em 1.5em 2.5em;
}
#todoTable #resultStats {
width: 100%; width: 100%;
display: none; display: none;
text-align: center; text-align: center;
padding: 0; padding: 0;
white-space: nowrap; white-space: nowrap;
} }
#todoTable #resultStats.is-active {
#resultStats.is-active {
display: block; display: block;
} }
#todoTable {
width: 100%;
min-width: 30em;
float: left;
display: none;
padding: 0 2.5em 1.5em 2.5em;
}
#todoTable #todoTableContainer { #todoTable #todoTableContainer {
width: 100%; width: 100%;
float: left; float: left;
...@@ -928,7 +951,7 @@ nav ul:nth-child(2) { ...@@ -928,7 +951,7 @@ nav ul:nth-child(2) {
} }
#todoTable .group { #todoTable .group {
min-height: 1em; min-height: 1em;
margin-top: 0.5em; margin: 0.5em 0;
border: none; border: none;
font-family: FreeSansBold; font-family: FreeSansBold;
} }
...@@ -945,147 +968,150 @@ nav ul:nth-child(2) { ...@@ -945,147 +968,150 @@ nav ul:nth-child(2) {
} }
#todoTable .todo { #todoTable .todo {
display: flex; display: flex;
cursor: pointer;
} }
#todoTable .cell { #todoTable .todo .cell {
line-height: 1.7em; line-height: 1.7em;
padding: 0.75em 0; padding: 0.75em 0;
margin-right: 1em; margin-right: 1em;
height: auto; height: auto;
cursor: pointer;
} }
#todoTable .cell .is-white { #todoTable .todo .cell .is-white {
background: none; background: none;
} }
#todoTable .cell span.tag { #todoTable .todo .cell span.tag {
margin: 0 0.25em 0 0; margin: 0 0.25em 0 0;
} }
#todoTable .cell span.tag.projects { #todoTable .todo .cell span.tag.projects {
background: #f1d6f1; background: #f1d6f1;
} }
#todoTable .cell span.tag.contexts { #todoTable .todo .cell span.tag.contexts {
background: #c5ede3; background: #c5ede3;
} }
#todoTable .cell.checkbox a { #todoTable .todo .cell.checkbox a {
flex: 0 0 1em; flex: 0 0 1em;
font-size: 1.25em; font-size: 1.25em;
} }
#todoTable .cell.text { #todoTable .todo .cell.text {
width: auto; width: auto;
flex: 1; flex: 1;
color: #4a4a4a; color: #4a4a4a;
margin-right: 0; margin-right: 0;
} }
#todoTable .cell.text .categories { #todoTable .todo .cell.text .categories {
margin-right: 0.5em; margin-right: 0.5em;
} }
#todoTable .cell.text .button { #todoTable .todo .cell.text .button {
font-size: 1.1em; font-size: 1.1em;
font-family: FreeSansBold; font-family: FreeSansBold;
height: auto; height: auto;
padding: 0 0.4em; padding: 0 0.4em;
}