Compare commits

...

70 Commits

Author SHA1 Message Date
drone a72cd31202 [skip ci] Updated translations via Crowdin 2022-12-11 00:30:17 +00:00
kolaente 2141171529
fix(task): move task color bubble next to task index and done badge on mobile 2022-12-10 22:28:19 +01:00
kolaente 9b050846a4
Revert "feat: use img for logo so that it's not part of the main bundle (#2684)"
This reverts commit 02de481297.
2022-12-10 22:21:50 +01:00
renovate f6b8d2c4ca chore(deps): update dependency @types/node to v18.11.13 (#2823)
Reviewed-on: vikunja/frontend#2823
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-10 21:18:26 +00:00
renovate 86119ff414 chore(deps): update dependency vitest to v0.25.7 (#2824)
Reviewed-on: vikunja/frontend#2824
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-10 20:25:24 +00:00
renovate 7c5622af11 chore(deps): update dependency esbuild to v0.16.4 (#2821)
Reviewed-on: vikunja/frontend#2821
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-10 09:04:33 +00:00
renovate 6ac3ce65b4 chore(deps): update dependency rollup to v3.7.2 (#2822)
Reviewed-on: vikunja/frontend#2822
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-10 09:03:41 +00:00
renovate 07f9784e0d chore(deps): update dependency rollup to v3.7.1 (#2820)
Reviewed-on: vikunja/frontend#2820
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 20:12:45 +00:00
renovate fb751236d1 chore(deps): update dependency @cypress/vite-dev-server to v5.0.2 (#2819)
Reviewed-on: vikunja/frontend#2819
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 18:51:31 +00:00
renovate 396943b3a6 chore(deps): update dependency @vitejs/plugin-legacy to v3.0.1 (#2818)
Reviewed-on: vikunja/frontend#2818
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 14:23:13 +00:00
renovate b8a19ac88a fix(deps): update dependency pinia to v2.0.28 (#2815)
Reviewed-on: vikunja/frontend#2815
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 11:33:27 +00:00
renovate 02fac73e07 chore(deps): update dependency @vitejs/plugin-legacy to v3 (#2813)
Reviewed-on: vikunja/frontend#2813
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 11:32:49 +00:00
renovate 21e52c3b1f chore(deps): update dependency @vitejs/plugin-vue to v4 (#2814)
Reviewed-on: vikunja/frontend#2814
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 10:17:24 +00:00
renovate 213ef84586 chore(deps): update dependency cypress to v12.0.2 (#2807)
Reviewed-on: vikunja/frontend#2807
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 10:14:38 +00:00
renovate 25852ffac3 chore(deps): update dependency @types/node to v18.11.12 (#2808)
Reviewed-on: vikunja/frontend#2808
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 10:14:10 +00:00
renovate 1255b50ed7 chore(deps): update dependency vue-tsc to v1.0.12 (#2811)
Reviewed-on: vikunja/frontend#2811
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 10:13:23 +00:00
renovate afe8198158 chore(deps): update dependency @types/marked to v4.0.8 (#2812)
Reviewed-on: vikunja/frontend#2812
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 09:34:43 +00:00
renovate abe43c4ef8 chore(deps): update dependency sass to v1.56.2 (#2810)
Reviewed-on: vikunja/frontend#2810
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 09:33:58 +00:00
renovate 8d5ddd695a chore(deps): update dependency esbuild to v0.16.3 (#2809)
Reviewed-on: vikunja/frontend#2809
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 09:33:28 +00:00
renovate a0087bc34a chore(deps): update dependency @cypress/vite-dev-server to v5.0.1 (#2806)
Reviewed-on: vikunja/frontend#2806
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-09 09:32:51 +00:00
renovate 18a73c39e5 chore(deps): update dependency vitest to v0.25.6 (#2804)
Reviewed-on: vikunja/frontend#2804
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-08 11:14:02 +00:00
renovate e0351495ff chore(deps): update typescript-eslint monorepo to v5.46.0 (#2803)
Reviewed-on: vikunja/frontend#2803
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-08 10:26:51 +00:00
renovate b97e045118 chore(deps): update dependency esbuild to v0.16.2 (#2802)
Reviewed-on: vikunja/frontend#2802
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-08 09:32:28 +00:00
renovate a052305adf chore(deps): update dependency rollup to v3.7.0 (#2801)
Reviewed-on: vikunja/frontend#2801
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-08 09:30:16 +00:00
renovate 237de35b25 chore(deps): update dependency typescript to v4.9.4 (#2800)
Reviewed-on: vikunja/frontend#2800
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-08 09:29:39 +00:00
renovate 85beebf0d8 fix(deps): update sentry-javascript monorepo to v7.24.2 (#2799)
Reviewed-on: vikunja/frontend#2799
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-07 20:14:23 +00:00
renovate e81b216f85 fix(deps): update sentry-javascript monorepo to v7.24.1 (#2798)
Reviewed-on: vikunja/frontend#2798
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-07 13:32:51 +00:00
renovate fc9e75e9b3 fix(deps): update sentry-javascript monorepo to v7.24.0 (#2797)
Reviewed-on: vikunja/frontend#2797
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-07 11:15:30 +00:00
renovate b576621569 chore(deps): update dependency cypress to v12.0.1 (#2794)
Reviewed-on: vikunja/frontend#2794
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-07 10:12:16 +00:00
renovate 08a031ca07 chore(deps): update dependency esbuild to v0.16.1 (#2795)
Reviewed-on: vikunja/frontend#2795
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-07 09:13:46 +00:00
renovate d306bb967c fix(deps): update dependency marked to v4.2.4 (#2796)
Reviewed-on: vikunja/frontend#2796
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-07 09:12:25 +00:00
renovate 3f6a64d7f9 chore(deps): update dependency vitest to v0.25.5 (#2793)
Reviewed-on: vikunja/frontend#2793
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-06 21:48:16 +00:00
renovate 2d392c9973 chore(deps): update dependency cypress to v12 (#2792)
Reviewed-on: vikunja/frontend#2792
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-06 18:47:02 +00:00
renovate 9897bc9b43 fix(deps): update dependency dayjs to v1.11.7 (#2791)
Reviewed-on: vikunja/frontend#2791
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-06 16:25:41 +00:00
renovate 92546f4b34 chore(deps): update pnpm to v7.18.1 (#2790)
Reviewed-on: vikunja/frontend#2790
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-06 14:35:50 +00:00
renovate 8d326aca03 chore(deps): update dependency @types/node to v18.11.11 (#2789)
Reviewed-on: vikunja/frontend#2789
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 21:13:45 +00:00
renovate 4bf9284b38 chore(deps): update dependency vitest to v0.25.4 (#2788)
Reviewed-on: vikunja/frontend#2788
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 19:14:26 +00:00
renovate 0de9376b2b chore(deps): update typescript-eslint monorepo to v5.45.1 (#2787)
Reviewed-on: vikunja/frontend#2787
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 18:38:15 +00:00
renovate 0602f6693b chore(deps): update dependency rollup to v3.6.0 (#2786)
Reviewed-on: vikunja/frontend#2786
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 12:14:06 +00:00
renovate 7d5cde53e3 chore(deps): update dependency vite to v3.2.5 (#2785)
Reviewed-on: vikunja/frontend#2785
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 09:27:20 +00:00
renovate 8361640559 chore(deps): update dependency happy-dom to v7.7.2 (#2781)
Reviewed-on: vikunja/frontend#2781
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 08:13:36 +00:00
renovate 517a6cea1e chore(deps): update dependency netlify-cli to v12.2.8 (#2782)
Reviewed-on: vikunja/frontend#2782
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 07:40:17 +00:00
renovate ed4dd93bba chore(deps): update dependency esbuild to v0.15.18 (#2783)
Reviewed-on: vikunja/frontend#2783
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 07:39:38 +00:00
renovate d50de97490 chore(deps): update dependency @vue/test-utils to v2.2.6 (#2784)
Reviewed-on: vikunja/frontend#2784
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 07:38:49 +00:00
renovate aa719d3a68 chore(deps): update dependency caniuse-lite to v1.0.30001436 (#2780)
Reviewed-on: vikunja/frontend#2780
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-05 07:38:08 +00:00
kolaente 463d22b07c
fix(quick add magic): don't create a new label multiple times if it is used in multiple tasks
Resolves https://github.com/go-vikunja/frontend/issues/94
2022-12-04 20:19:43 +01:00
renovate 33494cab6b chore(deps): update dependency esbuild to v0.15.17 (#2779)
Reviewed-on: vikunja/frontend#2779
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-04 12:51:12 +00:00
renovate 8fa922a0ca chore(deps): update pnpm to v7.18.0 (#2778)
Reviewed-on: vikunja/frontend#2778
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-03 23:19:41 +00:00
renovate e5815e21cb chore(deps): update dependency @cypress/vite-dev-server to v5 (#2776)
Reviewed-on: vikunja/frontend#2776
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-03 10:12:17 +00:00
renovate 529b47e488 chore(deps): update dependency vue-tsc to v1.0.11 (#2777)
Reviewed-on: vikunja/frontend#2777
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-03 09:33:19 +00:00
renovate 63c3e4ea58 chore(deps): update dependency @cypress/vue to v5.0.3 (#2775)
Reviewed-on: vikunja/frontend#2775
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-03 09:32:32 +00:00
renovate d52e917357 chore(deps): update dependency eslint to v8.29.0 (#2774)
Reviewed-on: vikunja/frontend#2774
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-03 09:31:53 +00:00
kolaente b2da4fd126
fix(task): pass a list specified via quick add magic down to all subtasks created via indention
Resolves vikunja/frontend#2771
2022-12-02 18:39:52 +01:00
kolaente 83fb8c3ded
fix(tasks): missing space when showing parent tasks and list title
See vikunja/frontend#2771
2022-12-02 18:05:48 +01:00
Dominik Pschenitschni b44d11cfc0 feat: add @intlify/unplugin-vue-i18n (#2772)
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: vikunja/frontend#2772
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-12-02 15:16:15 +00:00
renovate d4133b9e78 chore(deps): update dependency @vue/test-utils to v2.2.5 (#2773)
Reviewed-on: vikunja/frontend#2773
Reviewed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-02 14:27:23 +00:00
renovate c478926038 fix(deps): update sentry-javascript monorepo to v7.23.0 2022-12-01 17:03:38 +00:00
renovate 00e40a0f53 chore(deps): update dependency rollup to v3.5.1 (#2769)
Reviewed-on: vikunja/frontend#2769
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-12-01 07:23:21 +00:00
renovate 0567ba2a47 chore(deps): update dependency @types/node to v18.11.10 (#2768)
Reviewed-on: vikunja/frontend#2768
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-30 21:39:34 +00:00
Dominik Pschenitschni 3b95824f58 feat: use Intl.DateTimeFormat for gantt weekdays (#2766)
Fixes vikunja/frontend#2728

Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: vikunja/frontend#2766
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-11-30 15:58:04 +00:00
renovate 963f3bfb07 fix(deps): update sentry-javascript monorepo to v7.22.0 (#2765)
Reviewed-on: vikunja/frontend#2765
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-29 14:16:53 +00:00
renovate d1c05eb3fb chore(deps): update dependency vue-tsc to v1.0.10 (#2764)
Reviewed-on: vikunja/frontend#2764
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-29 14:15:48 +00:00
renovate 2326e50d5d fix(deps): update dependency ufo to v1.0.1 (#2763)
Reviewed-on: vikunja/frontend#2763
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-29 13:13:46 +00:00
drone b7fa1a3ca1 [skip ci] Updated translations via Crowdin 2022-11-29 00:29:59 +00:00
renovate a3e1e43ec7 chore(deps): update typescript-eslint monorepo to v5.45.0 (#2762)
Reviewed-on: vikunja/frontend#2762
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-28 18:15:03 +00:00
renovate 39f163df4a fix(deps): update dependency @kyvg/vue3-notification to v2.7.0 (#2761)
Reviewed-on: vikunja/frontend#2761
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-28 11:13:49 +00:00
renovate f0e8ff93ff chore(deps): update dependency netlify-cli to v12.2.7 (#2760)
Reviewed-on: vikunja/frontend#2760
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-28 10:13:47 +00:00
Dominik Pschenitschni 3ee0bc345d feat: remove useRouteQuery (#2751)
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: vikunja/frontend#2751
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-11-28 09:06:07 +00:00
renovate b4ffee8929 chore(deps): update dependency caniuse-lite to v1.0.30001434 (#2759)
Reviewed-on: vikunja/frontend#2759
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-28 09:04:04 +00:00
renovate e3c3d3ee53 fix(deps): update dependency pinia to v2.0.27 (#2757)
Reviewed-on: vikunja/frontend#2757
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-11-28 09:03:03 +00:00
20 changed files with 2184 additions and 743 deletions

View File

@ -24,21 +24,21 @@
"@fortawesome/vue-fontawesome": "3.0.2",
"@github/hotkey": "2.0.1",
"@infectoone/vue-ganttastic": "2.1.3",
"@kyvg/vue3-notification": "2.6.1",
"@sentry/tracing": "7.21.1",
"@sentry/vue": "7.21.1",
"@intlify/unplugin-vue-i18n": "0.8.0",
"@kyvg/vue3-notification": "2.7.0",
"@sentry/tracing": "7.24.2",
"@sentry/vue": "7.24.2",
"@types/is-touch-device": "1.0.0",
"@types/lodash.clonedeep": "4.5.7",
"@types/sortablejs": "1.15.0",
"@vueuse/core": "9.6.0",
"@vueuse/router": "9.6.0",
"axios": "0.27.2",
"blurhash": "2.0.4",
"bulma-css-variables": "0.9.33",
"camel-case": "4.1.2",
"codemirror": "5.65.10",
"date-fns": "2.29.3",
"dayjs": "1.11.6",
"dayjs": "1.11.7",
"dompurify": "2.4.1",
"easymde": "2.18.0",
"fast-deep-equal": "3.1.3",
@ -49,13 +49,13 @@
"is-touch-device": "1.0.1",
"lodash.clonedeep": "4.5.0",
"lodash.debounce": "4.0.8",
"marked": "4.2.3",
"marked": "4.2.4",
"minimist": "1.2.7",
"pinia": "2.0.26",
"pinia": "2.0.28",
"register-service-worker": "1.7.2",
"snake-case": "3.0.4",
"sortablejs": "1.15.0",
"ufo": "1.0.0",
"ufo": "1.0.1",
"vue": "3.2.45",
"vue-advanced-cropper": "2.8.6",
"vue-flatpickr-component": "11.0.1",
@ -66,49 +66,49 @@
},
"devDependencies": {
"@4tw/cypress-drag-drop": "2.2.2",
"@cypress/vite-dev-server": "4.0.1",
"@cypress/vue": "5.0.2",
"@cypress/vite-dev-server": "5.0.2",
"@cypress/vue": "5.0.3",
"@faker-js/faker": "7.6.0",
"@rushstack/eslint-patch": "1.2.0",
"@types/codemirror": "5.60.5",
"@types/dompurify": "2.4.0",
"@types/flexsearch": "0.7.3",
"@types/lodash.debounce": "4.0.7",
"@types/marked": "4.0.7",
"@types/node": "18.11.9",
"@types/marked": "4.0.8",
"@types/node": "18.11.13",
"@types/postcss-preset-env": "7.7.0",
"@typescript-eslint/eslint-plugin": "5.44.0",
"@typescript-eslint/parser": "5.44.0",
"@vitejs/plugin-legacy": "2.3.1",
"@vitejs/plugin-vue": "3.2.0",
"@typescript-eslint/eslint-plugin": "5.46.0",
"@typescript-eslint/parser": "5.46.0",
"@vitejs/plugin-legacy": "3.0.1",
"@vitejs/plugin-vue": "4.0.0",
"@vue/eslint-config-typescript": "11.0.2",
"@vue/test-utils": "2.2.4",
"@vue/test-utils": "2.2.6",
"@vue/tsconfig": "0.1.3",
"autoprefixer": "10.4.13",
"browserslist": "4.21.4",
"caniuse-lite": "1.0.30001431",
"caniuse-lite": "1.0.30001436",
"csstype": "3.1.1",
"cypress": "11.2.0",
"esbuild": "0.15.16",
"eslint": "8.28.0",
"cypress": "12.0.2",
"esbuild": "0.16.4",
"eslint": "8.29.0",
"eslint-plugin-vue": "9.8.0",
"express": "4.18.2",
"happy-dom": "7.7.0",
"netlify-cli": "12.2.4",
"happy-dom": "7.7.2",
"netlify-cli": "12.2.8",
"postcss": "8.4.19",
"postcss-preset-env": "7.8.3",
"rollup": "3.5.0",
"rollup": "3.7.2",
"rollup-plugin-visualizer": "5.8.3",
"sass": "1.56.1",
"typescript": "4.9.3",
"vite": "3.2.4",
"sass": "1.56.2",
"typescript": "4.9.4",
"vite": "3.2.5",
"vite-plugin-pwa": "0.13.3",
"vite-svg-loader": "3.6.0",
"vitest": "0.25.3",
"vue-tsc": "1.0.9",
"vitest": "0.25.7",
"vue-tsc": "1.0.12",
"wait-on": "6.0.1",
"workbox-cli": "6.5.4"
},
"license": "AGPL-3.0-or-later",
"packageManager": "pnpm@7.17.1"
"packageManager": "pnpm@7.18.1"
}

File diff suppressed because it is too large Load Diff

View File

@ -15,9 +15,8 @@
</template>
<script lang="ts" setup>
import {computed, watch, type Ref} from 'vue'
import {useRouter} from 'vue-router'
import {useRouteQuery} from '@vueuse/router'
import {computed, watch} from 'vue'
import {useRoute, useRouter} from 'vue-router'
import {useI18n} from 'vue-i18n'
import isTouchDevice from 'is-touch-device'
import {success} from '@/message'
@ -41,6 +40,7 @@ import {useAuthStore} from './stores/auth'
const baseStore = useBaseStore()
const authStore = useAuthStore()
const router = useRouter()
const route = useRoute()
useBodyClass('is-touch', isTouchDevice())
const keyboardShortcutsActive = computed(() => baseStore.keyboardShortcutsActive)
@ -51,9 +51,9 @@ const authLinkShare = computed(() => authStore.authLinkShare)
const {t} = useI18n({useScope: 'global'})
// setup account deletion verification
const accountDeletionConfirm = useRouteQuery('accountDeletionConfirm') as Ref<null | string>
const accountDeletionConfirm = computed(() => route.query?.accountDeletionConfirm as (string | undefined))
watch(accountDeletionConfirm, async (accountDeletionConfirm) => {
if (accountDeletionConfirm === null) {
if (accountDeletionConfirm === undefined) {
return
}
@ -64,9 +64,9 @@ watch(accountDeletionConfirm, async (accountDeletionConfirm) => {
}, { immediate: true })
// setup password reset redirect
const userPasswordReset = useRouteQuery('userPasswordReset') as Ref<null | string>
const userPasswordReset = computed(() => route.query?.userPasswordReset as (string | undefined))
watch(userPasswordReset, (userPasswordReset) => {
if (userPasswordReset === null) {
if (userPasswordReset === undefined) {
return
}
@ -75,9 +75,9 @@ watch(userPasswordReset, (userPasswordReset) => {
}, { immediate: true })
// setup email verification redirect
const userEmailConfirm = useRouteQuery('userEmailConfirm') as Ref<null | string>
const userEmailConfirm = computed(() => route.query?.userEmailConfirm as (string | undefined))
watch(userEmailConfirm, (userEmailConfirm) => {
if (userEmailConfirm === null) {
if (userEmailConfirm === undefined) {
return
}

View File

@ -1,16 +1,16 @@
<script setup lang="ts">
import {computed} from 'vue'
import {useNow} from '@vueuse/core'
import { computed } from 'vue'
import { useNow } from '@vueuse/core'
import LogoFull from '@/assets/logo-full.svg?url'
import LogoFullPride from '@/assets/logo-full-pride.svg?url'
import LogoFull from '@/assets/logo-full.svg?component'
import LogoFullPride from '@/assets/logo-full-pride.svg?component'
const now = useNow()
const logoUrl = computed(() => now.value.getMonth() === 5 ? LogoFullPride : LogoFull)
const Logo = computed(() => now.value.getMonth() === 5 ? LogoFullPride : LogoFull)
</script>
<template>
<img alt="Vikunja" :src="logoUrl" class="logo" />
<Logo alt="Vikunja" class="logo" />
</template>
<style lang="scss" scoped>

View File

@ -1,6 +1,6 @@
<template>
<Loading
v-if="props.isLoading && tasks.size || dayjsLanguageLoading"
v-if="props.isLoading && !ganttBars.length || dayjsLanguageLoading"
class="gantt-container"
/>
<div class="gantt-container" v-else>
@ -16,14 +16,14 @@
@dblclick-bar="openTask"
:width="ganttChartWidth + 'px'"
>
<template #timeunit="{label, value}">
<template #timeunit="{value, date}">
<div
class="timeunit-wrapper"
:class="{'today': dayIsToday(label)}"
:class="{'today': dateIsToday(date)}"
>
<span>{{ value }}</span>
<span class="weekday">
{{ weekdayFromTimeLabel(label) }}
{{ weekDayFromDate(date) }}
</span>
</div>
</template>
@ -40,9 +40,7 @@
<script setup lang="ts">
import {computed, ref, watch, toRefs} from 'vue'
import {useRouter} from 'vue-router'
import {format, parse} from 'date-fns'
import dayjs from 'dayjs'
import isToday from 'dayjs/plugin/isToday'
import {useNow} from '@vueuse/core'
import {getHexColor} from '@/models/task'
@ -63,6 +61,7 @@ import {
import Loading from '@/components/misc/loading.vue'
import {MILLISECONDS_A_DAY} from '@/constants/date'
import {useWeekDayFromDate} from '@/helpers/time/formatDate'
export interface GanttChartProps {
isLoading: boolean,
@ -85,7 +84,6 @@ const {tasks, filters} = toRefs(props)
// setup dayjs for vue-ganttastic
const dayjsLanguageLoading = ref(false)
// const dayjsLanguageLoading = useDayjsLanguageSync(dayjs)
dayjs.extend(isToday)
extendDayjs()
const router = useRouter()
@ -157,23 +155,16 @@ function openTask(e: {
})
}
function parseTimeLabel(label: string) {
return parse(label, 'dd.MMM', dateFromDate.value)
}
const weekDayFromDate = useWeekDayFromDate()
function weekdayFromTimeLabel(label: string): string {
const parsed = parseTimeLabel(label)
return format(parsed, 'E')
}
function dayIsToday(label: string): boolean {
const parsed = parseTimeLabel(label)
const today = new Date()
return parsed.getDate() === today.getDate() &&
parsed.getMonth() === today.getMonth() &&
parsed.getFullYear() === today.getFullYear()
}
const today = useNow()
const dateIsToday = computed(() => (date: Date) => {
return (
date.getDate() === today.value.getDate() &&
date.getMonth() === today.value.getMonth() &&
date.getFullYear() === today.value.getFullYear()
)
})
</script>
<style scoped lang="scss">

View File

@ -53,6 +53,7 @@ import {RELATION_KIND} from '@/types/IRelationKind'
import {useAuthStore} from '@/stores/auth'
import {useTaskStore} from '@/stores/tasks'
import {useAutoHeightTextarea} from '@/composables/useAutoHeightTextarea'
import {getLabelsFromPrefix} from '@/modules/parseTaskText'
const props = defineProps({
defaultPosition: {
@ -82,6 +83,7 @@ function resetEmptyTitleError(e) {
}
const loading = computed(() => taskStore.isLoading)
async function addTask() {
if (newTaskTitle.value === '') {
errorMessage.value = t('list.create.addTitleRequired')
@ -98,14 +100,27 @@ async function addTask() {
// by quick add magic.
const createdTasks: { [key: ITask['title']]: ITask } = {}
const tasksToCreate = parseSubtasksViaIndention(newTaskTitle.value)
const newTasks = tasksToCreate.map(async ({title}) => {
// We ensure all labels exist prior to passing them down to the create task method
// In the store it will only ever see one task at a time so there's no way to reliably
// check if a new label was created before (because everything happens async).
const allLabels = tasksToCreate.map(({title}) => getLabelsFromPrefix(title) ?? [])
await taskStore.ensureLabelsExist(allLabels.flat())
const newTasks = tasksToCreate.map(async ({title, list}) => {
if (title === '') {
return
}
// If the task has a list specified, make sure to use it
let listId = null
if (list !== null) {
listId = await taskStore.findListId({list, listId: 0})
}
const task = await taskStore.createNewTask({
title,
listId: authStore.settings.defaultListId,
listId: listId || authStore.settings.defaultListId,
position: props.defaultPosition,
})
createdTasks[title] = task

View File

@ -1,12 +1,14 @@
<template>
<div class="heading">
<BaseButton @click="copyUrl"><h1 class="title task-id">{{ textIdentifier }}</h1></BaseButton>
<Done class="heading__done" :is-done="task.done"/>
<ColorBubble
v-if="task.hexColor !== ''"
:color="getHexColor(task.hexColor)"
class="mt-1 ml-2"
/>
<div class="flex is-align-items-center">
<BaseButton @click="copyUrl"><h1 class="title task-id">{{ textIdentifier }}</h1></BaseButton>
<Done class="heading__done" :is-done="task.done"/>
<ColorBubble
v-if="task.hexColor !== ''"
:color="getHexColor(task.hexColor)"
class="ml-2"
/>
</div>
<h1
class="title input"
:class="{'disabled': !canWrite}"

View File

@ -14,7 +14,7 @@
<router-link
:to="taskDetailRoute"
:class="{ 'done': task.done}"
:class="{ 'done': task.done, 'show-list': showList && taskList !== null}"
class="tasktext"
>
<span>
@ -391,6 +391,10 @@ function hideDeferDueDatePopup(e) {
width: auto;
}
.show-list .parent-tasks {
padding-left: .25rem;
}
.remove {
color: var(--danger);
}

View File

@ -106,4 +106,15 @@ task two`)
expect(tasks).to.have.length(1)
expect(tasks[0].parent).toBeNull()
})
it('Should add the list of the parent task as list for all sub tasks', () => {
const tasks = parseSubtasksViaIndention(
`parent task +list
sub task 1
sub task 2`)
expect(tasks).to.have.length(3)
expect(tasks[0].list).to.eq('list')
expect(tasks[1].list).to.eq('list')
expect(tasks[2].list).to.eq('list')
})
})

View File

@ -1,6 +1,9 @@
import {getListFromPrefix} from '@/modules/parseTaskText'
export interface TaskWithParent {
title: string,
parent: string | null,
list: string | null,
}
function cleanupTitle(title: string) {
@ -20,8 +23,11 @@ export function parseSubtasksViaIndention(taskTitles: string): TaskWithParent[]
const task: TaskWithParent = {
title: cleanupTitle(title),
parent: null,
list: null,
}
task.list = getListFromPrefix(task.title)
if (index === 0) {
return task
}
@ -41,6 +47,10 @@ export function parseSubtasksViaIndention(taskTitles: string): TaskWithParent[]
} while (parentSpaces >= matchedSpaces)
task.title = cleanupTitle(title.replace(spaceRegex, ''))
task.parent = task.parent.replace(spaceRegex, '')
if (task.list === null) {
// This allows to specify a list once for the parent task and inherit it to all subtasks
task.list = getListFromPrefix(task.parent)
}
}
return task

View File

@ -5,6 +5,8 @@ import {format, formatDistanceToNow, formatISO as formatISOfns} from 'date-fns'
import {enGB, de, fr, ru} from 'date-fns/locale'
import {i18n} from '@/i18n'
import { createSharedComposable, type MaybeRef } from '@vueuse/core'
import { computed, unref } from 'vue'
const locales = {en: enGB, de, ch: de, fr, ru}
@ -50,3 +52,17 @@ export const formatDateSince = (date) => {
export function formatISO(date) {
return date ? formatISOfns(date) : ''
}
/**
* Because `Intl.DateTimeFormat` is expensive to instatiate we try to reuse it as often as possible,
* by creating a shared composable.
*/
export const useDateTimeFormatter = createSharedComposable((options?: MaybeRef<Intl.DateTimeFormatOptions>) => {
return computed(() => new Intl.DateTimeFormat(i18n.global.locale.value, unref(options)))
})
export function useWeekDayFromDate() {
const dateTimeFormatter = useDateTimeFormatter({ weekday: 'short' })
return computed(() => (date: Date) => dateTimeFormatter.value.format(date))
}

View File

@ -22,31 +22,22 @@ export const DEFAULT_LANGUAGE: SupportedLocale= 'en'
export type ISOLanguage = string
// we load all messsages async
export const i18n = createI18n({
locale: DEFAULT_LANGUAGE, // set locale
fallbackLocale: DEFAULT_LANGUAGE,
legacy: true,
globalInjection: true,
allowComposition: true,
inheritLocale: true,
legacy: false,
messages: {
en: langEN,
} as Record<SupportedLocale, any>,
})
function setI18nLanguage(lang: SupportedLocale): SupportedLocale {
i18n.global.locale = lang
document.documentElement.lang = lang
return lang
}
export async function loadLanguageAsync(lang: SupportedLocale) {
export async function setLanguage(lang: SupportedLocale = getCurrentLanguage()): Promise<SupportedLocale | undefined> {
if (!lang) {
throw new Error()
}
// do not change language to the current one
if (i18n.global.locale === lang) {
if (i18n.global.locale.value === lang) {
return
}
@ -56,7 +47,9 @@ export async function loadLanguageAsync(lang: SupportedLocale) {
i18n.global.setLocaleMessage(lang, messages.default)
}
return setI18nLanguage(lang)
i18n.global.locale.value = lang
document.documentElement.lang = lang
return lang
}
export function getCurrentLanguage(): SupportedLocale {
@ -74,11 +67,7 @@ export function getCurrentLanguage(): SupportedLocale {
return language || DEFAULT_LANGUAGE
}
export function saveLanguage(lang: SupportedLocale) {
export async function saveLanguage(lang: SupportedLocale) {
localStorage.setItem('language', lang)
setLanguage()
}
export function setLanguage() {
return loadLanguageAsync(getCurrentLanguage())
await setLanguage()
}

1054
src/i18n/lang/no-NO.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -554,41 +554,41 @@
"lastWeek": "Last Week",
"thisMonth": "This Month",
"restOfThisMonth": "The Rest of This Month",
"nextMonth": "Next Month",
"next30Days": "Next 30 Days",
"lastMonth": "Last Month",
"thisYear": "This Year",
"restOfThisYear": "The Rest of This Year"
"nextMonth": "Próximo mês",
"next30Days": "Próximos 30 dias",
"lastMonth": "Último mês",
"thisYear": "Este ano",
"restOfThisYear": "O resto deste ano"
}
},
"datemathHelp": {
"canuse": "You can use date math to filter for relative dates.",
"learnhow": "Check out how it works",
"title": "Date Math",
"intro": "Date Math allows you to specify relative dates which are resolved on the fly by Vikunja when applying the filter.",
"canuse": "Você pode usar matemática de data para filtrar datas relativas.",
"learnhow": "Veja como funciona",
"title": "Matemática de Data",
"intro": "A matemática de data permite que você especifique datas relativas que são resolvidas em tempo real pelo Vikunja ao aplicar o filtro.",
"expression": "Each Date Math expression starts with an anchor date, which can either be {0}, or a date string ending with {1}. This anchor date can optionally be followed by one or more maths expressions.",
"similar": "These expressions are similar to the ones provided by {0} and {1}.",
"add1Day": "Add one day",
"minus1Day": "Subtract one day",
"add1Day": "Adicionar um dia",
"minus1Day": "Subtrair um dia",
"roundDay": "Round down to the nearest day",
"supportedUnits": "Supported time units are:",
"someExamples": "Some examples of time expressions:",
"supportedUnits": "As unidades de tempo suportadas são:",
"someExamples": "Alguns exemplos de expressões temporais:",
"units": {
"seconds": "Seconds",
"minutes": "Minutes",
"hours": "Hours",
"days": "Days",
"weeks": "Weeks",
"months": "Months",
"years": "Years"
"seconds": "Segundos",
"minutes": "Minutos",
"hours": "Horas",
"days": "Dias",
"weeks": "Semanas",
"months": "Meses",
"years": "Anos"
},
"examples": {
"now": "Right now",
"in24h": "In 24h",
"today": "Today at 00:00",
"beginningOfThisWeek": "The beginning of this week at 00:00",
"endOfThisWeek": "The end of this week",
"in30Days": "In 30 days",
"now": "Neste momento",
"in24h": "Em 24h",
"today": "Hoje às 00:00",
"beginningOfThisWeek": "O começo desta semana às 00:00",
"endOfThisWeek": "O fim desta semana",
"in30Days": "Em 30 dias",
"datePlusMonth": "{0} mais um mês às 00:00 desse dia"
}
}
@ -663,13 +663,13 @@
"endDate": "Data de término",
"labels": "Etiquetas",
"percentDone": "Progresso",
"priority": "Priority",
"relatedTasks": "Related Tasks",
"priority": "Prioridade",
"relatedTasks": "Tarefas relacionadas",
"reminders": "Reminders",
"repeat": "Repeat",
"startDate": "Start Date",
"title": "Title",
"updated": "Updated"
"startDate": "Data de ínicio",
"title": "Título",
"updated": "Atualizado"
},
"subscription": {
"subscribedListThroughParentNamespace": "You can't unsubscribe here because you are subscribed to this list through its namespace.",
@ -681,8 +681,8 @@
"notSubscribedList": "You are not subscribed to this list and won't receive notifications for changes.",
"subscribedTask": "You are currently subscribed to this task and will receive notifications for changes.",
"notSubscribedTask": "You are not subscribed to this task and won't receive notifications for changes.",
"subscribe": "Subscribe",
"unsubscribe": "Unsubscribe",
"subscribe": "Inscrever-se",
"unsubscribe": "Desinscrever-se",
"subscribeSuccessNamespace": "You are now subscribed to this namespace",
"unsubscribeSuccessNamespace": "You are now unsubscribed to this namespace",
"subscribeSuccessList": "You are now subscribed to this list",
@ -691,15 +691,15 @@
"unsubscribeSuccessTask": "You are now unsubscribed to this task"
},
"attachment": {
"title": "Attachments",
"title": "Anexos",
"createdBy": "created {0} by {1}",
"downloadTooltip": "Download this attachment",
"upload": "Upload attachment",
"upload": "Enviar anexo",
"drop": "Drop files here to upload",
"delete": "Delete attachment",
"deleteTooltip": "Delete this attachment",
"deleteText1": "Are you sure you want to delete the attachment {filename}?",
"copyUrl": "Copy URL",
"copyUrl": "Copiar URL",
"copyUrlTooltip": "Copy the url of this attachment for usage in text",
"setAsCover": "Make cover",
"unsetAsCover": "Remove cover",
@ -710,7 +710,7 @@
"title": "Comments",
"loading": "Loading comments…",
"edited": "edited {date}",
"creating": "Creating comment…",
"creating": "Criando comentário…",
"placeholder": "Adicione seu comentário…",
"comment": "Comentário",
"delete": "Apagar este comentário",
@ -720,27 +720,27 @@
},
"deferDueDate": {
"title": "Defer due date",
"1day": "1 day",
"3days": "3 days",
"1week": "1 week"
"1day": "1 dia",
"3days": "3 dias",
"1week": "1 semana"
},
"description": {
"placeholder": "Click here to enter a description…",
"empty": "No description available yet."
"placeholder": "Clique aqui para inserir uma descrição…",
"empty": "Nenhuma descrição disponível ainda."
},
"assignee": {
"placeholder": "Type to assign a user…",
"placeholder": "Digite para atribuir um usuário…",
"selectPlaceholder": "Assign this user",
"assignSuccess": "The user has been assigned successfully.",
"unassignSuccess": "The user has been unassigned successfully."
"assignSuccess": "O usuário foi atribuído com sucesso.",
"unassignSuccess": "O usuário foi desatribuído com sucesso."
},
"label": {
"placeholder": "Type to add a new label…",
"createPlaceholder": "Add this as new label",
"addSuccess": "The label has been added successfully.",
"createSuccess": "The label has been created successfully.",
"removeSuccess": "The label has been removed successfully.",
"addCreateSuccess": "The label has been created and added successfully.",
"placeholder": "Digite para adicionar uma nova etiqueta…",
"createPlaceholder": "Adicionar como nova etiqueta",
"addSuccess": "A etiqueta foi adicionada com sucesso.",
"createSuccess": "A etiqueta foi criada com sucesso.",
"removeSuccess": "A etiqueta foi removida com sucesso.",
"addCreateSuccess": "A etiqueta foi criada e adicionada com sucesso.",
"delete": {
"header": "Delete this label",
"text1": "Are you sure you want to delete this label?",
@ -748,12 +748,12 @@
}
},
"priority": {
"unset": "Unset",
"low": "Low",
"medium": "Medium",
"unset": "Indefinida",
"low": "Baixa",
"medium": "Média",
"high": "High",
"urgent": "Urgent",
"doNow": "DO NOW"
"urgent": "Urgente",
"doNow": "FAÇA AGORA"
},
"relation": {
"add": "Add a New Task Relation",
@ -766,7 +766,7 @@
"delete": "Delete Task Relation",
"deleteText1": "Are you sure you want to delete this task relation?",
"select": "Select a relation kind",
"taskRequired": "Please select a task or enter a new task title.",
"taskRequired": "Por favor, selecione uma tarefa ou digite um novo título para a tarefa.",
"kinds": {
"subtask": "Subtask | Subtasks",
"parenttask": "Parent Task | Parent Tasks",
@ -782,24 +782,24 @@
}
},
"repeat": {
"everyDay": "Every Day",
"everyWeek": "Every Week",
"everyMonth": "Every Month",
"mode": "Repeat mode",
"everyDay": "Diariamente",
"everyWeek": "Toda semana",
"everyMonth": "Todo mês",
"mode": "Modo repetição",
"monthly": "Monthly",
"fromCurrentDate": "From Current Date",
"each": "Each",
"specifyAmount": "Specify an amount…",
"hours": "Hours",
"days": "Days",
"weeks": "Weeks",
"months": "Months",
"years": "Years",
"hours": "Horas",
"days": "Dias",
"weeks": "Semanas",
"months": "Meses",
"years": "Anos",
"invalidAmount": "Please enter more than 0."
},
"quickAddMagic": {
"hint": "You can use Quick Add Magic",
"what": "What?",
"what": "O quê?",
"title": "Quick Add Magic",
"intro": "When creating a task, you can use special keywords to directly add attributes to the newly created task. This allows to add commonly used attributes to tasks much faster.",
"multiple": "You can use this multiple times.",
@ -807,14 +807,14 @@
"label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.",
"priority2": "The higher the number, the higher the priority.",
"priority1": "Para definir a prioridade de uma tarefa, adicione um número de 1 a 5, precedido de um {prefix}.",
"priority2": "Quanto maior o número, maior a prioridade.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "This will return an error if the list does not exist.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date and time",
"dateAndTime": "Data e hora",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date",
"dateCurrentYear": "will use the current year",
@ -912,7 +912,7 @@
},
"update": {
"available": "There is an update for Vikunja available!",
"do": "Update Now"
"do": "Atualizar agora"
},
"menu": {
"edit": "Editar",

View File

@ -1,6 +1,5 @@
import {computed, ref, watch} from 'vue'
import type dayjs from 'dayjs'
import type ILocale from 'dayjs/locale/*'
import {i18n, type SupportedLocale, type ISOLanguage} from '@/i18n'
@ -36,7 +35,7 @@ export function useDayjsLanguageSync(dayjsGlobal: typeof dayjs) {
const dayjsLanguageLoaded = ref(false)
watch(
() => i18n.global.locale,
() => i18n.global.locale.value,
async (currentLanguage: string) => {
if (!dayjsGlobal) {
return

View File

@ -15,7 +15,7 @@ import Notifications from '@kyvg/vue3-notification'
import './registerServiceWorker'
// i18n
import {i18n} from './i18n'
import {i18n, setLanguage} from './i18n'
declare global {
interface Window {
@ -106,4 +106,6 @@ app.use(pinia)
app.use(router)
app.use(i18n)
app.mount('#app')
setLanguage().then(() => {
app.mount('#app')
})

View File

@ -1,6 +1,7 @@
import {parseDate} from '../helpers/time/parseDate'
import {PRIORITIES} from '@/constants/priorities'
import {REPEAT_TYPES, type IRepeatAfter, type IRepeatType} from '@/types/IRepeatAfter'
import {getQuickAddMagicMode} from '@/helpers/quickAddMagicMode'
const VIKUNJA_PREFIXES: Prefixes = {
label: '*',
@ -71,11 +72,10 @@ export const parseTaskText = (text: string, prefixesMode: PrefixMode = PrefixMod
return result
}
result.labels = getItemsFromPrefix(text, prefixes.label)
result.labels = getLabelsFromPrefix(text, prefixes.label) ?? []
result.text = cleanupItemText(result.text, result.labels, prefixes.label)
const lists: string[] = getItemsFromPrefix(result.text, prefixes.list)
result.list = lists.length > 0 ? lists[0] : null
result.list = getListFromPrefix(result.text, prefixes.list)
result.text = result.list !== null ? cleanupItemText(result.text, [result.list], prefixes.list) : result.text
result.priority = getPriority(result.text, prefixes.priority)
@ -130,6 +130,29 @@ const getItemsFromPrefix = (text: string, prefix: string): string[] => {
return Array.from(new Set(items))
}
export const getListFromPrefix = (text: string, listPrefix: string | null = null): string | null => {
if (listPrefix === null) {
const prefixes = PREFIXES[getQuickAddMagicMode()]
if (prefixes === undefined) {
return null
}
listPrefix = prefixes.list
}
const lists: string[] = getItemsFromPrefix(text, listPrefix)
return lists.length > 0 ? lists[0] : null
}
export const getLabelsFromPrefix = (text: string, listPrefix: string | null = null): string[] | null => {
if (listPrefix === null) {
const prefixes = PREFIXES[getQuickAddMagicMode()]
if (prefixes === undefined) {
return null
}
listPrefix = prefixes.label
}
return getItemsFromPrefix(text, listPrefix)
}
const getPriority = (text: string, prefix: string): number | null => {
const ps = getItemsFromPrefix(text, prefix)
if (ps.length === 0) {

View File

@ -311,9 +311,11 @@ export const useAuthStore = defineStore('auth', () => {
const cancel = setModuleLoading(setIsLoadingGeneralSettings)
try {
saveLanguage(settings.language)
await userSettingsService.update(settings)
const updateSettingsPromise = userSettingsService.update(settings)
const saveLanguagePromise = saveLanguage(settings.language)
await updateSettingsPromise
setUserSettings({...settings})
await saveLanguagePromise
if (showMessage) {
success({message: i18n.global.t('user.settings.general.savedSuccess')})
}

View File

@ -1,5 +1,5 @@
import {computed, ref} from 'vue'
import {defineStore, acceptHMRUpdate} from 'pinia'
import {acceptHMRUpdate, defineStore} from 'pinia'
import router from '@/router'
import {formatISO} from 'date-fns'
@ -14,8 +14,8 @@ import {parseTaskText} from '@/modules/parseTaskText'
import TaskAssigneeModel from '@/models/taskAssignee'
import LabelTaskModel from '@/models/labelTask'
import TaskModel from '@/models/task'
import LabelTask from '@/models/labelTask'
import TaskModel from '@/models/task'
import LabelModel from '@/models/label'
import type {ILabel} from '@/modelTypes/ILabel'
@ -306,6 +306,20 @@ export const useTaskStore = defineStore('task', () => {
return response
}
async function ensureLabelsExist(labels: string[]): Promise<LabelModel[]> {
const all = [...new Set(labels)]
const mustCreateLabel = all.map(async labelTitle => {
let label = validateLabel(Object.values(labelStore.labels), labelTitle)
if (typeof label === 'undefined') {
// label not found, create it
const labelModel = new LabelModel({title: labelTitle})
label = await labelStore.createLabel(labelModel)
}
return label
})
return Promise.all(mustCreateLabel)
}
// Do everything that is involved in finding, creating and adding the label to the task
async function addLabelsToTask(
@ -316,16 +330,8 @@ export const useTaskStore = defineStore('task', () => {
return task
}
const labelAddsToWaitFor = parsedLabels.map(async labelTitle => {
let label = validateLabel(Object.values(labelStore.labels), labelTitle)
if (typeof label === 'undefined') {
// label not found, create it
const labelModel = new LabelModel({title: labelTitle})
label = await labelStore.createLabel(labelModel)
}
return addLabelToTask(task, label)
})
const labels = await ensureLabelsExist(parsedLabels)
const labelAddsToWaitFor = labels.map(async l => addLabelToTask(task, l))
// This waits until all labels are created and added to the task
await Promise.all(labelAddsToWaitFor)
@ -402,11 +408,10 @@ export const useTaskStore = defineStore('task', () => {
const taskService = new TaskService()
try {
const createdTask = await taskService.create(task)
const result = await addLabelsToTask({
return await addLabelsToTask({
task: createdTask,
parsedLabels: parsedTask.labels,
})
return result
} finally {
cancel()
}
@ -437,6 +442,8 @@ export const useTaskStore = defineStore('task', () => {
addLabelsToTask,
createNewTask,
setCoverImage,
findListId,
ensureLabelsExist,
}
})

View File

@ -2,13 +2,15 @@
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import legacyFn from '@vitejs/plugin-legacy'
import { URL, fileURLToPath } from "url";
import { dirname, resolve } from "path";
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import {VitePWA} from 'vite-plugin-pwa'
import {visualizer} from 'rollup-plugin-visualizer'
import svgLoader from 'vite-svg-loader'
import postcssPresetEnv from "postcss-preset-env";
import { fileURLToPath, URL } from 'url'
const pathSrc = fileURLToPath(new URL('./src', import.meta.url))
@ -58,6 +60,13 @@ export default defineConfig({
// we don't need to optimize them again.
svgo: false,
}),
VueI18nPlugin({
// TODO: only install needed stuff
// Whether to install the full set of APIs, components, etc. provided by Vue I18n.
// By default, all of them will be installed.
fullInstall: true,
include: resolve(dirname(pathSrc), './src/i18n/lang/**'),
}),
VitePWA({
srcDir: 'src',
filename: 'sw.ts',