From 340fd37b4fde2dc829a41aebb76d63f9e4b0de74 Mon Sep 17 00:00:00 2001 From: ransome1 Date: Sun, 24 Mar 2024 08:55:56 +0100 Subject: [PATCH 1/5] Added setting to change 1st day of the week. Fixed https://github.com/ransome1/sleek/issues/671. --- README.md | 6 +- flatpak/com.github.ransome1.sleek.appdata.xml | 2 +- package.json | 4 +- release/app/package.json | 2 +- snap/snapcraft.yaml | 2 +- src/locales/cs.json | 3 + src/locales/de.json | 3 + src/locales/en-gb.json | 89 ------------------- src/locales/en.json | 3 + src/locales/es.json | 4 + src/locales/fr.json | 3 + src/locales/hi.json | 3 + src/locales/hu.json | 3 + src/locales/it.json | 3 + src/locales/jp.json | 3 + src/locales/ko.json | 3 + src/locales/pl.json | 3 + src/locales/pt.json | 3 + src/locales/ru.json | 3 + src/locales/tr.json | 3 + src/locales/zh.json | 3 + src/main/config.tsx | 4 + .../ProcessDataRequest/ProcessTodoObjects.tsx | 19 ++-- src/renderer/Drawer/Attributes.tsx | 2 +- src/renderer/Grid/DatePickerInline.tsx | 8 +- src/renderer/Header/Search/Input.scss | 3 + src/renderer/Settings/LanguageSelector.tsx | 6 +- src/renderer/Settings/Settings.tsx | 5 ++ src/renderer/Shared.tsx | 9 +- yarn.lock | 6 +- 30 files changed, 92 insertions(+), 121 deletions(-) delete mode 100644 src/locales/en-gb.json diff --git a/README.md b/README.md index d4cf44aa..6e4f86f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # sleek +![image](https://github.com/ransome1/sleek/assets/11188741/304d2da2-e8bd-4901-9d12-04a0f5426317) ### sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. It's available 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. 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 allows 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. @@ -10,8 +12,8 @@ sleek is available for Windows, macOS and Linux, and in several languages. [Scre ### ❤️ Sponsor sleek Pushing sleek to the Apple and Microsoft app stores creates annual costs. You can help covering these by [sponsoring the project](https://github.com/sponsors/ransome1). -### 👩🏾‍💻 Become a contributer -We're actively inviting passionate contributors skilled in `React`, `TypeScript`, `Electron`, and `Jest/Playwright` to join our collaborative effort. The `develop` branch reflects the most recent progress. Here you'll find our roadmap: https://github.com/users/ransome1/projects/3. For those interested, [we've updated our contribution guidelines](https://github.com/ransome1/sleek/wiki/Contributing-Guidelines). +### 👩🏾‍💻 This project needs your support +sleek's backlog is becoming increasingly populated, yet our capacity remains limited. If you are skilled in `React`, `TypeScript`, `Electron`, or `Jest/Playwright` you can support this project. Here you'll find our backlog: https://github.com/users/ransome1/projects/3. For those interested, [we've updated our contribution guidelines](https://github.com/ransome1/sleek/wiki/Contributing-Guidelines). The `develop` branch reflects the most recent progress. ### Get sleek from Apple Mac App Store Get sleek from Apple Mac App Store diff --git a/flatpak/com.github.ransome1.sleek.appdata.xml b/flatpak/com.github.ransome1.sleek.appdata.xml index b2d10616..6c7c9faf 100755 --- a/flatpak/com.github.ransome1.sleek.appdata.xml +++ b/flatpak/com.github.ransome1.sleek.appdata.xml @@ -9,7 +9,7 @@ Robin Ahle - + https://github.com/ransome1/sleek https://github.com/ransome1/sleek/issues diff --git a/package.json b/package.json index 0c640081..913a5361 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sleek", - "version": "2.0.12", + "version": "2.0.13-rc.1", "main": "./src/main/main.tsx", "scripts": { "build": "concurrently \"yarn run peggy\" \"yarn run build:main\" \"yarn run build:renderer\"", @@ -147,7 +147,7 @@ "webpack-merge": "^5.9.0" }, "build": { - "buildVersion": "41", + "buildVersion": "42", "asar": true, "asarUnpack": "**\\*.{node,dll}", "files": [ diff --git a/release/app/package.json b/release/app/package.json index 6b09d45a..068a2e65 100644 --- a/release/app/package.json +++ b/release/app/package.json @@ -1,6 +1,6 @@ { "name": "sleek", - "version": "2.0.12", + "version": "2.0.13-rc.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": [ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 2a7b3335..1364ee44 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: sleek base: core20 -version: "2.0.12" +version: "2.0.13-rc.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. diff --git a/src/locales/cs.json b/src/locales/cs.json index 3b90f723..7139db87 100644 --- a/src/locales/cs.json +++ b/src/locales/cs.json @@ -27,6 +27,9 @@ "settings.zoom": "Přiblížení", "settings.disableAnimations": "Vypnout animace", "settings.useHumanFriendlyDates": "Používat lidsky přívětivá data", + "settings.weekStart": "První den týdne", + "settings.0": "Neděle", + "settings.1": "Pondělí", "drawer.tabs.attributes": "Atributy", "drawer.tabs.filters": "Filtry", "drawer.tabs.sorting": "Řazení", diff --git a/src/locales/de.json b/src/locales/de.json index 7a94f729..670b85d9 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -27,6 +27,9 @@ "settings.zoom": "Vergrößerung", "settings.disableAnimations": "Animationen deaktivieren", "settings.useHumanFriendlyDates": "Benutze benutzerfreundliche Datumsangaben", + "settings.weekStart": "Erster Tag der Woche", + "settings.0": "Sonntag", + "settings.1": "Montag", "drawer.tabs.attributes": "Attribute", "drawer.tabs.filters": "Filter", "drawer.tabs.sorting": "Sortierung", diff --git a/src/locales/en-gb.json b/src/locales/en-gb.json deleted file mode 100644 index 07c2cfc6..00000000 --- a/src/locales/en-gb.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "copy": "Copy", - "delete": "Delete", - "cancel": "Cancel", - "openFile": "Open file", - "createFile": "Create file", - "fileTabs.changeLocation": "Change file for archiving", - "fileTabs.revealTodoFile": "Show todo file in file manager", - "fileTabs.revealArchivingFile": "Show archiving file in file manager", - "fileTabs.removeFileHeadline": "Remove file from sleek?", - "fileTabs.removeFileText": "It will not be deleted from your hard drive.", - "fileTabs.removeFileLabel": "Remove", - "settings.headline": "Settings", - "settings.appendCreationDate": "Append creation date when todo is created", - "settings.convertRelativeToAbsoluteDates": "Convert relative dates to absolute dates", - "settings.notificationsAllowed": "Send notifications", - "settings.showFileTabs": "Show file tabs", - "settings.tray": "Minimize to tray instead of quitting application", - "settings.colorTheme": "Theme", - "settings.system": "Follow system", - "settings.light": "Light", - "settings.dark": "Dark", - "settings.language": "Language", - "settings.notificationThreshold": "Notification threshold", - "settings.bulkTodoCreation": "Multi-line text creates separate todos", - "settings.matomo": "Allow Matomo analytics", - "settings.zoom": "Zoom", - "settings.disableAnimations": "Disable animations", - "settings.useHumanFriendlyDates": "Use human friendly dates", - "drawer.tabs.attributes": "Attributes", - "drawer.tabs.filters": "Filters", - "drawer.tabs.sorting": "Sorting", - "drawer.filters.showCompleted": "Completed todos", - "drawer.filters.showHidden": "Hidden todos", - "drawer.filters.thresholdDateInTheFuture": "Threshold date in the future", - "drawer.filters.dueDateInTheFuture": "Due date in the future", - "drawer.attributes.noAttributesAvailable": "No attributes available yet", - "drawer.attributes.today": "today", - "drawer.attributes.tomorrow": "tomorrow", - "drawer.attributes.nextWeek": "next week", - "drawer.attributes.yesterday": "yesterday", - "drawer.attributes.lastWeek": "last week", - "drawer.attributes.thisWeek": "this week", - "drawer.attributes.thisMonth": "this month", - "drawer.attributes.nextMonth": "next month", - "drawer.attributes.overdue": "overdue", - "drawer.attributes.elapsed": "elapsed", - "drawer.sorting.fileSorting": "Order todos as they appear in the file", - "shared.attributeMapping.t": "Threshold date", - "shared.attributeMapping.due": "Due date", - "shared.attributeMapping.projects": "Projects", - "shared.attributeMapping.contexts": "Contexts", - "shared.attributeMapping.priority": "Priority", - "shared.attributeMapping.rec": "Recurrence", - "shared.attributeMapping.pm": "Pomodoros", - "shared.attributeMapping.created": "Creation date", - "shared.attributeMapping.completed": "Completion date", - "splashscreen.noFiles.text": "Drop your todo.txt file here or use the buttons", - "splashscreen.noTodosAvailable.text": "No todos in this file", - "splashscreen.noTodosAvailable.create": "Create a todo", - "splashscreen.noTodosVisible.text": "No results visible.", - "splashscreen.noTodosVisible.reset": "Reset filters and search", - "search.visibleTodos": "Visible todos: ", - "search.addAsTodo": "Add as todo", - "search.filters.create": "Create search filter", - "todoDialog.footer.add": "Add", - "todoDialog.footer.update": "Update", - "todoDialog.footer.cancel": "Cancel", - "todoDialog.snackbar.emptyInput": "Please enter something into the text field", - "todoDialog.priorityPicker.label": "Priority", - "todoDialog.datePicker.t": "Threshold", - "todoDialog.datePicker.due": "Due", - "todoDialog.recurrencePicker.label": "Recurrence", - "todoDialog.recurrencePicker.every": "Every", - "todoDialog.recurrencePicker.day": "day", - "todoDialog.recurrencePicker.businessDay": "business day", - "todoDialog.recurrencePicker.week": "week", - "todoDialog.recurrencePicker.month": "month", - "todoDialog.recurrencePicker.year": "year", - "todoDialog.recurrencePicker.strict": "strict", - "prompt.delete.headline": "Delete todo?", - "prompt.delete.text": "The todo will be permanently removed from the file", - "prompt.archive.headline": "Archive completed todos?", - "prompt.archive.text": "This will move all completed todos to your specified archiving file", - "prompt.archive.button": "Archive", - "prompt.archive.changeFile.headline": "Choose a File for Archiving", - "prompt.archive.changeFile.text": "To archive completed todos, you need to choose an archive file first", - "prompt.searchFilters.delete.body": "Delete search filter" -} diff --git a/src/locales/en.json b/src/locales/en.json index 07c2cfc6..2bee9676 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -27,6 +27,9 @@ "settings.zoom": "Zoom", "settings.disableAnimations": "Disable animations", "settings.useHumanFriendlyDates": "Use human friendly dates", + "settings.weekStart": "First day of the week", + "settings.0": "Sunday", + "settings.1": "Monday", "drawer.tabs.attributes": "Attributes", "drawer.tabs.filters": "Filters", "drawer.tabs.sorting": "Sorting", diff --git a/src/locales/es.json b/src/locales/es.json index 0a57b278..996044d0 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -26,6 +26,10 @@ "settings.matomo": "Permitir análisis de Matomo", "settings.zoom": "Zoom", "settings.disableAnimations": "Desactivar animaciones", + "settings.useHumanFriendlyDates": "Usar fechas amigables para el usuario", + "settings.weekStart": "Primer día de la semana", + "settings.0": "Domingo", + "settings.1": "Lunes", "drawer.tabs.attributes": "Atributos", "drawer.tabs.filters": "Filtros", "drawer.tabs.sorting": "Ordenación", diff --git a/src/locales/fr.json b/src/locales/fr.json index 92f34630..7793d33e 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -27,6 +27,9 @@ "settings.zoom": "Zoom", "settings.disableAnimations": "Désactiver les animations", "settings.useHumanFriendlyDates": "Utiliser des dates conviviales", + "settings.weekStart": "Premier jour de la semaine", + "settings.0": "Dimanche", + "settings.1": "Lundi", "drawer.tabs.attributes": "Attributs", "drawer.tabs.filters": "Filtres", "drawer.tabs.sorting": "Tri", diff --git a/src/locales/hi.json b/src/locales/hi.json index c0be87b9..db1407d9 100644 --- a/src/locales/hi.json +++ b/src/locales/hi.json @@ -27,6 +27,9 @@ "settings.zoom": "ज़ूम", "settings.disableAnimations": "एनिमेशन अक्षम करें", "settings.useHumanFriendlyDates": "मानव-मित्रता योग्य तिथियाँ उपयोग करें", + "settings.weekStart": "सप्ताह का पहला दिन", + "settings.0": "रविवार", + "settings.1": "सोमवार", "drawer.tabs.attributes": "गुण", "drawer.tabs.filters": "फ़िल्टर", "drawer.tabs.sorting": "क्रमबद्ध करना", diff --git a/src/locales/hu.json b/src/locales/hu.json index b911d129..01f08da2 100644 --- a/src/locales/hu.json +++ b/src/locales/hu.json @@ -27,6 +27,9 @@ "settings.zoom": "Nagyítás", "settings.disableAnimations": "Animációk kikapcsolása", "settings.useHumanFriendlyDates": "Használjon emberbarát dátumokat", + "settings.weekStart": "Hét első napja", + "settings.0": "Vasárnap", + "settings.1": "Hétfő", "drawer.tabs.attributes": "Tulajdonságok", "drawer.tabs.filters": "Szűrők", "drawer.tabs.sorting": "Rendezés", diff --git a/src/locales/it.json b/src/locales/it.json index 895ac62e..75cb78fd 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -27,6 +27,9 @@ "settings.zoom": "Zoom", "settings.disableAnimations": "Disattiva animazioni", "settings.useHumanFriendlyDates": "Usa date user-friendly", + "settings.weekStart": "Primo giorno della settimana", + "settings.0": "Domenica", + "settings.1": "Lunedì", "drawer.tabs.attributes": "Attributi", "drawer.tabs.filters": "Filtri", "drawer.tabs.sorting": "Ordinamento", diff --git a/src/locales/jp.json b/src/locales/jp.json index b737726c..164dca75 100644 --- a/src/locales/jp.json +++ b/src/locales/jp.json @@ -27,6 +27,9 @@ "settings.zoom": "ズーム", "settings.disableAnimations": "アニメーションを無効にする", "settings.useHumanFriendlyDates": "使いやすい日付を使用する", + "settings.weekStart": "週の初日", + "settings.0": "日曜日", + "settings.1": "月曜日", "drawer.tabs.attributes": "属性", "drawer.tabs.filters": "フィルター", "drawer.tabs.sorting": "ソート", diff --git a/src/locales/ko.json b/src/locales/ko.json index b6b860b9..45fa5249 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -27,6 +27,9 @@ "settings.zoom": "줌", "settings.disableAnimations": "애니메이션 비활성화", "settings.useHumanFriendlyDates": "사용자 친화적인 날짜 사용", + "settings.weekStart": "주의 첫날", + "settings.0": "일요일", + "settings.1": "월요일", "drawer.tabs.attributes": "속성", "drawer.tabs.filters": "필터", "drawer.tabs.sorting": "정렬", diff --git a/src/locales/pl.json b/src/locales/pl.json index ec4a34b7..13973472 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -27,6 +27,9 @@ "settings.zoom": "Powiększenie", "settings.disableAnimations": "Wyłącz animacje", "settings.useHumanFriendlyDates": "Używaj przyjaznych dla użytkownika dat", + "settings.weekStart": "Pierwszy dzień tygodnia", + "settings.0": "Niedziela", + "settings.1": "Poniedziałek", "drawer.tabs.attributes": "Atrybuty", "drawer.tabs.filters": "Filtry", "drawer.tabs.sorting": "Sortowanie", diff --git a/src/locales/pt.json b/src/locales/pt.json index 0532fca9..f2933dbc 100644 --- a/src/locales/pt.json +++ b/src/locales/pt.json @@ -27,6 +27,9 @@ "settings.zoom": "Zoom", "settings.disableAnimations": "Desativar animações", "settings.useHumanFriendlyDates": "Usar datas amigáveis", + "settings.weekStart": "Primeiro dia da semana", + "settings.0": "Domingo", + "settings.1": "Segunda-feira", "drawer.tabs.attributes": "Atributos", "drawer.tabs.filters": "Filtros", "drawer.tabs.sorting": "Ordenação", diff --git a/src/locales/ru.json b/src/locales/ru.json index a5f7997b..6b01c0b5 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -27,6 +27,9 @@ "settings.zoom": "Масштаб", "settings.disableAnimations": "Отключить анимации", "settings.useHumanFriendlyDates": "Использовать удобочитаемые даты", + "settings.weekStart": "Первый день недели", + "settings.0": "Воскресенье", + "settings.1": "Понедельник", "drawer.tabs.attributes": "Атрибуты", "drawer.tabs.filters": "Фильтры", "drawer.tabs.sorting": "Сортировка", diff --git a/src/locales/tr.json b/src/locales/tr.json index 5bf3afa3..5b0add70 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -27,6 +27,9 @@ "settings.zoom": "Yakınlaştırma", "settings.disableAnimations": "Animasyonları devre dışı bırak", "settings.useHumanFriendlyDates": "İnsan dostu tarihleri kullan", + "settings.weekStart": "Haftanın ilk günü", + "settings.0": "Pazar", + "settings.1": "Pazartesi", "drawer.tabs.attributes": "Özellikler", "drawer.tabs.filters": "Filtreler", "drawer.tabs.sorting": "Sıralama", diff --git a/src/locales/zh.json b/src/locales/zh.json index 8e418610..e0e9af34 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -27,6 +27,9 @@ "settings.zoom": "缩放", "settings.disableAnimations": "禁用动画", "settings.useHumanFriendlyDates": "使用人性化日期", + "settings.weekStart": "一周的第一天", + "settings.0": "星期日", + "settings.1": "星期一", "drawer.tabs.attributes": "属性", "drawer.tabs.filters": "过滤器", "drawer.tabs.sorting": "排序", diff --git a/src/main/config.tsx b/src/main/config.tsx index aca5ca42..27f793fd 100644 --- a/src/main/config.tsx +++ b/src/main/config.tsx @@ -104,6 +104,10 @@ const config: Store = new Store({ store.set('fileWatcherPolling', false); store.set('fileWatcherPollingInterval', 100); }, + '2.0.13': store => { + console.log('Migrating from 2.0.12 → 2.0.13'); + store.set('weekStart', 1); + }, } }); diff --git a/src/main/modules/ProcessDataRequest/ProcessTodoObjects.tsx b/src/main/modules/ProcessDataRequest/ProcessTodoObjects.tsx index 1606ae8e..53cf9800 100644 --- a/src/main/modules/ProcessDataRequest/ProcessTodoObjects.tsx +++ b/src/main/modules/ProcessDataRequest/ProcessTodoObjects.tsx @@ -56,9 +56,10 @@ function handleCompletedTodoObjects(todoObjects: TodoObject[]): TodoObject[] { const showCompleted: boolean = config.get('showCompleted'); return todoObjects.map((todoObject: TodoObject) => { if(todoObject.complete && !showCompleted) { - todoObject.visible = false; + return false; + } else { + return todoObject; } - return todoObject; }); } @@ -74,20 +75,14 @@ function handleTodoObjectsDates(todoObjects: TodoObject[]): TodoObject[] { const thresholdDateInTheFuture: boolean = config.get('thresholdDateInTheFuture'); const dueDateInTheFuture: boolean = config.get('dueDateInTheFuture'); - return todoObjects.map((todoObject: TodoObject) => { + return todoObjects.filter((todoObject: TodoObject) => { + if (!todoObject.visible) return true; - if(!todoObject.visible) return todoObject; - const thresholdDate = dayjs(todoObject?.t); const dueDate = dayjs(todoObject?.due); - if(thresholdDate && thresholdDate.isAfter(dayjs()) && !thresholdDateInTheFuture) { - todoObject.visible = false; - } else if(dueDate && dueDate.isAfter(dayjs()) && !dueDateInTheFuture) { - todoObject.visible = false; - } - - return todoObject; + return !(thresholdDate && thresholdDate.isAfter(dayjs()) && !thresholdDateInTheFuture) && + !(dueDate && dueDate.isAfter(dayjs()) && !dueDateInTheFuture); }); } diff --git a/src/renderer/Drawer/Attributes.tsx b/src/renderer/Drawer/Attributes.tsx index 0e008da0..bb11b18f 100644 --- a/src/renderer/Drawer/Attributes.tsx +++ b/src/renderer/Drawer/Attributes.tsx @@ -43,7 +43,7 @@ const DrawerAttributes: React.FC = memo(({ Object.keys(attributes).forEach((key) => { if (attributes[key]) { const count = attributes[key].count; - const formattedValues = settings.useHumanFriendlyDates && isDate ? friendlyDate(key, attributeKey, settings.language, t) : [key]; + const formattedValues = settings.useHumanFriendlyDates && isDate ? friendlyDate(key, attributeKey, settings, t) : [key]; formattedValues.forEach((formattedValue) => { if (!processedAttributes[formattedValue]) { diff --git a/src/renderer/Grid/DatePickerInline.tsx b/src/renderer/Grid/DatePickerInline.tsx index 25bc29be..947bf4f6 100644 --- a/src/renderer/Grid/DatePickerInline.tsx +++ b/src/renderer/Grid/DatePickerInline.tsx @@ -8,6 +8,8 @@ import { handleFilterSelect, friendlyDate } from '../Shared'; import { withTranslation } from 'react-i18next'; import { i18n } from '../Settings/LanguageSelector'; import dayjs from 'dayjs'; +import updateLocale from 'dayjs/plugin/updateLocale'; +dayjs.extend(updateLocale); const { ipcRenderer } = window.api; @@ -31,6 +33,10 @@ const DatePickerInline: React.FC = ({ const [open, setOpen] = useState(false); const chipText = type === 'due' ? "due:" : type === 't' ? "t:" : null; + dayjs.updateLocale(settings.language, { + weekStart: settings.weekStart, + }); + const handleChange = (date: dayjs.Dayjs | null) => { try { ipcRenderer.send('writeTodoToFile', todoObject.id, todoObject.string, false, type, dayjs(date).format('YYYY-MM-DD')); @@ -55,7 +61,7 @@ const DatePickerInline: React.FC = ({ const ButtonField = ({ ...props }) => { const { disabled, InputProps: { ref } = {}, inputProps: { 'aria-label': ariaLabel } = {} } = props; const mustNotify = (type === 'due') ? !todoObject?.notify : true; - const formattedValue = settings.useHumanFriendlyDates && dayjs(date).isValid() ? friendlyDate(date, type, settings.language, t).pop() : date; + const formattedValue = settings.useHumanFriendlyDates && dayjs(date).isValid() ? friendlyDate(date, type, settings, t).pop() : date; const selected = filters && type !== null && (filters[type as keyof Filters] || []).some((filter: Filter) => { return filter.values.includes(date); diff --git a/src/renderer/Header/Search/Input.scss b/src/renderer/Header/Search/Input.scss index 2451a2dc..039e09fe 100644 --- a/src/renderer/Header/Search/Input.scss +++ b/src/renderer/Header/Search/Input.scss @@ -6,6 +6,9 @@ } .MuiButtonBase-root { border: none; + svg { + color: $blue; + } svg.invert { transform: rotate(180deg); } diff --git a/src/renderer/Settings/LanguageSelector.tsx b/src/renderer/Settings/LanguageSelector.tsx index 15ee3373..aaedd891 100644 --- a/src/renderer/Settings/LanguageSelector.tsx +++ b/src/renderer/Settings/LanguageSelector.tsx @@ -7,7 +7,6 @@ import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; import de from '../../locales/de.json'; import en from '../../locales/en.json'; -import en_GB from '../../locales/en-gb.json'; import it from '../../locales/it.json'; import es from '../../locales/es.json'; import fr from '../../locales/fr.json'; @@ -23,7 +22,6 @@ import ko from '../../locales/ko.json'; import hi from '../../locales/hi.json'; import 'dayjs/locale/de'; import 'dayjs/locale/en'; -import 'dayjs/locale/en-gb'; import 'dayjs/locale/it'; import 'dayjs/locale/es'; import 'dayjs/locale/fr'; @@ -41,7 +39,6 @@ const options: i18n.InitOptions = { resources: { de: { translation: de }, en: { translation: en }, - 'en-gb': { translation: en_GB }, it: { translation: it }, es: { translation: es }, fr: { translation: fr }, @@ -57,7 +54,7 @@ const options: i18n.InitOptions = { hi: { translation: hi }, }, fallbackLng: 'en', - supportedLngs: ['de', 'en', 'en-gb', 'it', 'es', 'fr', 'zh', 'pt', 'jp', 'tr', 'hu', 'cs', 'pl', 'ru', 'ko', 'hi'], + supportedLngs: ['de', 'en', 'it', 'es', 'fr', 'zh', 'pt', 'jp', 'tr', 'hu', 'cs', 'pl', 'ru', 'ko', 'hi'], interpolation: { escapeValue: false, }, @@ -82,7 +79,6 @@ i18n const friendlyLanguageName: Record = { de: 'Deutsch', en: 'English', - 'en-gb': 'English (UK)', it: 'Italiano', es: 'Español', fr: 'Français', diff --git a/src/renderer/Settings/Settings.tsx b/src/renderer/Settings/Settings.tsx index ce1c39a2..9987b1f5 100644 --- a/src/renderer/Settings/Settings.tsx +++ b/src/renderer/Settings/Settings.tsx @@ -40,6 +40,7 @@ const visibleSettings: VisibleSettings = { }, useHumanFriendlyDates: { style: 'toggle', + help: 'https://github.com/ransome1/sleek/wiki/Human-friendly-dates', }, notificationsAllowed: { style: 'toggle', @@ -63,6 +64,10 @@ const visibleSettings: VisibleSettings = { style: 'select', values: ['system', 'light', 'dark'], }, + weekStart: { + style: 'select', + values: [1, 0], + }, }; diff --git a/src/renderer/Shared.tsx b/src/renderer/Shared.tsx index b3f3ad44..738f8376 100644 --- a/src/renderer/Shared.tsx +++ b/src/renderer/Shared.tsx @@ -3,10 +3,12 @@ import relativeTime from 'dayjs/plugin/relativeTime'; import duration from 'dayjs/plugin/duration'; import calendar from 'dayjs/plugin/calendar'; import weekday from 'dayjs/plugin/weekday'; +import updateLocale from 'dayjs/plugin/updateLocale'; dayjs.extend(relativeTime); dayjs.extend(duration); dayjs.extend(calendar); dayjs.extend(weekday); +dayjs.extend(updateLocale); const { store, ipcRenderer } = window.api; @@ -60,9 +62,10 @@ export const translatedAttributes = (t: typeof i18n.t) => { } }; -export const friendlyDate = (value: string, attributeKey: string, language: string, t: typeof i18n.t) => { - - dayjs.locale(language) +export const friendlyDate = (value: string, attributeKey: string, settings: Settings, t: typeof i18n.t) => { + dayjs.updateLocale(settings.language, { + weekStart: settings.weekStart, + }); const today = dayjs(); const date = dayjs(value); diff --git a/yarn.lock b/yarn.lock index ee05315d..4a3b0803 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2055,9 +2055,9 @@ integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== "@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + version "1.0.10" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.10.tgz#b7ebd3adfa7750628d100594f6726b054d2c33b2" + integrity sha512-PiaIWIoPvO6qm6t114ropMCagj6YAF24j9OkCA2mJDXFnlionEwhsBCJ8yek4aib575BI3OkART/90WsgHgLWw== "@tsconfig/node12@^1.0.7": version "1.0.11" From 13f8f4d63e1458b18fc60f1e551475d015b402e9 Mon Sep 17 00:00:00 2001 From: ransome1 Date: Wed, 27 Mar 2024 18:14:03 +0100 Subject: [PATCH 2/5] Fixed https://github.com/ransome1/sleek/issues/609#issuecomment-2016756390. Introducing chokidarOptions settings (https://github.com/ransome1/sleek/issues/692) and reverting default filewatcher configuration to pre 2.0.12 --- flatpak/com.github.ransome1.sleek.appdata.xml | 2 +- package.json | 2 +- release/app/package.json | 2 +- snap/snapcraft.yaml | 2 +- src/main/config.tsx | 13 +++++++++++-- src/main/modules/File/Watcher.tsx | 12 +++--------- src/renderer/App.tsx | 2 +- src/renderer/Dialog/DatePicker.tsx | 5 +++++ src/renderer/Header/Search/Input.scss | 3 --- src/renderer/Settings/LanguageSelector.tsx | 2 +- src/renderer/Shared.tsx | 5 ++--- src/renderer/index.ejs | 2 +- 12 files changed, 28 insertions(+), 24 deletions(-) diff --git a/flatpak/com.github.ransome1.sleek.appdata.xml b/flatpak/com.github.ransome1.sleek.appdata.xml index 6c7c9faf..564de91a 100755 --- a/flatpak/com.github.ransome1.sleek.appdata.xml +++ b/flatpak/com.github.ransome1.sleek.appdata.xml @@ -9,7 +9,7 @@ Robin Ahle - + https://github.com/ransome1/sleek https://github.com/ransome1/sleek/issues diff --git a/package.json b/package.json index 913a5361..e916d891 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sleek", - "version": "2.0.13-rc.1", + "version": "2.0.13-rc.2", "main": "./src/main/main.tsx", "scripts": { "build": "concurrently \"yarn run peggy\" \"yarn run build:main\" \"yarn run build:renderer\"", diff --git a/release/app/package.json b/release/app/package.json index 068a2e65..60a86252 100644 --- a/release/app/package.json +++ b/release/app/package.json @@ -1,6 +1,6 @@ { "name": "sleek", - "version": "2.0.13-rc.1", + "version": "2.0.13-rc.2", "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": [ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 1364ee44..4c578738 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: sleek base: core20 -version: "2.0.13-rc.1" +version: "2.0.13-rc.2" 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. diff --git a/src/main/config.tsx b/src/main/config.tsx index 27f793fd..0ba24272 100644 --- a/src/main/config.tsx +++ b/src/main/config.tsx @@ -104,9 +104,18 @@ const config: Store = new Store({ store.set('fileWatcherPolling', false); store.set('fileWatcherPollingInterval', 100); }, - '2.0.13': store => { - console.log('Migrating from 2.0.12 → 2.0.13'); + '2.0.13-rc.2': store => { + console.log('Migrating from 2.0.12 → 2.0.13-rc.2'); store.set('weekStart', 1); + store.delete('fileWatcherAtomic'); + store.delete('fileWatcherPolling'); + store.delete('fileWatcherPollingInterval'); + store.set('chokidarOptions', { + awaitWriteFinish: { + stabilityThreshold: 100, + pollInterval: 100 + } + }) }, } }); diff --git a/src/main/modules/File/Watcher.tsx b/src/main/modules/File/Watcher.tsx index 28ae4b0a..0432b050 100644 --- a/src/main/modules/File/Watcher.tsx +++ b/src/main/modules/File/Watcher.tsx @@ -17,15 +17,9 @@ function createFileWatcher(files: FileObject[]): void { config.set('files', files) } - const fileWatcherAtomic = config.get('fileWatcherAtomic') || 1000; - const fileWatcherPolling = config.get('fileWatcherPolling') || false; - const fileWatcherPollingInterval = config.get('fileWatcherPollingInterval') || 100; - - watcher = chokidar.watch(files.map((file) => file.todoFilePath), { - atomic: fileWatcherAtomic, - usePolling: fileWatcherPolling, - interval: fileWatcherPollingInterval - }); + const chokidarOptions = config.get('chokidarOptions'); + + watcher = chokidar.watch(files.map((file) => file.todoFilePath), chokidarOptions); watcher .on('add', (file) => { diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index bbfda3fd..736fb150 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -64,7 +64,7 @@ const App = () => { .catch((error) => { console.error(error); }); - }, [settings.language]); + }, [settings.language]); useEffect(() => { const windowHeight = window.innerHeight; diff --git a/src/renderer/Dialog/DatePicker.tsx b/src/renderer/Dialog/DatePicker.tsx index ece8845b..d0eadec1 100644 --- a/src/renderer/Dialog/DatePicker.tsx +++ b/src/renderer/Dialog/DatePicker.tsx @@ -4,7 +4,9 @@ import { i18n } from '../Settings/LanguageSelector'; import { DatePicker, LocalizationProvider } from '@mui/x-date-pickers'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import dayjs from 'dayjs'; +import updateLocale from 'dayjs/plugin/updateLocale'; import './DatePicker.scss'; +dayjs.extend(updateLocale); interface Props extends WithTranslation { date: string | null; @@ -21,6 +23,9 @@ const DatePickerComponent: React.FC = ({ handleChange, t, }) => { + dayjs.updateLocale(settings.language, { + weekStart: settings.weekStart, + }); return ( { if(!store.getConfig('language')) { - store.setConfig('language', navigator.language.toLowerCase()); + store.setConfig('language', navigator.language.toLowerCase().substr(0, 2)); } i18n.on('missingKey', (key: string) => { console.warn(`Missing translation key: ${key}`); diff --git a/src/renderer/Shared.tsx b/src/renderer/Shared.tsx index 738f8376..cb04f058 100644 --- a/src/renderer/Shared.tsx +++ b/src/renderer/Shared.tsx @@ -75,7 +75,7 @@ export const friendlyDate = (value: string, attributeKey: string, settings: Sett results.push((attributeKey === 'due') ? t('drawer.attributes.overdue') : t('drawer.attributes.elapsed')); } - if (date.isAfter(today.subtract(1, 'week').startOf('week')) && date.isBefore(today.subtract(1, 'week').endOf('week'))) { + if (date.isAfter(today.subtract(1, 'week').startOf('week').subtract(1, 'day')) && date.isBefore(today.subtract(1, 'week').endOf('week'))) { results.push(t('drawer.attributes.lastWeek')); } @@ -99,13 +99,12 @@ export const friendlyDate = (value: string, attributeKey: string, settings: Sett results.push(t('drawer.attributes.tomorrow')); } - if (date.isSame(today.add(1, 'week'), 'week')) { results.push(t('drawer.attributes.nextWeek')); } if (date.month() === today.add(1, 'month').month()) { - results.push(t('drawer.attributes.nextMonth')); + results.push(t('drawer.attributes.nextMonth')); } if (date.isAfter(today.add(2, 'month').startOf('month'))) { diff --git a/src/renderer/index.ejs b/src/renderer/index.ejs index ef569c5d..2f109a65 100644 --- a/src/renderer/index.ejs +++ b/src/renderer/index.ejs @@ -4,7 +4,7 @@ sleek From 01d371a6a7a325760495833b918d85fe88cd1b6c Mon Sep 17 00:00:00 2001 From: ransome1 Date: Thu, 28 Mar 2024 20:37:08 +0100 Subject: [PATCH 3/5] Fixed CSP. Bumped version number to 2.0.13. --- release/app/package.json | 2 +- src/main/config.tsx | 4 ++-- src/renderer/index.ejs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/release/app/package.json b/release/app/package.json index 60a86252..5f0f696c 100644 --- a/release/app/package.json +++ b/release/app/package.json @@ -1,6 +1,6 @@ { "name": "sleek", - "version": "2.0.13-rc.2", + "version": "2.0.13", "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": [ diff --git a/src/main/config.tsx b/src/main/config.tsx index 0ba24272..8c81d94a 100644 --- a/src/main/config.tsx +++ b/src/main/config.tsx @@ -104,8 +104,8 @@ const config: Store = new Store({ store.set('fileWatcherPolling', false); store.set('fileWatcherPollingInterval', 100); }, - '2.0.13-rc.2': store => { - console.log('Migrating from 2.0.12 → 2.0.13-rc.2'); + '2.0.13': store => { + console.log('Migrating from 2.0.12 → 2.0.13'); store.set('weekStart', 1); store.delete('fileWatcherAtomic'); store.delete('fileWatcherPolling'); diff --git a/src/renderer/index.ejs b/src/renderer/index.ejs index 2f109a65..43d22bf0 100644 --- a/src/renderer/index.ejs +++ b/src/renderer/index.ejs @@ -4,7 +4,7 @@ sleek From 54f99d3b6755bb4ef920f689cbc8f373d4ed9e16 Mon Sep 17 00:00:00 2001 From: ransome1 Date: Thu, 28 Mar 2024 20:49:28 +0100 Subject: [PATCH 4/5] Updated dependencies. --- yarn.lock | 138 ++++++++++++++++++++++++++---------------------------- 1 file changed, 66 insertions(+), 72 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4a3b0803..32067b1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1681,9 +1681,9 @@ "@jridgewell/sourcemap-codec" "^1.4.14" "@leichtgewicht/ip-codec@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" - integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== + version "2.0.5" + resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz#4fc56c15c580b9adb7dc3c333a134e540b44bfb1" + integrity sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw== "@malept/cross-spawn-promise@^1.1.0": version "1.1.1" @@ -2055,9 +2055,9 @@ integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== "@tsconfig/node10@^1.0.7": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.10.tgz#b7ebd3adfa7750628d100594f6726b054d2c33b2" - integrity sha512-PiaIWIoPvO6qm6t114ropMCagj6YAF24j9OkCA2mJDXFnlionEwhsBCJ8yek4aib575BI3OkART/90WsgHgLWw== + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== "@tsconfig/node12@^1.0.7": version "1.0.11" @@ -2404,9 +2404,9 @@ "@types/react" "*" "@types/react-dom@^18.0.0", "@types/react-dom@^18.2.21": - version "18.2.22" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.22.tgz#d332febf0815403de6da8a97e5fe282cbe609bae" - integrity sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ== + version "18.2.23" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.23.tgz#112338760f622a16d64271b408355f2f27f6302c" + integrity sha512-ZQ71wgGOTmDYpnav2knkjr3qXdAFu0vsk8Ci5w3pGAIdj7/kKAyn+VsQDhXsmzzzepAiI9leWMmubXz690AI/A== dependencies: "@types/react" "*" @@ -2435,12 +2435,11 @@ "@types/react" "*" "@types/react@*", "@types/react@^18.0.26", "@types/react@^18.2.64": - version "18.2.69" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.69.tgz#313ec21891b22bb7646a54cb4bdb8cddb0880271" - integrity sha512-W1HOMUWY/1Yyw0ba5TkCV+oqynRjG7BnteBB+B7JmAK7iw3l2SW+VGOxL+akPweix6jk2NNJtyJKpn4TkpfK3Q== + version "18.2.73" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.73.tgz#0579548ad122660d99e00499d22e33b81e73ed94" + integrity sha512-XcGdod0Jjv84HOC7N5ziY3x+qL0AfmubvKOZ9hJjJ2yd5EE+KYjWhdOjt387e9HPheHkdggF9atTifMRtyAaRA== dependencies: "@types/prop-types" "*" - "@types/scheduler" "*" csstype "^3.0.2" "@types/responselike@^1.0.0": @@ -2455,11 +2454,6 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== -"@types/scheduler@*": - version "0.16.8" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff" - integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A== - "@types/send@*": version "0.17.4" resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.4.tgz#6619cd24e7270793702e4e6a4b958a9010cfc57a" @@ -3928,10 +3922,10 @@ css-box-model@^1.2.0: dependencies: tiny-invariant "^1.0.6" -css-declaration-sorter@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-7.1.1.tgz#9796bcc257b4647c39993bda8d431ce32b666f80" - integrity sha512-dZ3bVTEEc1vxr3Bek9vGwfB5Z6ESPULhcRvO472mfjVnj8jRcTnKO8/JTczlvxM10Myb+wBM++1MtdO76eWcaQ== +css-declaration-sorter@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz#6dec1c9523bc4a643e088aab8f09e67a54961024" + integrity sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow== css-loader@^6.10.0: version "6.10.0" @@ -4012,13 +4006,13 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-default@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-6.1.1.tgz#d46c4022535cbc8f26da9296f45ce3471a233dab" - integrity sha512-XW/dYN2p8Jdkp1lovFd0UVRh6RB0iMyXJbAE9Qm+taR3p2LGu492AW34lVaukUrXoK9IxK5aK3CUmFpUorU4oA== +cssnano-preset-default@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-6.1.2.tgz#adf4b89b975aa775f2750c89dbaf199bbd9da35e" + integrity sha512-1C0C+eNaeN8OcHQa193aRgYexyJtU8XwbdieEjClw+J9d94E41LwT6ivKH0WT+fYwYWB0Zp3I3IZ7tI/BbUbrg== dependencies: browserslist "^4.23.0" - css-declaration-sorter "^7.1.1" + css-declaration-sorter "^7.2.0" cssnano-utils "^4.0.2" postcss-calc "^9.0.1" postcss-colormin "^6.1.0" @@ -4054,11 +4048,11 @@ cssnano-utils@^4.0.2: integrity sha512-ZR1jHg+wZ8o4c3zqf1SIUSTIvm/9mU343FMR6Obe/unskbvpGhZOo1J6d/r8D1pzkRQYuwbcH3hToOuoA2G7oQ== cssnano@^6.0.3: - version "6.1.1" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-6.1.1.tgz#4a5f2602256efc9198a47ab549ce21028485cfcb" - integrity sha512-paTFZuiVohpaXJuau8l7buFt9+FTmfjwEO70EKitzYOQw3frib/It4sb6cQ+gJyDEyY+myDSni6IbBvKZ0N8Lw== + version "6.1.2" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-6.1.2.tgz#4bd19e505bd37ee7cf0dc902d3d869f6d79c66b8" + integrity sha512-rYk5UeX7VAM/u0lNqewCdasdtPK81CgX8wJFLEIXHbV2oldWRgJAsZrdhRXkV1NJzA2g850KiFm9mMU2HxNxMA== dependencies: - cssnano-preset-default "^6.1.1" + cssnano-preset-default "^6.1.2" lilconfig "^3.1.1" csso@^5.0.5: @@ -4580,9 +4574,9 @@ electron-store@^8.2.0: type-fest "^2.17.0" electron-to-chromium@^1.4.668: - version "1.4.715" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.715.tgz#bb16bcf2a3537962fccfa746b5c98c5f7404ff46" - integrity sha512-XzWNH4ZSa9BwVUQSDorPWAUQ5WGuYz7zJUNpNif40zFCiCl20t8zgylmreNmn26h5kiyw2lg7RfTmeMBsDklqg== + version "1.4.719" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.719.tgz#22a94ce7a5150511ba88e900836039e159efe22c" + integrity sha512-FbWy2Q2YgdFzkFUW/W5jBjE9dj+804+98E4Pup78JBPnbdb3pv6IneY2JCPKdeKLh3AOKHQeYf+KwLr7mxGh6Q== electron@^28.2.6: version "28.2.8" @@ -4717,9 +4711,9 @@ es-get-iterator@^1.1.3: stop-iteration-iterator "^1.0.0" es-module-lexer@^1.2.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.2.tgz#ba1a62255ff9b41023aaf9bd08c016a5f1a3fef3" - integrity sha512-7nOqkomXZEaxUDJw21XZNtRk739QvrPSoZoRtbsEfcii00vdzZUh6zh1CQwHhrib8MdEtJfv5rJiGeb4KuV/vw== + version "1.5.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.0.tgz#4878fee3789ad99e065f975fdd3c645529ff0236" + integrity sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw== es6-error@^4.1.1: version "4.1.1" @@ -4912,9 +4906,9 @@ exponential-backoff@^3.1.1: integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== express@^4.17.3: - version "4.19.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.19.1.tgz#4700635795e911600a45596138cf5b0320e78256" - integrity sha512-K4w1/Bp7y8iSiVObmCrtq8Cs79XjJc/RU2YYkZQ7wpUu5ZyZ7MtPHkqoMz4pf+mgXfNvo2qft8D9OnrH2ABk9w== + version "4.19.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" + integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== dependencies: accepts "~1.3.8" array-flatten "1.1.1" @@ -5242,15 +5236,15 @@ glob-to-regexp@^0.4.1: integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== glob@^10.3.10, glob@^10.3.7: - version "10.3.10" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" - integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== + version "10.3.12" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b" + integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== dependencies: foreground-child "^3.1.0" - jackspeak "^2.3.5" + jackspeak "^2.3.6" minimatch "^9.0.1" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry "^1.10.1" + minipass "^7.0.4" + path-scurry "^1.10.2" glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" @@ -5746,10 +5740,10 @@ ini@^1.3.4: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inline-style-parser@0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.2.2.tgz#d498b4e6de0373458fc610ff793f6b14ebf45633" - integrity sha512-EcKzdTHVe8wFVOGEYXiW9WmJXPjqi1T+234YpJr98RiFYKHV3cdy1+3mkTE+KHTHxFFLH51SfaGOoUdW+v7ViQ== +inline-style-parser@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.2.3.tgz#e35c5fb45f3a83ed7849fe487336eb7efa25971c" + integrity sha512-qlD8YNDqyTKTyuITrDOffsl6Tdhv+UC4hcdAVuQsK4IMQ99nSgd1MIA/Q+jQYoh9r3hVUXhYh7urSRmXPkW04g== internal-slot@^1.0.4: version "1.0.7" @@ -6125,7 +6119,7 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jackspeak@^2.3.5: +jackspeak@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== @@ -6819,6 +6813,11 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +lru-cache@^10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" + integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -6838,11 +6837,6 @@ lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== -"lru-cache@^9.1.1 || ^10.0.0": - version "10.2.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" - integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== - lz-string@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" @@ -7504,9 +7498,9 @@ minimatch@^7.4.6: brace-expansion "^2.0.1" minimatch@^9.0.1: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + version "9.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== dependencies: brace-expansion "^2.0.1" @@ -7566,7 +7560,7 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== @@ -8016,12 +8010,12 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698" - integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ== +path-scurry@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" + integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== dependencies: - lru-cache "^9.1.1 || ^10.0.0" + lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-to-regexp@0.1.7: @@ -9512,11 +9506,11 @@ style-loader@^3.3.3: integrity sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w== style-to-object@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-1.0.5.tgz#5e918349bc3a39eee3a804497d97fcbbf2f0d7c0" - integrity sha512-rDRwHtoDD3UMMrmZ6BzOW0naTjMsVZLIjsGleSKS/0Oz+cgCfAPRspaqJuE8rDzpKha/nEvnM0IF4seEAZUTKQ== + version "1.0.6" + resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-1.0.6.tgz#0c28aed8be1813d166c60d962719b2907c26547b" + integrity sha512-khxq+Qm3xEyZfKd/y9L3oIWQimxuc4STrQKtQn8aSDRHb8mFgpukgX1hdzfrMEW6JCjyJ8p89x+IUMVnCBI1PA== dependencies: - inline-style-parser "0.2.2" + inline-style-parser "0.2.3" stylehacks@^6.1.1: version "6.1.1" @@ -9636,9 +9630,9 @@ terser-webpack-plugin@^5.3.10, terser-webpack-plugin@^5.3.9: terser "^5.26.0" terser@^5.10.0, terser@^5.26.0: - version "5.29.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.29.2.tgz#c17d573ce1da1b30f21a877bffd5655dd86fdb35" - integrity sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw== + version "5.30.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.30.0.tgz#64cb2af71e16ea3d32153f84d990f9be0cdc22bf" + integrity sha512-Y/SblUl5kEyEFzhMAQdsxVHh+utAxd4IuRNJzKywY/4uzSogh3G219jqbDDxYu4MXO9CzY3tSEqmZvW6AoEDJw== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" From 4276a5526699b8916ee49086eac38b47e267a1db Mon Sep 17 00:00:00 2001 From: ransome1 Date: Thu, 28 Mar 2024 21:11:34 +0100 Subject: [PATCH 5/5] Remove language setting in case en-gb had been set in previous versions --- src/main/config.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/config.tsx b/src/main/config.tsx index 8c81d94a..5f5d1297 100644 --- a/src/main/config.tsx +++ b/src/main/config.tsx @@ -110,6 +110,7 @@ const config: Store = new Store({ store.delete('fileWatcherAtomic'); store.delete('fileWatcherPolling'); store.delete('fileWatcherPollingInterval'); + store.delete('language'); store.set('chokidarOptions', { awaitWriteFinish: { stabilityThreshold: 100,