Compare commits

..

169 Commits

Author SHA1 Message Date
e5d04c98da
fix: test pnpm cache
Some checks failed
continuous-integration/drone/pr Build is failing
2022-09-21 17:29:37 +02:00
d76b526916
feat: use pnpm 2022-09-21 17:29:36 +02:00
f85a08afb4 fix(deps): update dependency pinia to v2.0.22 (#2400)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2400
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-21 15:16:23 +00:00
Dominik Pschenitschni
d67e5e386d feat: port label store to pinia | pinia 1/9 (#2391)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2391
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-09-21 14:23:57 +00:00
Dominik Pschenitschni
e91b5fde02 feat: NewTeam script setup (#2388)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2388
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-09-21 14:13:37 +00:00
Dominik Pschenitschni
ff5d1fc8c1 feat: ListNamespaces script setup (#2389)
Some checks failed
continuous-integration/drone/push Build is failing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2389
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-09-21 14:12:36 +00:00
ddabd7f63a chore(deps): update dependency autoprefixer to v10.4.12
Some checks reported errors
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build was killed
2022-09-21 00:03:32 +00:00
4c9a018c13 fix(deps): update dependency easymde to v2.18.0 (#2386)
Some checks reported errors
continuous-integration/drone/push Build was killed
Reviewed-on: #2386
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-20 15:38:56 +00:00
fadaac4ef1 chore(deps): update dependency vite-plugin-pwa to v0.13.0 (#2385)
Some checks reported errors
continuous-integration/drone/push Build was killed
Reviewed-on: #2385
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-20 15:12:32 +00:00
b06e3cac3f chore(deps): update typescript-eslint monorepo to v5.38.0 (#2383)
Some checks reported errors
continuous-integration/drone/push Build was killed
Reviewed-on: #2383
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-19 21:18:25 +00:00
1ecb186b7c chore(deps): update dependency vite to v3.1.3 (#2382)
Some checks reported errors
continuous-integration/drone/push Build was killed
Reviewed-on: #2382
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-19 15:01:12 +00:00
070ef7e5aa chore(deps): update dependency @vitejs/plugin-legacy to v2.2.0 (#2381)
Some checks reported errors
continuous-integration/drone/push Build was killed
Reviewed-on: #2381
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-19 15:00:19 +00:00
e8613b48fc chore(deps): update dependency netlify-cli to v11.8.0 (#2380)
Some checks reported errors
continuous-integration/drone/push Build was killed
Reviewed-on: #2380
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-19 08:08:09 +00:00
de7617fbaf chore(deps): update caniuse-and-related to v4.21.4 (#2379)
Some checks reported errors
continuous-integration/drone/push Build was killed
Reviewed-on: #2379
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-19 08:04:45 +00:00
0360cd0867 chore(deps): update dependency vite-plugin-pwa to v0.12.8 (#2375)
Some checks reported errors
continuous-integration/drone/push Build was killed
Reviewed-on: #2375
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-18 19:41:31 +00:00
54e9513c14 chore(deps): update dependency esbuild to v0.15.8
Some checks reported errors
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build was killed
2022-09-18 19:03:53 +00:00
fc0cf3fc87 chore(deps): update dependency vitest to v0.23.4
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-09-18 16:37:39 +00:00
0fccb3d5a9 fix(deps): update dependency @types/sortablejs to v1.15.0
Some checks reported errors
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build was killed
2022-09-18 08:03:50 +00:00
9134269ead chore(deps): update dependency vite to v3.1.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-09-17 07:03:27 +00:00
ba4913e2cb [skip ci] Updated translations via Crowdin 2022-09-17 00:31:23 +00:00
2eff239f9e chore(deps): update dependency eslint-plugin-vue to v9.5.1 (#2373)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2373
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-16 20:07:49 +00:00
fa77b20c13 chore(deps): update dependency eslint-plugin-vue to v9.5.0 (#2371)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #2371
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-16 15:51:37 +00:00
Dominik Pschenitschni
3b713dede2 [skip ci] Updated translations via Crowdin 2022-09-16 00:30:52 +00:00
ad6b335d41 feat: namespace settings archive script setup
Some checks failed
continuous-integration/drone/push Build is failing
2022-09-15 20:46:26 +00:00
221edb2086 fix(deps): update sentry-javascript monorepo to v7.13.0
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-15 14:53:22 +00:00
565765537d chore(deps): pin dependency @types/dompurify to 2.3.4
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-09-15 13:02:49 +00:00
f70b1d2902 feat: color the task color button when the task has a color set (#2331)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2331
Reviewed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-09-15 12:46:12 +00:00
4fce71f729
fix: remove margin from the color bubble component itself
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-15 14:37:07 +02:00
84260841be feat(list): add info dialoge to show list description (#2368)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #2368
Reviewed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-09-15 12:36:43 +00:00
6d9c4a7aa0
chore: improve types
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-15 14:32:29 +02:00
b24d5f2dce fix(quick add magic): time parsing for certain conditions (#2367)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #2367
Reviewed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-09-15 11:59:29 +00:00
2683fec0a6
feat: show the task color bubble everywhere
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-15 13:56:14 +02:00
2df2bd38e2
fix: only try to save user settings when a user is authenticated
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-15 12:36:19 +02:00
91976e23f9
fix: redirect to login when the jwt token expires 2022-09-15 12:35:53 +02:00
Dominik Pschenitschni
602ab8379e fix: vue-i18n global scope (#2366)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2366
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-09-15 09:54:01 +00:00
92f24e59a7
fix: don't parse dates in urls
All checks were successful
continuous-integration/drone/push Build is passing
Resolves #2353
2022-09-15 10:23:37 +02:00
49217889b5
fix: bucket title edit success message appearing twice
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-15 10:08:17 +02:00
9c367877f4 chore(deps): update dependency vite to v3.1.1 (#2365)
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #2365
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-15 08:03:08 +00:00
064001e259 chore(deps): update dependency postcss-preset-env to v7.8.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-09-15 06:03:05 +00:00
0316656d81 chore(deps): update dependency autoprefixer to v10.4.11 (#2363)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2363
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-14 19:18:06 +00:00
a18c6ab8d8
feat: move the update available dialoge always to the bottom
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-14 19:06:34 +02:00
bdf992c9bf
feat: color the color button icon instead of the button itself
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-14 18:56:51 +02:00
51c806c12b
feat: color the task color button when the task has a color set
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-14 18:43:56 +02:00
a6e9b36bd6 feat(link shares): allows switching the initial view by passing a query parameter (#2335)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2335
Reviewed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-09-14 16:37:54 +00:00
854068fff9 chore(deps): update dependency cypress to v10.8.0 (#2359)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2359
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-14 14:46:03 +00:00
6576b6148c
feat: move the url link to the bottom of the items
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-14 16:31:05 +02:00
224cea33ce
feat: make share link name italic
Some checks reported errors
continuous-integration/drone/pr Build was killed
2022-09-14 16:27:57 +02:00
7e7fa807fd
chore: set more expressive variable names for available views dropdowns
Some checks reported errors
continuous-integration/drone/pr Build was killed
2022-09-14 16:17:31 +02:00
Dominik Pschenitschni
f083f181e2 fix: only warn once if triggeredNotifications are not supported (#2344)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2344
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-09-14 12:45:21 +00:00
2b82df5dbd
Merge branch 'main' into feature/redirect-to-specific-view
All checks were successful
continuous-integration/drone/pr Build is passing
# Conflicts:
#	src/components/sharing/linkSharing.vue
2022-09-13 22:07:50 +02:00
e67fc7fb7e
fix: use proper computed for available views list
Some checks failed
continuous-integration/drone/pr Build is failing
2022-09-13 22:04:24 +02:00
Dominik Pschenitschni
db8b8812af feat: use v-model more consequent (#2356)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2356
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-09-13 15:30:33 +00:00
2013924949 chore(deps): update dependency autoprefixer to v10.4.10 (#2355)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2355
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-13 15:17:25 +00:00
1a11b43ca8 feat: improve models
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-13 14:59:02 +00:00
61427987c2 fix(deps): update dependency date-fns to v2.29.3 (#2354)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2354
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-13 13:26:48 +00:00
Dominik Pschenitschni
7b398f73f6 feat: add fallback for useCopyToClipboard (#2343)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2343
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-09-13 12:56:29 +00:00
64726a6421 fix(deps): update dependency blurhash to v2 (#2351)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2351
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-13 12:54:46 +00:00
53858e0c31 chore(deps): update typescript-eslint monorepo to v5.37.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-09-12 18:02:50 +00:00
2f0f648d28 chore(deps): update dependency eslint to v8.23.1
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-12 06:14:59 +00:00
6e026cc7cc chore(deps): update dependency netlify-cli to v11.7.1
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-12 06:13:48 +00:00
d0fefd3c08 chore(deps): update dependency caniuse-lite to v1.0.30001397
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-12 06:12:28 +00:00
4dd397e3d2 chore(deps): update dependency autoprefixer to v10.4.9
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-09-12 00:03:06 +00:00
2a41ccb980 [skip ci] Updated translations via Crowdin 2022-09-11 00:31:16 +00:00
38d72b59df chore(deps): update dependency vitest to v0.23.2
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2022-09-10 08:02:50 +00:00
add080d214 [skip ci] Updated translations via Crowdin 2022-09-10 00:31:03 +00:00
65f9def438 chore(deps): update dependency typescript to v4.8.3 (#2341)
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #2341
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-09 06:57:05 +00:00
f1a726550e [skip ci] Updated translations via Crowdin 2022-09-09 00:31:14 +00:00
26d02d5593
feat: programmatically generate list of available views
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-08 16:29:29 +02:00
5f678e2449
chore: remove unused id
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-08 16:26:51 +02:00
23598dd2ee
fix: introduce a ListView type to properly type all available list views
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-08 14:11:19 +02:00
d91d1fecf1
chore: remove &nbsp;
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-08 13:58:49 +02:00
7a457eb161
feat(link shares): cleanup link share table
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-08 13:56:52 +02:00
d3171b59be
feat(link shares): allows switching the initial view by passing a query parameter 2022-09-08 13:56:50 +02:00
63f5f446fd feat(link shares): hide the logo if a query parameter was passed
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-08 09:56:09 +00:00
b8d77a617b
chore: rearrange non-dev dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-08 11:34:48 +02:00
d822709991
chore: automerge renovate dev dependency updates
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-08 11:31:51 +02:00
86a04da470 fix(deps): update dependency vue to v3.2.39
Some checks failed
continuous-integration/drone/push Build is failing
2022-09-08 08:25:34 +00:00
e6fbf1cb50 chore(deps): update dependency vue-tsc to v0.40.13
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-09-08 04:03:13 +00:00
4fe6186ee6 chore(deps): update dependency sass to v1.54.9 (#2336)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2336
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-07 22:09:57 +00:00
6bf5f6efd4
fix: dragging a list on mobile Safari
Some checks failed
continuous-integration/drone/push Build is failing
2022-09-07 23:11:44 +02:00
03f448457a chore(deps): update dependency vue-tsc to v0.40.11 (#2333)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2333
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-07 18:23:17 +00:00
7f6f8963e7 feat: add keyboard shortcut to toggle task description edit (#2332)
Some checks failed
continuous-integration/drone/push Build is failing
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #2332
Reviewed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
2022-09-07 17:55:59 +00:00
65fd2f14a0
feat: show user display name when searching for assignees on a list
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-07 17:05:44 +02:00
2e84c27d1e chore(deps): update dependency vite-svg-loader to v3.6.0 (#2327)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2327
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-07 14:29:59 +00:00
ee79a1d604 chore(deps): update dependency postcss-preset-env to v7.8.1 (#2328)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2328
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-07 13:23:59 +00:00
d17428d4d0 chore(deps): update dependency vue-tsc to v0.40.10 (#2326)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2326
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-07 13:23:30 +00:00
bca53ec8ae chore(deps): update dependency vite-plugin-pwa to v0.12.7 (#2325)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2325
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-07 13:22:35 +00:00
fef1af6ce7 chore(deps): update dependency @vue/eslint-config-typescript to v11.0.1 (#2324)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2324
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-06 15:06:58 +00:00
3209206260 fix(deps): pin dependency @types/lodash.clonedeep to 4.5.7 (#2323)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2323
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-06 12:20:22 +00:00
d819b9b0ba
fix: don't encode attachment upload file blob as json
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-06 13:02:49 +02:00
e95904351f
feat: add sponsor logo to readme (relm)
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-06 12:02:11 +02:00
a541afdf9d chore(deps): update dependency vue-tsc to v0.40.9 (#2322)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2322
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-06 09:27:57 +00:00
5d189035f2 chore(deps): update typescript-eslint monorepo to v5.36.2 (#2321)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2321
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-06 09:27:30 +00:00
dbea1f7a51 feat: convert services and models to ts (#1798)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #1798
Reviewed-by: konrad <k@knt.li>
2022-09-06 09:26:48 +00:00
54de368642
fix: use typed useStore
All checks were successful
continuous-integration/drone/pr Build is passing
2022-09-05 20:10:32 +02:00
878b5bf236
fix: defaultListId 2022-09-05 19:01:42 +02:00
b4cba6f7d9
fix: mutation error in TaskDetailView 2022-09-05 19:01:42 +02:00
c06b781837
fix: don't try to set the bucket of a task when it was moved to a new list 2022-09-05 19:01:42 +02:00
9616badc33
fix: don't push a select event when nothing was selected 2022-09-05 19:01:42 +02:00
49f3b928cb
chore: minor fixes 2022-09-05 19:01:42 +02:00
7d4ba6249e
feat: add modelTypes 2022-09-05 17:57:21 +02:00
8416b1f448
fix: use new assignData method for default data 2022-09-05 17:57:21 +02:00
8be1f81848
fix: use IAbstract to extend model interface 2022-09-05 17:57:20 +02:00
d36577c04e
fix: mark abstractModel and abstractService abstract 2022-09-05 17:57:19 +02:00
2445f0eec8
chore: align docker cypress image version with drone 2022-09-05 17:43:56 +02:00
96f5f00c07
fix: use definite assignment assertion operator
We used declare which is the wrong use-case for this. See: https://www.typescriptlang.org/docs/handbook/2/classes.html#--strictpropertyinitialization
2022-09-05 17:43:56 +02:00
041a1a4cc0
move constants 2022-09-05 17:43:55 +02:00
4a50e6aae2
fix: improve some types 2022-09-05 17:43:55 +02:00
f9b51306c3
fix: createNewTask typing 2022-09-05 17:43:24 +02:00
106abfc842
fix: merge duplicate types 2022-09-05 17:43:24 +02:00
3ba423ed23
fix: use correct model for generics 2022-09-05 17:43:23 +02:00
244478400a
feat: improve store typing 2022-09-05 17:43:23 +02:00
a6b96f857d
feat: extend mode interface from class instead from interface 2022-09-05 17:43:22 +02:00
80eaf38090
fix: add lodash.clonedeep types 2022-09-05 17:43:22 +02:00
79e7e4a8ae
feat: use lib ESNext setting for typescript 2022-09-05 17:43:22 +02:00
3766b5e51b
feat: improve store and model typing 2022-09-05 17:43:22 +02:00
c9e85cb52b
feat: improve types 2022-09-05 17:38:37 +02:00
42e72d14a4
chore: better variable typing 2022-09-05 17:38:37 +02:00
6f93d6343c
chore: remove unnecessary defineComponent 2022-09-05 17:38:37 +02:00
4a247b2a7d
chore: remove global mixing 2022-09-05 17:38:11 +02:00
e93f95f8c2 fix(deps): update vueuse to v9.2.0 (#2320)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2320
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-05 15:30:31 +00:00
b0ee316a26
chore: remove date mixins 2022-09-05 16:37:37 +02:00
332acf012c
feat: function attribute typing 2022-09-05 16:37:37 +02:00
8fb00653e4
feat: constants 2022-09-05 16:37:37 +02:00
af630d3b8c
chore: improve type imports 2022-09-05 16:37:36 +02:00
797de0c543
feat: add properties to models 2022-09-05 16:37:36 +02:00
74ad6e65e8
feat: convert abstractService to ts 2022-09-05 16:37:35 +02:00
02ddf90cbb chore(deps): update dependency vite to v3.1.0 (#2319)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2319
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-05 11:16:42 +00:00
59801d797b chore(deps): update dependency @vitejs/plugin-vue to v3.1.0 (#2318)
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #2318
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-05 11:16:00 +00:00
d7b7328a0e chore(deps): update dependency @vitejs/plugin-legacy to v2.1.0 (#2317)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2317
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-05 10:53:58 +00:00
377201dda9 chore(deps): update dependency vitest to v0.23.1 (#2316)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2316
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-05 09:30:13 +00:00
5b8ebba4c0 chore(deps): update dependency vue-tsc to v0.40.7 (#2315)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2315
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-05 07:49:34 +00:00
9657b6b2d3 chore(deps): update dependency caniuse-lite to v1.0.30001390 (#2314)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2314
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-05 07:48:57 +00:00
Dominik Pschenitschni
6e4a3ff199 fix: authenticate per request (#2258)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2258
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-09-04 14:30:11 +00:00
3e770e11f1 chore(deps): update dependency esbuild to v0.15.7 (#2313)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2313
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-04 13:13:09 +00:00
48af80dcf9 chore(deps): update dependency vitest to v0.23.0 (#2312)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2312
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-04 12:12:18 +00:00
b3300f5552 chore(deps): update dependency rollup-plugin-visualizer to v5.8.1 (#2311)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2311
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-03 21:05:30 +00:00
9bc04a3ffc chore(deps): update dependency vue-tsc to v0.40.6 (#2310)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2310
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-03 21:04:51 +00:00
b77b4105a0 chore(deps): update dependency vite-plugin-pwa to v0.12.6 (#2309)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2309
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-03 10:33:01 +00:00
Dominik Pschenitschni
f6437c81da feat: list settings edit script setup (#1988)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #1988
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-09-02 15:13:32 +00:00
deef7106e6 fix(deps): update sentry-javascript monorepo to v7.12.1 (#2308)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2308
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-02 10:27:28 +00:00
2521102712 fix(deps): update dependency @kyvg/vue3-notification to v2.4.1 (#2305)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2305
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-02 07:38:40 +00:00
ed02c6c81c chore(deps): update font awesome to v6.2.0 (#2303)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2303
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-02 06:49:20 +00:00
5c5f3d88af chore(deps): update dependency typescript to v4.8.2 (#2301)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2301
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-02 06:48:43 +00:00
1409750a30 chore(deps): update dependency vite-svg-loader to v3.5.1 (#2302)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2302
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-02 06:48:07 +00:00
5923bd8225 chore(deps): update typescript-eslint monorepo to v5.36.1 (#2304)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2304
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-02 06:47:13 +00:00
a5629bd556 fix(deps): update dependency dompurify to v2.4.0 (#2306)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2306
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-02 06:46:25 +00:00
2e2eebf206 fix(deps): update sentry-javascript monorepo to v7.12.0 (#2307)
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #2307
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-02 06:45:28 +00:00
e8572fe13b chore(deps): update dependency eslint-plugin-vue to v9.4.0 (#2300)
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #2300
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-02 06:44:49 +00:00
308971ad05 chore(deps): update dependency cypress to v10.7.0 (#2298)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2298
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 16:19:19 +00:00
67cee63cf0 chore(deps): update dependency eslint to v8.23.0 (#2299)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2299
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 16:19:16 +00:00
5a92228b96 chore(deps): update dependency @faker-js/faker to v7.5.0 (#2297)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2297
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 16:17:24 +00:00
Dominik Pschenitschni
ff655808b3 feat: settings background script setup (#2104)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2104
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-09-01 16:09:50 +00:00
a8d4892a0f chore(deps): update dependency @cypress/vue to v4.2.0 (#2296)
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #2296
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 15:13:11 +00:00
c936b92654 fix(deps): update vueuse to v9.1.1 (#2295)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2295
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 14:26:05 +00:00
d323ed5b4b fix(deps): update dependency vue-router to v4.1.5 (#2294)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2294
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 14:16:43 +00:00
91ad503a11 fix(deps): update dependency vue to v3.2.38 (#2293)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2293
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 13:44:28 +00:00
35081befae chore(deps): update dependency vue-tsc to v0.40.5 (#2292)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2292
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 13:36:46 +00:00
17607df6ff fix(deps): update dependency easymde to v2.17.0 (#2283)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2283
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 12:57:42 +00:00
149696b7de chore(deps): update dependency rollup-plugin-visualizer to v5.8.0 (#2282)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2282
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 12:53:19 +00:00
4582e98795 chore(deps): update dependency vite-plugin-pwa to v0.12.4 (#2291)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2291
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 12:46:37 +00:00
d6f82955a6 chore(deps): update dependency esbuild to v0.15.6 (#2290)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2290
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 12:37:11 +00:00
270432afe4 fix(deps): update dependency date-fns to v2.29.2 (#2277)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2277
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 11:24:52 +00:00
4d3b7c8759 chore(deps): update dependency vite to v3.0.9 (#2279)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2279
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 11:24:28 +00:00
c4f3e09cc7 chore(deps): update dependency netlify-cli to v11 (#2287)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2287
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 11:22:52 +00:00
bdd5ea27ac fix(deps): update dependency marked to v4.1.0 (#2284)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2284
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 11:22:19 +00:00
65b694d8e6 chore(deps): update dependency rollup to v2.79.0 (#2278)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2278
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 11:19:32 +00:00
78abe20f7d chore(deps): update dependency caniuse-lite to v1.0.30001387 (#2285)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2285
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 11:19:02 +00:00
7163dc351b chore(deps): update dependency sass to v1.54.8 (#2281)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #2281
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-09-01 11:18:24 +00:00
286 changed files with 4564 additions and 3472 deletions

View File

@ -42,3 +42,7 @@ pnpm run build
```shell ```shell
pnpm run lint pnpm run lint
``` ```
## Sponsors
[![Relm](https://vikunja.io/images/sponsors/relm.png)](https://relm.us)

View File

@ -9,7 +9,7 @@ services:
ports: ports:
- 3456:3456 - 3456:3456
cypress: cypress:
image: cypress/browsers:node12.18.3-chrome87-ff82 image: cypress/browsers:node16.14.0-chrome99-ff97
volumes: volumes:
- ..:/project - ..:/project
- $HOME/.cache:/home/node/.cache/ - $HOME/.cache:/home/node/.cache/

View File

@ -59,7 +59,7 @@ describe('Lists', () => {
.click() .click()
cy.get('#title') cy.get('#title')
.type(`{selectall}${newListName}`) .type(`{selectall}${newListName}`)
cy.get('footer.modal-card-foot .button') cy.get('footer.card-footer .button')
.contains('Save') .contains('Save')
.click() .click()

View File

@ -63,7 +63,7 @@ describe('Namepaces', () => {
.should('equal', newNamespaces[0].title) // wait until the namespace data is loaded .should('equal', newNamespaces[0].title) // wait until the namespace data is loaded
cy.get('#namespacetext') cy.get('#namespacetext')
.type(`{selectall}${newNamespaceName}`) .type(`{selectall}${newNamespaceName}`)
cy.get('footer.modal-card-foot .button') cy.get('footer.card-footer .button')
.contains('Save') .contains('Save')
.click() .click()

View File

@ -11,47 +11,54 @@
"build:dev": "vite build -m development --outDir dist-dev/", "build:dev": "vite build -m development --outDir dist-dev/",
"lint": "eslint --ignore-pattern '*.test.*' ./src --ext .vue,.js,.ts", "lint": "eslint --ignore-pattern '*.test.*' ./src --ext .vue,.js,.ts",
"cypress:open": "cypress open", "cypress:open": "cypress open",
"test:unit": "vitest", "test:unit": "vitest --run",
"test:unit-watch": "vitest watch", "test:unit-watch": "vitest watch",
"test:frontend": "cypress run", "test:frontend": "cypress run",
"typecheck": "vue-tsc --noEmit && vue-tsc --noEmit -p tsconfig.vitest.json --composite false", "typecheck": "vue-tsc --noEmit && vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"browserslist:update": "npx browserslist@latest --update-db" "browserslist:update": "npx browserslist@latest --update-db"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-svg-core": "6.2.0",
"@fortawesome/free-regular-svg-icons": "6.2.0",
"@fortawesome/free-solid-svg-icons": "6.2.0",
"@fortawesome/vue-fontawesome": "3.0.1",
"@github/hotkey": "2.0.1", "@github/hotkey": "2.0.1",
"@kyvg/vue3-notification": "2.3.6", "@kyvg/vue3-notification": "2.4.1",
"@sentry/tracing": "7.11.1", "@sentry/tracing": "7.13.0",
"@sentry/vue": "7.11.1", "@sentry/vue": "7.13.0",
"@types/is-touch-device": "1.0.0", "@types/is-touch-device": "1.0.0",
"@types/sortablejs": "1.13.0", "@types/lodash.clonedeep": "4.5.7",
"@vueuse/core": "9.1.0", "@types/sortablejs": "1.15.0",
"@vueuse/router": "9.1.0", "@vueuse/core": "9.2.0",
"blurhash": "1.1.5", "@vueuse/router": "9.2.0",
"axios": "0.27.2",
"blurhash": "2.0.0",
"bulma-css-variables": "0.9.33", "bulma-css-variables": "0.9.33",
"camel-case": "4.1.2", "camel-case": "4.1.2",
"codemirror": "5.65.7", "codemirror": "5.65.7",
"date-fns": "2.29.1", "date-fns": "2.29.3",
"dompurify": "2.3.10", "dompurify": "2.4.0",
"easymde": "2.16.1", "easymde": "2.18.0",
"flatpickr": "4.6.13", "flatpickr": "4.6.13",
"flexsearch": "0.7.21", "flexsearch": "0.7.21",
"highlight.js": "11.6.0", "highlight.js": "11.6.0",
"is-touch-device": "1.0.1", "is-touch-device": "1.0.1",
"lodash.clonedeep": "4.5.0", "lodash.clonedeep": "4.5.0",
"lodash.debounce": "4.0.8", "lodash.debounce": "4.0.8",
"marked": "4.0.18", "marked": "4.1.0",
"minimist": "1.2.6", "minimist": "1.2.6",
"pinia": "2.0.22",
"register-service-worker": "1.7.2", "register-service-worker": "1.7.2",
"snake-case": "3.0.4", "snake-case": "3.0.4",
"sortablejs": "1.15.0", "sortablejs": "1.15.0",
"ufo": "0.8.5", "ufo": "0.8.5",
"v-tooltip": "4.0.0-beta.17", "v-tooltip": "4.0.0-beta.17",
"vue": "3.2.37", "vue": "3.2.39",
"vue-advanced-cropper": "2.8.3", "vue-advanced-cropper": "2.8.3",
"vue-drag-resize": "2.0.3", "vue-drag-resize": "2.0.3",
"vue-flatpickr-component": "9.0.6", "vue-flatpickr-component": "9.0.6",
"vue-i18n": "9.2.2", "vue-i18n": "9.2.2",
"vue-router": "4.1.3", "vue-router": "4.1.5",
"vuex": "4.0.2", "vuex": "4.0.2",
"workbox-precaching": "6.5.4", "workbox-precaching": "6.5.4",
"zhyswan-vuedraggable": "4.1.3" "zhyswan-vuedraggable": "4.1.3"
@ -59,42 +66,38 @@
"devDependencies": { "devDependencies": {
"@4tw/cypress-drag-drop": "2.2.1", "@4tw/cypress-drag-drop": "2.2.1",
"@cypress/vite-dev-server": "3.1.1", "@cypress/vite-dev-server": "3.1.1",
"@cypress/vue": "4.1.0", "@cypress/vue": "4.2.0",
"@faker-js/faker": "7.4.0", "@faker-js/faker": "7.5.0",
"@fortawesome/fontawesome-svg-core": "6.1.2", "@types/dompurify": "2.3.4",
"@fortawesome/free-regular-svg-icons": "6.1.2",
"@fortawesome/free-solid-svg-icons": "6.1.2",
"@fortawesome/vue-fontawesome": "3.0.1",
"@types/flexsearch": "0.7.3", "@types/flexsearch": "0.7.3",
"@typescript-eslint/eslint-plugin": "5.33.1", "@typescript-eslint/eslint-plugin": "5.38.0",
"@typescript-eslint/parser": "5.33.1", "@typescript-eslint/parser": "5.38.0",
"@vitejs/plugin-legacy": "2.0.1", "@vitejs/plugin-legacy": "2.2.0",
"@vitejs/plugin-vue": "3.0.3", "@vitejs/plugin-vue": "3.1.0",
"@vue/eslint-config-typescript": "11.0.0", "@vue/eslint-config-typescript": "11.0.1",
"@vue/test-utils": "2.0.2", "@vue/test-utils": "2.0.2",
"@vue/tsconfig": "0.1.3", "@vue/tsconfig": "0.1.3",
"autoprefixer": "10.4.8", "autoprefixer": "10.4.12",
"axios": "0.27.2", "browserslist": "4.21.4",
"browserslist": "4.21.3", "caniuse-lite": "1.0.30001406",
"caniuse-lite": "1.0.30001376", "cypress": "10.8.0",
"cypress": "10.6.0", "esbuild": "0.15.8",
"esbuild": "0.15.5", "eslint": "8.23.1",
"eslint": "8.22.0", "eslint-plugin-vue": "9.5.1",
"eslint-plugin-vue": "9.3.0",
"express": "4.18.1", "express": "4.18.1",
"happy-dom": "6.0.4", "happy-dom": "6.0.4",
"netlify-cli": "10.17.4", "netlify-cli": "11.8.0",
"postcss": "8.4.16", "postcss": "8.4.16",
"postcss-preset-env": "7.8.0", "postcss-preset-env": "7.8.2",
"rollup": "2.78.0", "rollup": "2.79.0",
"rollup-plugin-visualizer": "5.7.1", "rollup-plugin-visualizer": "5.8.1",
"sass": "1.54.4", "sass": "1.54.9",
"typescript": "4.7.4", "typescript": "4.8.3",
"vite": "3.0.8", "vite": "3.1.3",
"vite-plugin-pwa": "0.12.3", "vite-plugin-pwa": "0.13.0",
"vite-svg-loader": "3.4.0", "vite-svg-loader": "3.6.0",
"vitest": "0.22.1", "vitest": "0.23.4",
"vue-tsc": "0.40.1", "vue-tsc": "0.40.13",
"wait-on": "6.0.1", "wait-on": "6.0.1",
"workbox-cli": "6.5.4" "workbox-cli": "6.5.4"
}, },

File diff suppressed because it is too large Load Diff

View File

@ -19,6 +19,12 @@
"matchPackagePrefixes": [ "matchPackagePrefixes": [
"@vueuse/" "@vueuse/"
] ]
},
{
"matchDepTypes": ["devDependencies"],
"automerge": true,
"automergeStrategy": "squash",
"automergeType": "pr"
} }
] ]
} }

View File

@ -15,10 +15,10 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {computed, watch, Ref} from 'vue' import {computed, watch, type Ref} from 'vue'
import {useRouter} from 'vue-router' import {useRouter} from 'vue-router'
import {useRouteQuery} from '@vueuse/router' import {useRouteQuery} from '@vueuse/router'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import isTouchDevice from 'is-touch-device' import isTouchDevice from 'is-touch-device'
import {success} from '@/message' import {success} from '@/message'

View File

@ -12,12 +12,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' export default { inheritAttrs: false }
// see https://v3.vuejs.org/api/sfc-script-setup.html#usage-alongside-normal-script
export default defineComponent({
inheritAttrs: false,
})
</script> </script>
<script lang="ts" setup> <script lang="ts" setup>
@ -30,7 +25,7 @@ export default defineComponent({
// NOTE: Do NOT use buttons with @click to push routes. => Use router-links instead! // NOTE: Do NOT use buttons with @click to push routes. => Use router-links instead!
import {ref, watchEffect, computed, useAttrs, PropType} from 'vue' import { ref, watchEffect, computed, useAttrs, type PropType } from 'vue'
const BASE_BUTTON_TYPES_MAP = Object.freeze({ const BASE_BUTTON_TYPES_MAP = Object.freeze({
button: 'button', button: 'button',

View File

@ -110,10 +110,10 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {format} from 'date-fns' import { formatDate } from '@/helpers/time/formatDate'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
const exampleDate = format(new Date(), 'yyyy-MM-dd') const exampleDate = formatDate(new Date(), 'yyyy-MM-dd')
</script> </script>
<style scoped> <style scoped>

View File

@ -71,7 +71,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import {computed, ref, watch} from 'vue' import {computed, ref, watch} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import flatPickr from 'vue-flatpickr-component' import flatPickr from 'vue-flatpickr-component'
@ -85,7 +85,7 @@ import DatemathHelp from '@/components/date/datemathHelp.vue'
const store = useStore() const store = useStore()
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
const emit = defineEmits(['dateChanged', 'update:modelValue']) const emit = defineEmits(['update:modelValue'])
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
required: false, required: false,
@ -127,7 +127,6 @@ function emitChanged() {
dateFrom: from.value === '' ? null : from.value, dateFrom: from.value === '' ? null : from.value,
dateTo: to.value === '' ? null : to.value, dateTo: to.value === '' ? null : to.value,
} }
emit('dateChanged', args)
emit('update:modelValue', args) emit('update:modelValue', args)
} }

View File

@ -11,7 +11,7 @@
<script setup lang="ts"> <script setup lang="ts">
import {computed} from 'vue' import {computed} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'

View File

@ -16,6 +16,10 @@
{{ currentList.title === '' ? $t('misc.loading') : getListTitle(currentList) }} {{ currentList.title === '' ? $t('misc.loading') : getListTitle(currentList) }}
</h1> </h1>
<BaseButton :to="{name: 'list.info', params: {listId: currentList.id}}" class="info-button">
<icon icon="circle-info"/>
</BaseButton>
<list-settings-dropdown v-if="canWriteCurrentList && currentList.id !== -1" :list="currentList"/> <list-settings-dropdown v-if="canWriteCurrentList && currentList.id !== -1" :list="currentList"/>
</template> </template>
</div> </div>
@ -88,11 +92,11 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref, computed, onMounted, nextTick} from 'vue' import {ref, computed, onMounted, nextTick} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useRouter} from 'vue-router' import {useRouter} from 'vue-router'
import {QUICK_ACTIONS_ACTIVE} from '@/store/mutation-types' import {QUICK_ACTIONS_ACTIVE} from '@/store/mutation-types'
import Rights from '@/models/constants/rights.json' import {RIGHTS as Rights} from '@/constants/rights'
import Update from '@/components/home/update.vue' import Update from '@/components/home/update.vue'
import ListSettingsDropdown from '@/components/list/list-settings-dropdown.vue' import ListSettingsDropdown from '@/components/list/list-settings-dropdown.vue'
@ -103,6 +107,8 @@ import Logo from '@/components/home/Logo.vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import MenuButton from '@/components/home/MenuButton.vue' import MenuButton from '@/components/home/MenuButton.vue'
import {getListTitle} from '@/helpers/getListTitle'
const store = useStore() const store = useStore()
const userInfo = computed(() => store.state.auth.info) const userInfo = computed(() => store.state.auth.info)
@ -282,10 +288,21 @@ $hamburger-menu-icon-width: 28px;
:deep(.dropdown-trigger) { :deep(.dropdown-trigger) {
color: var(--grey-400); color: var(--grey-400);
margin-left: 1rem; margin-left: .5rem;
height: 1rem; height: 1rem;
width: 1rem; width: 1rem;
cursor: pointer; cursor: pointer;
} }
} }
.info-button {
text-align: center;
height: 1.25rem;
line-height: 1.25rem;
width: 2rem;
margin-top: .25rem;
padding: 0 .5rem;
color: var(--grey-400);
margin-left: .5rem;
}
</style> </style>

View File

@ -60,12 +60,13 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {watch, computed, shallowRef, watchEffect, VNode, h} from 'vue' import {watch, computed, shallowRef, watchEffect, type VNode, h} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useRoute, useRouter} from 'vue-router' import {useRoute, useRouter} from 'vue-router'
import {useEventListener} from '@vueuse/core' import {useEventListener} from '@vueuse/core'
import {CURRENT_LIST, KEYBOARD_SHORTCUTS_ACTIVE, MENU_ACTIVE} from '@/store/mutation-types' import {CURRENT_LIST, KEYBOARD_SHORTCUTS_ACTIVE, MENU_ACTIVE} from '@/store/mutation-types'
import {useLabelStore} from '@/stores/labels'
import Navigation from '@/components/home/navigation.vue' import Navigation from '@/components/home/navigation.vue'
import QuickActions from '@/components/quick-actions/quick-actions.vue' import QuickActions from '@/components/quick-actions/quick-actions.vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
@ -197,7 +198,8 @@ function useRenewTokenOnFocus() {
} }
useRenewTokenOnFocus() useRenewTokenOnFocus()
store.dispatch('labels/loadAllLabels') const labelStore = useLabelStore()
labelStore.loadAllLabels()
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -6,8 +6,9 @@
> >
<div class="container has-text-centered link-share-view"> <div class="container has-text-centered link-share-view">
<div class="column is-10 is-offset-1"> <div class="column is-10 is-offset-1">
<Logo class="logo"/> <Logo class="logo" v-if="logoVisible"/>
<h1 <h1
:class="{'m-0': !logoVisible}"
:style="{ 'opacity': currentList.title === '' ? '0': '1' }" :style="{ 'opacity': currentList.title === '' ? '0': '1' }"
class="title"> class="title">
{{ currentList.title === '' ? $t('misc.loading') : currentList.title }} {{ currentList.title === '' ? $t('misc.loading') : currentList.title }}
@ -23,7 +24,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import {computed} from 'vue' import {computed} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import Logo from '@/components/home/Logo.vue' import Logo from '@/components/home/Logo.vue'
import PoweredByLink from './PoweredByLink.vue' import PoweredByLink from './PoweredByLink.vue'
@ -31,6 +32,7 @@ import PoweredByLink from './PoweredByLink.vue'
const store = useStore() const store = useStore()
const currentList = computed(() => store.state.currentList) const currentList = computed(() => store.state.currentList)
const background = computed(() => store.state.background) const background = computed(() => store.state.background)
const logoVisible = computed(() => store.state.logoVisible)
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -56,10 +56,10 @@
class="menu-label" class="menu-label"
v-tooltip="namespaceTitles[nk]" v-tooltip="namespaceTitles[nk]"
> >
<span <ColorBubble
v-if="n.hexColor !== ''" v-if="n.hexColor !== ''"
:style="{ backgroundColor: n.hexColor }" :color="n.hexColor"
class="color-bubble" class="mr-1"
/> />
<span class="name">{{ namespaceTitles[nk] }}</span> <span class="name">{{ namespaceTitles[nk] }}</span>
<div <div
@ -114,11 +114,11 @@
<span class="icon handle"> <span class="icon handle">
<icon icon="grip-lines"/> <icon icon="grip-lines"/>
</span> </span>
<span <ColorBubble
:style="{ backgroundColor: l.hexColor }" v-if="l.hexColor !== ''"
class="color-bubble" :color="l.hexColor"
v-if="l.hexColor !== ''"> class="mr-1"
</span> />
<span class="list-menu-title">{{ getListTitle(l) }}</span> <span class="list-menu-title">{{ getListTitle(l) }}</span>
</BaseButton> </BaseButton>
<BaseButton <BaseButton
@ -141,9 +141,9 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref, computed, onMounted, onBeforeMount} from 'vue' import {ref, computed, onMounted, onBeforeMount} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import draggable from 'zhyswan-vuedraggable' import draggable from 'zhyswan-vuedraggable'
import {SortableEvent} from 'sortablejs' import type {SortableEvent} from 'sortablejs'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import ListSettingsDropdown from '@/components/list/list-settings-dropdown.vue' import ListSettingsDropdown from '@/components/list/list-settings-dropdown.vue'
@ -154,9 +154,11 @@ import Logo from '@/components/home/Logo.vue'
import {MENU_ACTIVE} from '@/store/mutation-types' import {MENU_ACTIVE} from '@/store/mutation-types'
import {calculateItemPosition} from '@/helpers/calculateItemPosition' import {calculateItemPosition} from '@/helpers/calculateItemPosition'
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle' import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
import {getListTitle} from '@/helpers/getListTitle'
import {useEventListener} from '@vueuse/core' import {useEventListener} from '@vueuse/core'
import NamespaceModel from '@/models/namespace' import type {IList} from '@/modelTypes/IList'
import ListModel from '@/models/list' import type {INamespace} from '@/modelTypes/INamespace'
import ColorBubble from '@/components/misc/colorBubble.vue'
const drag = ref(false) const drag = ref(false)
const dragOptions = { const dragOptions = {
@ -171,7 +173,7 @@ const loading = computed(() => store.state.loading && store.state.loadingModule
const namespaces = computed(() => { const namespaces = computed(() => {
return (store.state.namespaces.namespaces as NamespaceModel[]).filter(n => !n.isArchived) return (store.state.namespaces.namespaces as INamespace[]).filter(n => !n.isArchived)
}) })
const activeLists = computed(() => { const activeLists = computed(() => {
return namespaces.value.map(({lists}) => { return namespaces.value.map(({lists}) => {
@ -194,7 +196,7 @@ useEventListener('resize', resize)
onMounted(() => resize()) onMounted(() => resize())
function toggleFavoriteList(list: ListModel) { function toggleFavoriteList(list: IList) {
// The favorites pseudo list is always favorite // The favorites pseudo list is always favorite
// Archived lists cannot be marked favorite // Archived lists cannot be marked favorite
if (list.id === -1 || list.isArchived) { if (list.id === -1 || list.isArchived) {
@ -208,14 +210,14 @@ function resize() {
store.commit(MENU_ACTIVE, window.innerWidth >= 770) store.commit(MENU_ACTIVE, window.innerWidth >= 770)
} }
function toggleLists(namespaceId: number) { function toggleLists(namespaceId: INamespace['id']) {
listsVisible.value[namespaceId] = !listsVisible.value[namespaceId] listsVisible.value[namespaceId] = !listsVisible.value[namespaceId]
} }
const listsVisible = ref<{ [id: NamespaceModel['id']]: boolean }>({}) const listsVisible = ref<{ [id: INamespace['id']]: boolean }>({})
// FIXME: async action will be unfinished when component mounts // FIXME: async action will be unfinished when component mounts
onBeforeMount(async () => { onBeforeMount(async () => {
const namespaces = await store.dispatch('namespaces/loadNamespaces') as NamespaceModel[] const namespaces = await store.dispatch('namespaces/loadNamespaces') as INamespace[]
namespaces.forEach(n => { namespaces.forEach(n => {
if (typeof listsVisible.value[n.id] === 'undefined') { if (typeof listsVisible.value[n.id] === 'undefined') {
listsVisible.value[n.id] = true listsVisible.value[n.id] = true
@ -223,7 +225,7 @@ onBeforeMount(async () => {
}) })
}) })
function updateActiveLists(namespace: NamespaceModel, activeLists: ListModel[]) { function updateActiveLists(namespace: INamespace, activeLists: IList[]) {
// This is a bit hacky: since we do have to filter out the archived items from the list // This is a bit hacky: since we do have to filter out the archived items from the list
// for vue draggable updating it is not as simple as replacing it. // for vue draggable updating it is not as simple as replacing it.
// To work around this, we merge the active lists with the archived ones. Doing so breaks the order // To work around this, we merge the active lists with the archived ones. Doing so breaks the order
@ -240,7 +242,7 @@ function updateActiveLists(namespace: NamespaceModel, activeLists: ListModel[])
}) })
} }
const listUpdating = ref<{ [id: NamespaceModel['id']]: boolean }>({}) const listUpdating = ref<{ [id: INamespace['id']]: boolean }>({})
async function saveListPosition(e: SortableEvent) { async function saveListPosition(e: SortableEvent) {
if (!e.newIndex && e.newIndex !== 0) return if (!e.newIndex && e.newIndex !== 0) return
@ -249,9 +251,14 @@ async function saveListPosition(e: SortableEvent) {
const newNamespaceIndex = parseInt(e.to.dataset.namespaceIndex as string) const newNamespaceIndex = parseInt(e.to.dataset.namespaceIndex as string)
const listsActive = activeLists.value[newNamespaceIndex] const listsActive = activeLists.value[newNamespaceIndex]
const list = listsActive[e.newIndex] // If the list was dragged to the last position, Safari will report e.newIndex as the size of the listsActive
const listBefore = listsActive[e.newIndex - 1] ?? null // array instead of using the position. Because the index is wrong in that case, dragging the list will fail.
const listAfter = listsActive[e.newIndex + 1] ?? null // To work around that we're explicitly checking that case here and decrease the index.
const newIndex = e.newIndex === listsActive.length ? e.newIndex - 1 : e.newIndex
const list = listsActive[newIndex]
const listBefore = listsActive[newIndex - 1] ?? null
const listAfter = listsActive[newIndex + 1] ?? null
listUpdating.value[list.id] = true listUpdating.value[list.id] = true
const position = calculateItemPosition( const position = calculateItemPosition(

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="update-notification" v-if="updateAvailable"> <div class="update-notification" v-if="updateAvailable">
<p>{{ $t('update.available') }}</p> <p>{{ $t('update.available') }}</p>
<x-button @click="refreshApp()" :shadow="false"> <x-button @click="refreshApp()" :shadow="false" class="has-no-text-wrap">
{{ $t('update.do') }} {{ $t('update.do') }}
</x-button> </x-button>
</div> </div>
@ -43,24 +43,19 @@ function refreshApp() {
<style lang="scss" scoped> <style lang="scss" scoped>
.update-notification { .update-notification {
margin: .5rem;
display: flex; display: flex;
align-items: center; align-items: center;
background: $warning; background: $warning;
padding: 0 .25rem; padding: .5rem;
border-radius: $radius; border-radius: $radius;
font-size: .9rem; font-size: .9rem;
color: var(--grey-900); color: var(--grey-900);
justify-content: space-between; justify-content: space-between;
@media screen and (max-width: $desktop) {
position: fixed; position: fixed;
bottom: 1rem; bottom: 1rem;
margin: 0;
width: 450px; width: 450px;
left: calc(50vw - 225px); left: calc(50vw - 225px);
padding: .5rem;
}
@media screen and (max-width: $tablet) { @media screen and (max-width: $tablet) {
position: fixed; position: fixed;

View File

@ -9,24 +9,27 @@
} }
]" ]"
> >
<icon :icon="icon" v-if="showIconOnly"/> <icon
v-if="showIconOnly"
:icon="icon"
:style="{'color': iconColor !== '' ? iconColor : false}"
/>
<span class="icon is-small" v-else-if="icon !== ''"> <span class="icon is-small" v-else-if="icon !== ''">
<icon :icon="icon"/> <icon
:icon="icon"
:style="{'color': iconColor !== '' ? iconColor : false}"
/>
</span> </span>
<slot /> <slot />
</BaseButton> </BaseButton>
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' export default { name: 'x-button' }
export default defineComponent({
name: 'x-button',
})
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import {computed, useSlots, PropType} from 'vue' import {computed, useSlots, type PropType} from 'vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
const BUTTON_TYPES_MAP = Object.freeze({ const BUTTON_TYPES_MAP = Object.freeze({
@ -46,6 +49,10 @@ const props = defineProps({
type: [String, Array], type: [String, Array],
default: '', default: '',
}, },
iconColor: {
type: String,
default: '',
},
loading: { loading: {
type: Boolean, type: Boolean,
default: false, default: false,
@ -69,9 +76,11 @@ const showIconOnly = computed(() => props.icon !== '' && typeof slots.default ==
text-transform: uppercase; text-transform: uppercase;
font-size: 0.85rem; font-size: 0.85rem;
font-weight: bold; font-weight: bold;
height: auto;
min-height: $button-height; min-height: $button-height;
box-shadow: var(--shadow-sm); box-shadow: var(--shadow-sm);
display: inline-flex; display: inline-flex;
white-space: break-spaces;
&:hover { &:hover {
box-shadow: var(--shadow-md); box-shadow: var(--shadow-md);

View File

@ -68,7 +68,7 @@ export default defineComponent({
default: 'top', default: 'top',
}, },
}, },
emits: ['update:modelValue', 'change'], emits: ['update:modelValue'],
watch: { watch: {
modelValue: { modelValue: {
handler(modelValue) { handler(modelValue) {
@ -98,7 +98,6 @@ export default defineComponent({
this.lastChangeTimeout = setTimeout(() => { this.lastChangeTimeout = setTimeout(() => {
this.$emit('update:modelValue', this.color) this.$emit('update:modelValue', this.color)
this.$emit('change')
}, 500) }, 500)
}, },
reset() { reset() {

View File

@ -97,7 +97,7 @@ import {i18n} from '@/i18n'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import {format} from 'date-fns' import {formatDate, formatDateShort} from '@/helpers/time/formatDate'
import {calculateDayInterval} from '@/helpers/time/calculateDayInterval' import {calculateDayInterval} from '@/helpers/time/calculateDayInterval'
import {calculateNearestHours} from '@/helpers/time/calculateNearestHours' import {calculateNearestHours} from '@/helpers/time/calculateNearestHours'
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside' import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
@ -131,7 +131,7 @@ export default defineComponent({
default: false, default: false,
}, },
}, },
emits: ['update:modelValue', 'change', 'close', 'close-on-change'], emits: ['update:modelValue', 'close', 'close-on-change'],
mounted() { mounted() {
document.addEventListener('click', this.hideDatePopup) document.addEventListener('click', this.hideDatePopup)
}, },
@ -170,11 +170,12 @@ export default defineComponent({
return '' return ''
} }
return format(this.date, 'yyy-LL-dd H:mm') return formatDate(this.date, 'yyy-LL-dd H:mm')
}, },
}, },
}, },
methods: { methods: {
formatDateShort,
setDateValue(newVal) { setDateValue(newVal) {
if (newVal === null) { if (newVal === null) {
this.date = null this.date = null
@ -185,7 +186,6 @@ export default defineComponent({
updateData() { updateData() {
this.changed = true this.changed = true
this.$emit('update:modelValue', this.date) this.$emit('update:modelValue', this.date)
this.$emit('change', this.date)
}, },
toggleDatePopup() { toggleDatePopup() {
if (this.disabled) { if (this.disabled) {
@ -233,7 +233,7 @@ export default defineComponent({
const interval = calculateDayInterval(date) const interval = calculateDayInterval(date)
const newDate = new Date() const newDate = new Date()
newDate.setDate(newDate.getDate() + interval) newDate.setDate(newDate.getDate() + interval)
return format(newDate, 'E') return formatDate(newDate, 'E')
}, },
}, },
}) })

View File

@ -16,14 +16,29 @@
<p class="has-text-centered has-text-grey is-italic my-5" v-if="showPreviewText"> <p class="has-text-centered has-text-grey is-italic my-5" v-if="showPreviewText">
{{ emptyText }} {{ emptyText }}
<template v-if="isEditEnabled"> <template v-if="isEditEnabled">
<ButtonLink @click="toggleEdit" class="d-print-none">{{ $t('input.editor.edit') }}</ButtonLink>. <ButtonLink
@click="toggleEdit"
v-shortcut="editShortcut"
class="d-print-none">
{{ $t('input.editor.edit') }}
</ButtonLink>.
</template> </template>
</p> </p>
<ul class="actions d-print-none" v-if="bottomActions.length > 0"> <ul class="actions d-print-none" v-if="bottomActions.length > 0">
<li v-if="isEditEnabled && !showPreviewText && showSave"> <li v-if="isEditEnabled && !showPreviewText && showSave">
<BaseButton v-if="showEditButton" @click="toggleEdit">{{ $t('input.editor.edit') }}</BaseButton> <BaseButton
<BaseButton v-else-if="isEditActive" @click="toggleEdit" class="done-edit">{{ $t('misc.save') }}</BaseButton> v-if="showEditButton"
@click="toggleEdit"
v-shortcut="editShortcut">
{{ $t('input.editor.edit') }}
</BaseButton>
<BaseButton
v-else-if="isEditActive"
@click="toggleEdit"
class="done-edit">
{{ $t('misc.save') }}
</BaseButton>
</li> </li>
<li v-for="(action, k) in bottomActions" :key="k"> <li v-for="(action, k) in bottomActions" :key="k">
<BaseButton @click="action.action">{{ action.title }}</BaseButton> <BaseButton @click="action.action">{{ action.title }}</BaseButton>
@ -32,7 +47,11 @@
<template v-else-if="isEditEnabled && showSave"> <template v-else-if="isEditEnabled && showSave">
<ul v-if="showEditButton" class="actions d-print-none"> <ul v-if="showEditButton" class="actions d-print-none">
<li> <li>
<BaseButton @click="toggleEdit">{{ $t('input.editor.edit') }}</BaseButton> <BaseButton
@click="toggleEdit"
v-shortcut="editShortcut">
{{ $t('input.editor.edit') }}
</BaseButton>
</li> </li>
</ul> </ul>
<x-button <x-button
@ -53,7 +72,7 @@ import {defineComponent} from 'vue'
import VueEasymde from './vue-easymde.vue' import VueEasymde from './vue-easymde.vue'
import {marked} from 'marked' import {marked} from 'marked'
import DOMPurify from 'dompurify' import DOMPurify from 'dompurify'
import hljs from 'highlight.js/lib/common' import {setupMarkdownRenderer} from '@/helpers/markdownRenderer'
import {createEasyMDEConfig} from './editorConfig' import {createEasyMDEConfig} from './editorConfig'
@ -110,8 +129,14 @@ export default defineComponent({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
// If a key is passed the editor will go in "edit" mode when the key is pressed.
// Disabled if an empty string is passed.
editShortcut: {
type: String,
default: '',
}, },
emits: ['update:modelValue', 'change'], },
emits: ['update:modelValue'],
computed: { computed: {
showPreviewText() { showPreviewText() {
return this.isPreviewActive && this.text === '' && this.emptyText !== '' return this.isPreviewActive && this.text === '' && this.emptyText !== ''
@ -187,7 +212,6 @@ export default defineComponent({
this.changeTimeout = setTimeout(() => { this.changeTimeout = setTimeout(() => {
this.$emit('update:modelValue', this.text) this.$emit('update:modelValue', this.text)
this.$emit('change', this.text)
}, timeout) }, timeout)
}, },
replaceAt(str, index, replacement) { replaceAt(str, index, replacement) {
@ -198,43 +222,7 @@ export default defineComponent({
return checkboxes[n] return checkboxes[n]
}, },
renderPreview() { renderPreview() {
const renderer = new marked.Renderer() setupMarkdownRenderer(this.checkboxId)
const linkRenderer = renderer.link
let checkboxNum = -1
marked.use({
renderer: {
image: (src, title, text) => {
title = title ? ` title="${title}` : ''
// If the url starts with the api url, the image is likely an attachment and
// we'll need to download and parse it properly.
if (src.substr(0, window.API_URL.length + 7) === `${window.API_URL}/tasks/`) {
return `<img data-src="${src}" alt="${text}" ${title} class="attachment-image"/>`
}
return `<img src="${src}" alt="${text}" ${title}/>`
},
checkbox: (checked) => {
if (checked) {
checked = ' checked="checked"'
}
checkboxNum++
return `<input type="checkbox" data-checkbox-num="${checkboxNum}" ${checked} class="text-checkbox-${this.checkboxId}"/>`
},
link: (href, title, text) => {
const isLocal = href.startsWith(`${location.protocol}//${location.hostname}`)
const html = linkRenderer.call(renderer, href, title, text)
return isLocal ? html : html.replace(/^<a /, '<a target="_blank" rel="noreferrer noopener nofollow" ')
},
},
highlight: function (code, language) {
const validLanguage = hljs.getLanguage(language) ? language : 'plaintext'
return hljs.highlight(code, {language: validLanguage}).value
},
})
this.preview = DOMPurify.sanitize(marked(this.text), {ADD_ATTR: ['target']}) this.preview = DOMPurify.sanitize(marked(this.text), {ADD_ATTR: ['target']})

View File

@ -53,7 +53,7 @@ export default defineComponent({
}, },
}, },
methods: { methods: {
updateData(checked) { updateData(checked: boolean) {
this.checked = checked this.checked = checked
this.$emit('update:modelValue', checked) this.$emit('update:modelValue', checked)
this.$emit('change', checked) this.$emit('change', checked)

View File

@ -60,8 +60,8 @@
:is-button="false" :is-button="false"
entity="list" entity="list"
:entity-id="list.id" :entity-id="list.id"
:subscription="list.subscription" :model-value="list.subscription"
@change="sub => subscription = sub" @update:model-value="sub => subscription = sub"
type="dropdown" type="dropdown"
/> />
<dropdown-item <dropdown-item
@ -76,24 +76,24 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, computed, watchEffect} from 'vue' import {ref, computed, watchEffect, type PropType} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {getSavedFilterIdFromListId} from '@/helpers/savedFilter' import {getSavedFilterIdFromListId} from '@/helpers/savedFilter'
import Dropdown from '@/components/misc/dropdown.vue' import Dropdown from '@/components/misc/dropdown.vue'
import DropdownItem from '@/components/misc/dropdown-item.vue' import DropdownItem from '@/components/misc/dropdown-item.vue'
import TaskSubscription from '@/components/misc/subscription.vue' import TaskSubscription from '@/components/misc/subscription.vue'
import ListModel from '@/models/list' import type {IList} from '@/modelTypes/IList'
import SubscriptionModel from '@/models/subscription' import type {ISubscription} from '@/modelTypes/ISubscription'
const props = defineProps({ const props = defineProps({
list: { list: {
type: ListModel, type: Object as PropType<IList>,
required: true, required: true,
}, },
}) })
const subscription = ref<SubscriptionModel | null>(null) const subscription = ref<ISubscription | null>(null)
watchEffect(() => { watchEffect(() => {
subscription.value = props.list.subscription ?? null subscription.value = props.list.subscription ?? null
}) })

View File

@ -38,7 +38,7 @@
<priority-select <priority-select
:disabled="!filters.usePriority || undefined" :disabled="!filters.usePriority || undefined"
v-model.number="filters.priority" v-model.number="filters.priority"
@change="setPriority" @update:model-value="setPriority"
/> />
<fancycheckbox <fancycheckbox
v-model="filters.usePriority" v-model="filters.usePriority"
@ -53,7 +53,7 @@
<div class="control single-value-control"> <div class="control single-value-control">
<percent-done-select <percent-done-select
v-model.number="filters.percentDone" v-model.number="filters.percentDone"
@change="setPercentDoneFilter" @update:model-value="setPercentDoneFilter"
:disabled="!filters.usePercentDone || undefined" :disabled="!filters.usePercentDone || undefined"
/> />
<fancycheckbox <fancycheckbox
@ -68,8 +68,9 @@
<label class="label">{{ $t('task.attributes.dueDate') }}</label> <label class="label">{{ $t('task.attributes.dueDate') }}</label>
<div class="control"> <div class="control">
<datepicker-with-range <datepicker-with-range
@dateChanged="values => setDateFilter('due_date', values)" v-model="filters.dueDate"
v-model="filters.dueDate"> @update:model-value="values => setDateFilter('due_date', values)"
>
<template #trigger="{toggle, buttonText}"> <template #trigger="{toggle, buttonText}">
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2"> <x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
{{ buttonText }} {{ buttonText }}
@ -82,8 +83,9 @@
<label class="label">{{ $t('task.attributes.startDate') }}</label> <label class="label">{{ $t('task.attributes.startDate') }}</label>
<div class="control"> <div class="control">
<datepicker-with-range <datepicker-with-range
@dateChanged="values => setDateFilter('start_date', values)" v-model="filters.startDate"
v-model="filters.startDate"> @update:model-value="values => setDateFilter('start_date', values)"
>
<template #trigger="{toggle, buttonText}"> <template #trigger="{toggle, buttonText}">
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2"> <x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
{{ buttonText }} {{ buttonText }}
@ -96,8 +98,9 @@
<label class="label">{{ $t('task.attributes.endDate') }}</label> <label class="label">{{ $t('task.attributes.endDate') }}</label>
<div class="control"> <div class="control">
<datepicker-with-range <datepicker-with-range
@dateChanged="values => setDateFilter('end_date', values)" v-model="filters.endDate"
v-model="filters.endDate"> @update:model-value="values => setDateFilter('end_date', values)"
>
<template #trigger="{toggle, buttonText}"> <template #trigger="{toggle, buttonText}">
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2"> <x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
{{ buttonText }} {{ buttonText }}
@ -110,8 +113,9 @@
<label class="label">{{ $t('task.attributes.reminders') }}</label> <label class="label">{{ $t('task.attributes.reminders') }}</label>
<div class="control"> <div class="control">
<datepicker-with-range <datepicker-with-range
@dateChanged="values => setDateFilter('reminders', values)" v-model="filters.reminders"
v-model="filters.reminders"> @update:model-value="values => setDateFilter('reminders', values)"
>
<template #trigger="{toggle, buttonText}"> <template #trigger="{toggle, buttonText}">
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2"> <x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
{{ buttonText }} {{ buttonText }}
@ -141,7 +145,7 @@
<div class="field"> <div class="field">
<label class="label">{{ $t('task.attributes.labels') }}</label> <label class="label">{{ $t('task.attributes.labels') }}</label>
<div class="control labels-list"> <div class="control labels-list">
<edit-labels v-model="labels" @change="changeLabelFilter"/> <edit-labels v-model="labels" @update:model-value="changeLabelFilter"/>
</div> </div>
</div> </div>
@ -186,8 +190,10 @@
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import {defineComponent} from 'vue'
import DatepickerWithRange from '@/components/date/datepickerWithRange' import {useLabelStore} from '@/stores/labels'
import Fancycheckbox from '../../input/fancycheckbox'
import DatepickerWithRange from '@/components/date/datepickerWithRange.vue'
import Fancycheckbox from '@/components/input/fancycheckbox.vue'
import {includesById} from '@/helpers/utils' import {includesById} from '@/helpers/utils'
import PrioritySelect from '@/components/tasks/partials/prioritySelect.vue' import PrioritySelect from '@/components/tasks/partials/prioritySelect.vue'
@ -278,7 +284,7 @@ export default defineComponent({
default: false, default: false,
}, },
}, },
emits: ['update:modelValue', 'change'], emits: ['update:modelValue'],
watch: { watch: {
modelValue: { modelValue: {
handler(value) { handler(value) {
@ -303,8 +309,10 @@ export default defineComponent({
this.change() this.change()
}, },
}, },
foundLabels() { foundLabels() {
return this.$store.getters['labels/filterLabelsByQuery'](this.labels, this.query) const labelStore = useLabelStore()
return labelStore.filterLabelsByQuery(this.labels, this.labelQuery)
}, },
}, },
methods: { methods: {
@ -312,7 +320,6 @@ export default defineComponent({
const params = {...this.params} const params = {...this.params}
params.filter_value = params.filter_value.map(v => v instanceof Date ? v.toISOString() : v) params.filter_value = params.filter_value.map(v => v instanceof Date ? v.toISOString() : v)
this.$emit('update:modelValue', params) this.$emit('update:modelValue', params)
this.$emit('change', params)
}, },
prepareFilters() { prepareFilters() {
this.prepareDone() this.prepareDone()
@ -333,7 +340,8 @@ export default defineComponent({
: '' : ''
const labelIds = labels.split(',').map(i => parseInt(i)) const labelIds = labels.split(',').map(i => parseInt(i))
this.labels = this.$store.getters['labels/getLabelsByIds'](labelIds) const labelStore = useLabelStore()
this.labels = labelStore.getLabelsByIds(labelIds)
}, },
removePropertyFromFilter(propertyName) { removePropertyFromFilter(propertyName) {
// Because of the way arrays work, we can only ever remove one element at once. // Because of the way arrays work, we can only ever remove one element at once.

View File

@ -36,16 +36,16 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {PropType, ref, watch} from 'vue' import {type PropType, ref, watch} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import ListService from '@/services/list' import ListService from '@/services/list'
import {getBlobFromBlurHash} from '@/helpers/getBlobFromBlurHash' import {getBlobFromBlurHash} from '@/helpers/getBlobFromBlurHash'
import {colorIsDark} from '@/helpers/color/colorIsDark' import {colorIsDark} from '@/helpers/color/colorIsDark'
import ListModel from '@/models/list'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import type {IList} from '@/modelTypes/IList'
const background = ref<string | null>(null) const background = ref<string | null>(null)
const backgroundLoading = ref(false) const backgroundLoading = ref(false)
@ -53,7 +53,7 @@ const blurHashUrl = ref('')
const props = defineProps({ const props = defineProps({
list: { list: {
type: Object as PropType<ListModel>, type: Object as PropType<IList>,
required: true, required: true,
}, },
showArchived: { showArchived: {
@ -86,7 +86,7 @@ async function loadBackground() {
const store = useStore() const store = useStore()
function toggleFavoriteList(list: ListModel) { function toggleFavoriteList(list: IList) {
// The favorites pseudo list is always favorite // The favorites pseudo list is always favorite
// Archived lists cannot be marked favorite // Archived lists cannot be marked favorite
if (list.id === -1 || list.isArchived) { if (list.id === -1 || list.isArchived) {

View File

@ -9,7 +9,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {PropType} from 'vue' import type {PropType} from 'vue'
type Variants = 'default' | 'small' type Variants = 'default' | 'small'
defineProps({ defineProps({

View File

@ -16,11 +16,21 @@
</span> </span>
</BaseButton> </BaseButton>
</header> </header>
<div class="card-content loader-container" :class="{'p-0': !padding, 'is-loading': loading}"> <div
class="card-content loader-container"
:class="{
'p-0': !padding,
'is-loading': loading
}"
>
<div :class="{'content': hasContent}"> <div :class="{'content': hasContent}">
<slot></slot> <slot />
</div> </div>
</div> </div>
<footer v-if="$slots.footer" class="card-footer">
<slot name="footer" />
</footer>
</div> </div>
</template> </template>
@ -76,9 +86,11 @@ defineEmits(['close'])
border-radius: $radius $radius 0 0; border-radius: $radius $radius 0 0;
} }
// FIXME: should maybe be merged somehow with modal .card-footer {
:deep(.modal-card-foot) {
background-color: var(--grey-50); background-color: var(--grey-50);
border-top: 0; border-top: 0;
padding: var(--modal-card-head-padding);
display: flex;
justify-content: flex-end;
} }
</style> </style>

View File

@ -0,0 +1,24 @@
<template>
<span
:style="{backgroundColor: color }"
class="color-bubble"
></span>
</template>
<script lang="ts" setup>
import type { Color } from 'csstype'
defineProps< {
color: Color,
}>()
</script>
<style scoped>
.color-bubble {
display: inline-block;
border-radius: 100%;
height: 10px;
width: 10px;
flex-shrink: 0;
}
</style>

View File

@ -4,15 +4,17 @@
:title="title" :title="title"
:shadow="false" :shadow="false"
:padding="false" :padding="false"
class="has-text-left has-overflow" class="has-text-left"
:has-close="true" :has-close="true"
@close="$router.back()" @close="$router.back()"
:loading="loading" :loading="loading"
> >
<div class="p-4"> <div class="p-4">
<slot></slot> <slot />
</div> </div>
<footer class="modal-card-foot is-flex is-justify-content-flex-end">
<template #footer>
<slot name="footer">
<x-button <x-button
v-if="tertiary !== ''" v-if="tertiary !== ''"
:shadow="false" :shadow="false"
@ -31,11 +33,12 @@
variant="primary" variant="primary"
@click.prevent.stop="primary()" @click.prevent.stop="primary()"
:icon="primaryIcon" :icon="primaryIcon"
:disabled="primaryDisabled" :disabled="primaryDisabled || loading"
> >
{{ primaryLabel || $t('misc.create') }} {{ primaryLabel || $t('misc.create') }}
</x-button> </x-button>
</footer> </slot>
</template>
</card> </card>
</modal> </modal>
</template> </template>

View File

@ -33,7 +33,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {useStore} from 'vuex' import {useStore} from '@/store'
import Shortcut from '@/components/misc/shortcut.vue' import Shortcut from '@/components/misc/shortcut.vue'
import Message from '@/components/misc/message.vue' import Message from '@/components/misc/message.vue'

View File

@ -136,6 +136,10 @@ export const KEYBOARD_SHORTCUTS : ShortcutGroup[] = [
title: 'keyboardShortcuts.task.reminder', title: 'keyboardShortcuts.task.reminder',
keys: ['alt', 'r'], keys: ['alt', 'r'],
}, },
{
title: 'keyboardShortcuts.task.description',
keys: ['e'],
},
], ],
}, },
] ]

View File

@ -8,7 +8,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import {computed} from 'vue' import {computed} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'

View File

@ -7,7 +7,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {computed, PropType} from 'vue' import {computed, type PropType} from 'vue'
const TEXT_ALIGN_MAP = Object.freeze({ const TEXT_ALIGN_MAP = Object.freeze({
left: '', left: '',

View File

@ -30,7 +30,7 @@ import Logo from '@/components/home/Logo.vue'
import Message from '@/components/misc/message.vue' import Message from '@/components/misc/message.vue'
import Legal from '@/components/misc/legal.vue' import Legal from '@/components/misc/legal.vue'
import ApiConfig from '@/components/misc/api-config.vue' import ApiConfig from '@/components/misc/api-config.vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {computed} from 'vue' import {computed} from 'vue'
import {useRoute} from 'vue-router' import {useRoute} from 'vue-router'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'

View File

@ -42,7 +42,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import {ref, computed} from 'vue' import {ref, computed} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import Logo from '@/assets/logo.svg?component' import Logo from '@/assets/logo.svg?component'
import ApiConfig from '@/components/misc/api-config.vue' import ApiConfig from '@/components/misc/api-config.vue'

View File

@ -5,7 +5,7 @@
:icon="iconName" :icon="iconName"
v-tooltip="tooltipText" v-tooltip="tooltipText"
@click="changeSubscription" @click="changeSubscription"
:disabled="disabled || undefined" :disabled="disabled"
> >
{{ buttonText }} {{ buttonText }}
</x-button> </x-button>
@ -23,6 +23,7 @@
v-tooltip="tooltipText" v-tooltip="tooltipText"
@click="changeSubscription" @click="changeSubscription"
:class="{'is-disabled': disabled}" :class="{'is-disabled': disabled}"
:disabled="disabled"
> >
<span class="icon"> <span class="icon">
<icon :icon="iconName"/> <icon :icon="iconName"/>
@ -32,7 +33,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {computed, shallowRef} from 'vue' import {computed, shallowRef, type PropType} from 'vue'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
@ -40,24 +41,30 @@ import DropdownItem from '@/components/misc/dropdown-item.vue'
import SubscriptionService from '@/services/subscription' import SubscriptionService from '@/services/subscription'
import SubscriptionModel from '@/models/subscription' import SubscriptionModel from '@/models/subscription'
import type {ISubscription} from '@/modelTypes/ISubscription'
import {success} from '@/message' import {success} from '@/message'
interface Props { const props = defineProps({
entity: string entity: String,
entityId: number entityId: Number,
subscription: SubscriptionModel | null isButton: {
type?: 'button' | 'dropdown' | null type: Boolean,
} default: true,
},
const props = withDefaults(defineProps<Props>(), { modelValue: {
subscription: null, type: Object as PropType<ISubscription>,
type: 'button', default: null,
},
type: {
type: String as PropType<'button' | 'dropdown' | 'null'>,
default: 'button',
},
}) })
const subscriptionEntity = computed<string | null>(() => props.subscription?.entity ?? null) const subscriptionEntity = computed<string | null>(() => props.modelValue?.entity ?? null)
const emit = defineEmits(['change']) const emit = defineEmits(['update:modelValue'])
const subscriptionService = shallowRef(new SubscriptionService()) const subscriptionService = shallowRef(new SubscriptionService())
@ -70,27 +77,21 @@ const tooltipText = computed(() => {
}) })
} }
return props.subscription !== null ? return props.modelValue !== null ?
t('task.subscription.subscribed', {entity: props.entity}) : t('task.subscription.subscribed', {entity: props.entity}) :
t('task.subscription.notSubscribed', {entity: props.entity}) t('task.subscription.notSubscribed', {entity: props.entity})
}) })
const buttonText = computed(() => props.subscription !== null ? t('task.subscription.unsubscribe') : t('task.subscription.subscribe')) const buttonText = computed(() => props.modelValue ? t('task.subscription.unsubscribe') : t('task.subscription.subscribe'))
const iconName = computed(() => props.subscription !== null ? ['far', 'bell-slash'] : 'bell') const iconName = computed(() => props.modelValue ? ['far', 'bell-slash'] : 'bell')
const disabled = computed(() => { const disabled = computed(() => props.modelValue && subscriptionEntity.value !== props.entity)
if (props.subscription === null) {
return false
}
return subscriptionEntity.value !== props.entity
})
function changeSubscription() { function changeSubscription() {
if (disabled.value) { if (disabled.value) {
return return
} }
if (props.subscription === null) { if (props.modelValue === null) {
subscribe() subscribe()
} else { } else {
unsubscribe() unsubscribe()
@ -103,7 +104,7 @@ async function subscribe() {
entityId: props.entityId, entityId: props.entityId,
}) })
await subscriptionService.value.create(subscription) await subscriptionService.value.create(subscription)
emit('change', subscription) emit('update:modelValue', subscription)
success({message: t('task.subscription.subscribeSuccess', {entity: props.entity})}) success({message: t('task.subscription.subscribeSuccess', {entity: props.entity})})
} }
@ -113,7 +114,7 @@ async function unsubscribe() {
entityId: props.entityId, entityId: props.entityId,
}) })
await subscriptionService.value.delete(subscription) await subscriptionService.value.delete(subscription)
emit('change', null) emit('update:modelValue', null)
success({message: t('task.subscription.unsubscribeSuccess', {entity: props.entity})}) success({message: t('task.subscription.unsubscribeSuccess', {entity: props.entity})})
} }
</script> </script>

View File

@ -34,12 +34,13 @@
{{ $t('menu.archive') }} {{ $t('menu.archive') }}
</dropdown-item> </dropdown-item>
<task-subscription <task-subscription
v-if="subscription"
class="has-no-shadow" class="has-no-shadow"
:is-button="false" :is-button="false"
entity="namespace" entity="namespace"
:entity-id="namespace.id" :entity-id="namespace.id"
:subscription="subscription" :model-value="subscription"
@change="sub => subscription = sub" @update:model-value="sub => subscription = sub"
type="dropdown" type="dropdown"
/> />
<dropdown-item <dropdown-item
@ -54,20 +55,22 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, onMounted} from 'vue' import {ref, onMounted, type PropType} from 'vue'
import Dropdown from '@/components/misc/dropdown.vue' import Dropdown from '@/components/misc/dropdown.vue'
import DropdownItem from '@/components/misc/dropdown-item.vue' import DropdownItem from '@/components/misc/dropdown-item.vue'
import TaskSubscription from '@/components/misc/subscription.vue' import TaskSubscription from '@/components/misc/subscription.vue'
import type {INamespace} from '@/modelTypes/INamespace'
import type {ISubscription} from '@/modelTypes/ISubscription'
const props = defineProps({ const props = defineProps({
namespace: { namespace: {
type: Object, // NamespaceModel type: Object as PropType<INamespace>,
required: true, required: true,
}, },
}) })
const subscription = ref(null) const subscription = ref<ISubscription | null>(null)
onMounted(() => { onMounted(() => {
subscription.value = props.namespace.subscription subscription.value = props.namespace.subscription
}) })

View File

@ -30,7 +30,7 @@
{{ n.toText(userInfo) }} {{ n.toText(userInfo) }}
</BaseButton> </BaseButton>
</div> </div>
<span class="created" v-tooltip="formatDate(n.created)"> <span class="created" v-tooltip="formatDateLong(n.created)">
{{ formatDateSince(n.created) }} {{ formatDateSince(n.created) }}
</span> </span>
</div> </div>
@ -52,17 +52,18 @@ import {computed, onMounted, onUnmounted, ref} from 'vue'
import NotificationService from '@/services/notification' import NotificationService from '@/services/notification'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import User from '@/components/misc/user.vue' import User from '@/components/misc/user.vue'
import names from '@/models/constants/notificationNames.json' import { NOTIFICATION_NAMES as names, type INotification} from '@/modelTypes/INotification'
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside' import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useRouter} from 'vue-router' import {useRouter} from 'vue-router'
import {formatDateLong, formatDateSince} from '@/helpers/time/formatDate'
const LOAD_NOTIFICATIONS_INTERVAL = 10000 const LOAD_NOTIFICATIONS_INTERVAL = 10000
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
const allNotifications = ref([]) const allNotifications = ref<INotification[]>([])
const showNotifications = ref(false) const showNotifications = ref(false)
const popup = ref(null) const popup = ref(null)

View File

@ -79,48 +79,25 @@
> >
<thead> <thead>
<tr> <tr>
<th>{{ $t('list.share.attributes.link') }}</th> <th></th>
<th>{{ $t('list.share.attributes.name') }}</th> <th>{{ $t('list.share.links.view') }}</th>
<th>{{ $t('list.share.attributes.sharedBy') }}</th>
<th>{{ $t('list.share.attributes.right') }}</th>
<th>{{ $t('list.share.attributes.delete') }}</th> <th>{{ $t('list.share.attributes.delete') }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr :key="s.id" v-for="s in linkShares"> <tr :key="s.id" v-for="s in linkShares">
<td> <td>
<div class="field has-addons no-input-mobile"> <p class="mb-2 is-italic" v-if="s.name !== ''">
<div class="control">
<input
:value="getShareLink(s.hash)"
class="input"
readonly
type="text"
/>
</div>
<div class="control">
<x-button
@click="copy(getShareLink(s.hash))"
:shadow="false"
v-tooltip="$t('misc.copy')"
>
<span class="icon">
<icon icon="paste"/>
</span>
</x-button>
</div>
</div>
</td>
<td>
<template v-if="s.name !== ''">
{{ s.name }} {{ s.name }}
</template> </p>
<i v-else>{{ $t('list.share.links.noName') }}</i>
</td> <p class="mb-2">
<td> <i18n-t keypath="list.share.links.sharedBy">
{{ s.sharedBy.getDisplayName() }} <strong>{{ s.sharedBy.getDisplayName() }}</strong>
</td> </i18n-t>
<td class="type"> </p>
<p class="mb-2">
<template v-if="s.right === RIGHTS.ADMIN"> <template v-if="s.right === RIGHTS.ADMIN">
<span class="icon is-small"> <span class="icon is-small">
<icon icon="lock"/> <icon icon="lock"/>
@ -139,6 +116,41 @@
</span>&nbsp; </span>&nbsp;
{{ $t('list.share.right.read') }} {{ $t('list.share.right.read') }}
</template> </template>
</p>
<div class="field has-addons no-input-mobile">
<div class="control">
<input
:value="getShareLink(s.hash, selectedView[s.id])"
class="input"
readonly
type="text"
/>
</div>
<div class="control">
<x-button
@click="copy(getShareLink(s.hash, selectedView[s.id]))"
:shadow="false"
v-tooltip="$t('misc.copy')"
>
<span class="icon">
<icon icon="paste"/>
</span>
</x-button>
</div>
</div>
</td>
<td>
<div class="select">
<select v-model="selectedView[s.id]">
<option
v-for="(title, key) in availableViews"
:value="key"
:key="key">
{{ title }}
</option>
</select>
</div>
</td> </td>
<td class="actions"> <td class="actions">
<x-button <x-button
@ -177,16 +189,21 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref, watch, computed, shallowReactive} from 'vue' import {ref, watch, computed, shallowReactive} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import RIGHTS from '@/models/constants/rights.json' import {RIGHTS} from '@/constants/rights'
import LinkShareModel from '@/models/linkShare' import LinkShareModel from '@/models/linkShare'
import type {ILinkShare} from '@/modelTypes/ILinkShare'
import type {IList} from '@/modelTypes/IList'
import LinkShareService from '@/services/linkShare' import LinkShareService from '@/services/linkShare'
import {useCopyToClipboard} from '@/composables/useCopyToClipboard' import {useCopyToClipboard} from '@/composables/useCopyToClipboard'
import {success} from '@/message' import {success} from '@/message'
import type {ListView} from '@/types/ListView'
import {LIST_VIEWS} from '@/types/ListView'
const props = defineProps({ const props = defineProps({
listId: { listId: {
@ -197,7 +214,7 @@ const props = defineProps({
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
const linkShares = ref([]) const linkShares = ref<ILinkShare[]>([])
const linkShareService = shallowReactive(new LinkShareService()) const linkShareService = shallowReactive(new LinkShareService())
const selectedRight = ref(RIGHTS.READ) const selectedRight = ref(RIGHTS.READ)
const name = ref('') const name = ref('')
@ -206,6 +223,17 @@ const showDeleteModal = ref(false)
const linkIdToDelete = ref(0) const linkIdToDelete = ref(0)
const showNewForm = ref(false) const showNewForm = ref(false)
type SelectedViewMapper = Record<IList['id'], ListView>
const selectedView = ref<SelectedViewMapper>({})
const availableViews = computed<Record<ListView, string>>(() => ({
list: t('list.list.title'),
gantt: t('list.gantt.title'),
table: t('list.table.title'),
kanban: t('list.kanban.title'),
}))
const copy = useCopyToClipboard() const copy = useCopyToClipboard()
watch( watch(
() => props.listId, () => props.listId,
@ -216,16 +244,20 @@ watch(
const store = useStore() const store = useStore()
const frontendUrl = computed(() => store.state.config.frontendUrl) const frontendUrl = computed(() => store.state.config.frontendUrl)
async function load(listId) { async function load(listId: IList['id']) {
// If listId == 0 the list on the calling component wasn't already loaded, so we just bail out here // If listId == 0 the list on the calling component wasn't already loaded, so we just bail out here
if (listId === 0) { if (listId === 0) {
return return
} }
linkShares.value = await linkShareService.getAll({listId}) const links = await linkShareService.getAll({listId})
links.forEach((l: ILinkShare) => {
selectedView.value[l.id] = 'list'
})
linkShares.value = links
} }
async function add(listId) { async function add(listId: IList['id']) {
const newLinkShare = new LinkShareModel({ const newLinkShare = new LinkShareModel({
right: selectedRight.value, right: selectedRight.value,
listId, listId,
@ -241,7 +273,7 @@ async function add(listId) {
await load(listId) await load(listId)
} }
async function remove(listId) { async function remove(listId: IList['id']) {
try { try {
await linkShareService.delete(new LinkShareModel({ await linkShareService.delete(new LinkShareModel({
id: linkIdToDelete.value, id: linkIdToDelete.value,
@ -254,8 +286,8 @@ async function remove(listId) {
} }
} }
function getShareLink(hash: string) { function getShareLink(hash: string, view: ListView = LIST_VIEWS.LIST) {
return frontendUrl.value + 'share/' + hash + '/auth' return frontendUrl.value + 'share/' + hash + '/auth?view=' + view
} }
</script> </script>

View File

@ -133,32 +133,41 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' export default {name: 'userTeamShare'}
export default defineComponent({name: 'userTeamShare'})
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import {ref, reactive, computed, shallowReactive, ShallowReactive, Ref} from 'vue' import {ref, reactive, computed, shallowReactive, type Ref} from 'vue'
import type {PropType} from 'vue' import type {PropType} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import UserNamespaceService from '@/services/userNamespace' import UserNamespaceService from '@/services/userNamespace'
import UserNamespaceModel from '@/models/userNamespace' import UserNamespaceModel from '@/models/userNamespace'
import UserListModel from '@/models/userList' import type {IUserNamespace} from '@/modelTypes/IUserNamespace'
import UserListService from '@/services/userList' import UserListService from '@/services/userList'
import UserListModel from '@/models/userList'
import type {IUserList} from '@/modelTypes/IUserList'
import UserService from '@/services/user' import UserService from '@/services/user'
import UserModel from '@/models/user' import UserModel from '@/models/user'
import type {IUser} from '@/modelTypes/IUser'
import TeamNamespaceService from '@/services/teamNamespace' import TeamNamespaceService from '@/services/teamNamespace'
import TeamNamespaceModel from '@/models/teamNamespace' import TeamNamespaceModel from '@/models/teamNamespace'
import TeamListModel from '@/models/teamList' import type { ITeamNamespace } from '@/modelTypes/ITeamNamespace'
import TeamListService from '@/services/teamList' import TeamListService from '@/services/teamList'
import TeamListModel from '@/models/teamList'
import type { ITeamList } from '@/modelTypes/ITeamList'
import TeamService from '@/services/team' import TeamService from '@/services/team'
import TeamModel from '@/models/team' import TeamModel from '@/models/team'
import type {ITeam} from '@/modelTypes/ITeam'
import RIGHTS from '@/models/constants/rights.json'
import {RIGHTS} from '@/constants/rights'
import Multiselect from '@/components/input/multiselect.vue' import Multiselect from '@/components/input/multiselect.vue'
import Nothing from '@/components/misc/nothing.vue' import Nothing from '@/components/misc/nothing.vue'
import {success} from '@/message' import {success} from '@/message'
@ -185,10 +194,10 @@ const props = defineProps({
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
// This user service is either a userNamespaceService or a userListService, depending on the type we are using // This user service is either a userNamespaceService or a userListService, depending on the type we are using
let stuffService: ShallowReactive<UserNamespaceService | UserListService | TeamListService | TeamNamespaceService> let stuffService: UserNamespaceService | UserListService | TeamListService | TeamNamespaceService
let stuffModel: UserNamespaceModel | UserListModel | TeamListModel | TeamNamespaceModel let stuffModel: IUserNamespace | IUserList | ITeamList | ITeamNamespace
let searchService: ShallowReactive<UserService | TeamService> let searchService: UserService | TeamService
let sharable: Ref<UserModel | TeamModel> let sharable: Ref<IUser | ITeam>
const searchLabel = ref('') const searchLabel = ref('')
const selectedRight = ref({}) const selectedRight = ref({})
@ -233,6 +242,7 @@ const sharableName = computed(() => {
if (props.shareType === 'user') { if (props.shareType === 'user') {
searchService = shallowReactive(new UserService()) searchService = shallowReactive(new UserService())
// eslint-disable-next-line vue/no-ref-as-operand
sharable = ref(new UserModel()) sharable = ref(new UserModel())
searchLabel.value = 'username' searchLabel.value = 'username'
@ -249,6 +259,7 @@ if (props.shareType === 'user') {
} }
} else if (props.shareType === 'team') { } else if (props.shareType === 'team') {
searchService = new TeamService() searchService = new TeamService()
// eslint-disable-next-line vue/no-ref-as-operand
sharable = ref(new TeamModel()) sharable = ref(new TeamModel())
searchLabel.value = 'name' searchLabel.value = 'name'
@ -355,7 +366,7 @@ async function toggleType(sharable) {
const found = ref([]) const found = ref([])
const currentUserId = computed(() => store.state.auth.info.id) const currentUserId = computed(() => store.state.auth.info.id)
async function find(query) { async function find(query: string) {
if (query === '') { if (query === '') {
found.value = [] found.value = []
return return

View File

@ -43,8 +43,8 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref, watch, unref, shallowReactive} from 'vue' import {ref, watch, unref, shallowReactive} from 'vue'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {tryOnMounted, debouncedWatch, useWindowSize, MaybeRef} from '@vueuse/core' import {tryOnMounted, debouncedWatch, useWindowSize, type MaybeRef} from '@vueuse/core'
import TaskService from '@/services/task' import TaskService from '@/services/task'
import QuickAddMagic from '@/components/tasks/partials/quick-add-magic.vue' import QuickAddMagic from '@/components/tasks/partials/quick-add-magic.vue'
@ -200,7 +200,7 @@ function handleEnter(e: KeyboardEvent) {
} }
function focusTaskInput() { function focusTaskInput() {
newTaskInput.value.focus() newTaskInput.value?.focus()
} }
defineExpose({ defineExpose({

View File

@ -36,8 +36,8 @@
<strong>{{ $t('task.attributes.reminders') }}</strong> <strong>{{ $t('task.attributes.reminders') }}</strong>
<reminders <reminders
@change="editTaskSubmit()"
v-model="taskEditTask.reminderDates" v-model="taskEditTask.reminderDates"
@update:model-value="editTaskSubmit()"
/> />
<div class="field"> <div class="field">
@ -76,7 +76,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, reactive, computed, shallowReactive, watch, nextTick} from 'vue' import {ref, reactive, computed, shallowReactive, watch, nextTick, type PropType} from 'vue'
import {useRouter} from 'vue-router' import {useRouter} from 'vue-router'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
@ -84,6 +84,7 @@ import Editor from '@/components/input/AsyncEditor'
import TaskService from '@/services/task' import TaskService from '@/services/task'
import TaskModel from '@/models/task' import TaskModel from '@/models/task'
import type {ITask} from '@/modelTypes/ITask'
import EditLabels from './partials/editLabels.vue' import EditLabels from './partials/editLabels.vue'
import Reminders from './partials/reminders.vue' import Reminders from './partials/reminders.vue'
import ColorPicker from '../input/colorPicker.vue' import ColorPicker from '../input/colorPicker.vue'
@ -93,14 +94,16 @@ import {success} from '@/message'
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
const router = useRouter() const router = useRouter()
const props = defineProps<{ const props = defineProps({
task?: TaskModel | null, task: {
}>() type: Object as PropType<ITask | null>,
},
})
const taskService = shallowReactive(new TaskService()) const taskService = shallowReactive(new TaskService())
const editorActive = ref(false) const editorActive = ref(false)
let taskEditTask: TaskModel | undefined let taskEditTask: ITask | undefined
// FIXME: this initialization should not be necessary here // FIXME: this initialization should not be necessary here

View File

@ -175,19 +175,20 @@
import {defineComponent} from 'vue' import {defineComponent} from 'vue'
import VueDragResize from 'vue-drag-resize' import VueDragResize from 'vue-drag-resize'
import EditTask from './edit-task' import EditTask from './edit-task.vue'
import TaskService from '../../services/task' import TaskService from '../../services/task'
import TaskModel from '../../models/task' import TaskModel from '../../models/task'
import priorities from '../../models/constants/priorities' import {PRIORITIES as priorities} from '@/constants/priorities'
import PriorityLabel from './partials/priorityLabel' import PriorityLabel from './partials/priorityLabel.vue'
import TaskCollectionService from '../../services/taskCollection' import TaskCollectionService from '../../services/taskCollection'
import {mapState} from 'vuex' import {mapState} from 'vuex'
import Rights from '../../models/constants/rights.json' import {RIGHTS as Rights} from '@/constants/rights'
import FilterPopup from '@/components/list/partials/filter-popup.vue' import FilterPopup from '@/components/list/partials/filter-popup.vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import {colorIsDark} from '@/helpers/color/colorIsDark' import {colorIsDark} from '@/helpers/color/colorIsDark'
import {formatDate} from '@/helpers/time/formatDate'
export default defineComponent({ export default defineComponent({
name: 'GanttChart', name: 'GanttChart',
@ -439,7 +440,7 @@ export default defineComponent({
formatMonthAndYear(year, month) { formatMonthAndYear(year, month) {
month = month < 10 ? '0' + month : month month = month < 10 ? '0' + month : month
const date = new Date(`${year}-${month}-01`) const date = new Date(`${year}-${month}-01`)
return this.format(date, 'MMMM, yyyy') return formatDate(date, 'MMMM, yyyy')
}, },
}, },
}) })

View File

@ -39,7 +39,7 @@
<div class="info"> <div class="info">
<p class="attachment-info-meta"> <p class="attachment-info-meta">
<i18n-t keypath="task.attachment.createdBy"> <i18n-t keypath="task.attachment.createdBy">
<span v-tooltip="formatDate(a.created)"> <span v-tooltip="formatDateLong(a.created)">
{{ formatDateSince(a.created) }} {{ formatDateSince(a.created) }}
</span> </span>
<user <user
@ -49,7 +49,7 @@
/> />
</i18n-t> </i18n-t>
<span> <span>
{{ a.file.getHumanSize() }} {{ getHumanSize(a.file.size) }}
</span> </span>
<span v-if="a.file.mime"> <span v-if="a.file.mime">
{{ a.file.mime }} {{ a.file.mime }}
@ -147,14 +147,18 @@
import {defineComponent} from 'vue' import {defineComponent} from 'vue'
import AttachmentService from '../../../services/attachment' import AttachmentService from '../../../services/attachment'
import AttachmentModel from '../../../models/attachment' import AttachmentModel from '@/models/attachment'
import User from '../../misc/user' import type {IAttachment} from '@/modelTypes/IAttachment'
import User from '@/components/misc/user.vue'
import {mapState} from 'vuex' import {mapState} from 'vuex'
import { useCopyToClipboard } from '@/composables/useCopyToClipboard' import { useCopyToClipboard } from '@/composables/useCopyToClipboard'
import { uploadFiles, generateAttachmentUrl } from '@/helpers/attachments' import { uploadFiles, generateAttachmentUrl } from '@/helpers/attachments'
import {formatDate, formatDateSince, formatDateLong} from '@/helpers/time/formatDate'
import BaseButton from '@/components/base/BaseButton' import BaseButton from '@/components/base/BaseButton.vue'
import type { IFile } from '@/modelTypes/IFile'
import { getHumanSize } from '@/helpers/getHumanSize'
export default defineComponent({ export default defineComponent({
name: 'attachments', name: 'attachments',
@ -190,7 +194,7 @@ export default defineComponent({
setup(props) { setup(props) {
const copy = useCopyToClipboard() const copy = useCopyToClipboard()
function copyUrl(attachment: AttachmentModel) { function copyUrl(attachment: IAttachment) {
copy(generateAttachmentUrl(props.taskId, attachment.id)) copy(generateAttachmentUrl(props.taskId, attachment.id))
} }
@ -229,7 +233,12 @@ export default defineComponent({
}) })
}, },
methods: { methods: {
downloadAttachment(attachment) { getHumanSize,
formatDate,
formatDateSince,
formatDateLong,
downloadAttachment(attachment: IAttachment) {
this.attachmentService.download(attachment) this.attachmentService.download(attachment)
}, },
uploadNewAttachment() { uploadNewAttachment() {
@ -239,7 +248,7 @@ export default defineComponent({
this.uploadFiles(this.$refs.files.files) this.uploadFiles(this.$refs.files.files)
}, },
uploadFiles(files) { uploadFiles(files: IFile[]) {
uploadFiles(this.attachmentService, this.taskId, files) uploadFiles(this.attachmentService, this.taskId, files)
}, },
async deleteAttachment() { async deleteAttachment() {

View File

@ -10,15 +10,15 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {computed} from 'vue' import {computed, type PropType} from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import {getChecklistStatistics} from '@/helpers/checklistFromText' import {getChecklistStatistics} from '@/helpers/checklistFromText'
import TaskModel from '@/models/task' import type {ITask} from '@/modelTypes/ITask'
const props = defineProps({ const props = defineProps({
task: { task: {
type: TaskModel, type: Object as PropType<ITask>,
required: true, required: true,
}, },
}) })

View File

@ -34,12 +34,12 @@
width="20" width="20"
/> />
<strong>{{ c.author.getDisplayName() }}</strong>&nbsp; <strong>{{ c.author.getDisplayName() }}</strong>&nbsp;
<span v-tooltip="formatDate(c.created)" class="has-text-grey"> <span v-tooltip="formatDateLong(c.created)" class="has-text-grey">
{{ formatDateSince(c.created) }} {{ formatDateSince(c.created) }}
</span> </span>
<span <span
v-if="+new Date(c.created) !== +new Date(c.updated)" v-if="+new Date(c.created) !== +new Date(c.updated)"
v-tooltip="formatDate(c.updated)" v-tooltip="formatDateLong(c.updated)"
> >
· {{ $t('task.comment.edited', {date: formatDateSince(c.updated)}) }} · {{ $t('task.comment.edited', {date: formatDateSince(c.updated)}) }}
</span> </span>
@ -70,13 +70,13 @@
:is-edit-enabled="canWrite && c.author.id === currentUserId" :is-edit-enabled="canWrite && c.author.id === currentUserId"
:upload-callback="attachmentUpload" :upload-callback="attachmentUpload"
:upload-enabled="true" :upload-enabled="true"
@change=" v-model="c.comment"
@update:model-value="
() => { () => {
toggleEdit(c) toggleEdit(c)
editComment() editComment()
} }
" "
v-model="c.comment"
:bottom-actions="actions[c.id]" :bottom-actions="actions[c.id]"
:show-save="true" :show-save="true"
/> />
@ -153,15 +153,20 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref, reactive, computed, shallowReactive, watch, nextTick} from 'vue' import {ref, reactive, computed, shallowReactive, watch, nextTick} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import Editor from '@/components/input/AsyncEditor' import Editor from '@/components/input/AsyncEditor'
import TaskCommentService from '@/services/taskComment' import TaskCommentService from '@/services/taskComment'
import TaskCommentModel from '@/models/taskComment' import TaskCommentModel from '@/models/taskComment'
import type {ITaskComment} from '@/modelTypes/ITaskComment'
import type {ITask} from '@/modelTypes/ITask'
import {uploadFile} from '@/helpers/attachments' import {uploadFile} from '@/helpers/attachments'
import {success} from '@/message' import {success} from '@/message'
import {formatDateLong, formatDateSince} from '@/helpers/time/formatDate'
const props = defineProps({ const props = defineProps({
taskId: { taskId: {
@ -176,7 +181,7 @@ const props = defineProps({
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
const store = useStore() const store = useStore()
const comments = ref<TaskCommentModel[]>([]) const comments = ref<ITaskComment[]>([])
const showDeleteModal = ref(false) const showDeleteModal = ref(false)
const commentToDelete = reactive(new TaskCommentModel()) const commentToDelete = reactive(new TaskCommentModel())
@ -186,8 +191,8 @@ const commentEdit = reactive(new TaskCommentModel())
const newComment = reactive(new TaskCommentModel()) const newComment = reactive(new TaskCommentModel())
const saved = ref(null) const saved = ref<ITask['id'] | null>(null)
const saving = ref(null) const saving = ref<ITask['id'] | null>(null)
const userAvatar = computed(() => store.state.auth.info.getAvatarUrl(48)) const userAvatar = computed(() => store.state.auth.info.getAvatarUrl(48))
const currentUserId = computed(() => store.state.auth.info.id) const currentUserId = computed(() => store.state.auth.info.id)
@ -213,7 +218,7 @@ function attachmentUpload(...args) {
const taskCommentService = shallowReactive(new TaskCommentService()) const taskCommentService = shallowReactive(new TaskCommentService())
async function loadComments(taskId) { async function loadComments(taskId: ITask['id']) {
if (!enabled.value) { if (!enabled.value) {
return return
} }
@ -257,12 +262,12 @@ async function addComment() {
} }
} }
function toggleEdit(comment: TaskCommentModel) { function toggleEdit(comment: ITaskComment) {
isCommentEdit.value = !isCommentEdit.value isCommentEdit.value = !isCommentEdit.value
Object.assign(commentEdit, comment) Object.assign(commentEdit, comment)
} }
function toggleDelete(commentId) { function toggleDelete(commentId: ITaskComment['id']) {
showDeleteModal.value = !showDeleteModal.value showDeleteModal.value = !showDeleteModal.value
commentToDelete.id = commentId commentToDelete.id = commentId
} }
@ -292,7 +297,7 @@ async function editComment() {
} }
} }
async function deleteComment(commentToDelete: TaskCommentModel) { async function deleteComment(commentToDelete: ITaskComment) {
try { try {
await taskCommentService.delete(commentToDelete) await taskCommentService.delete(commentToDelete)
const index = comments.value.findIndex(({id}) => id === commentToDelete.id) const index = comments.value.findIndex(({id}) => id === commentToDelete.id)

View File

@ -1,6 +1,6 @@
<template> <template>
<p class="created"> <p class="created">
<time :datetime="formatISO(task.created)" v-tooltip="formatDate(task.created)"> <time :datetime="formatISO(task.created)" v-tooltip="formatDateLong(task.created)">
<i18n-t keypath="task.detail.created"> <i18n-t keypath="task.detail.created">
<span>{{ formatDateSince(task.created) }}</span> <span>{{ formatDateSince(task.created) }}</span>
{{ task.createdBy.getDisplayName() }} {{ task.createdBy.getDisplayName() }}
@ -27,13 +27,13 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {computed, toRefs} from 'vue' import {computed, toRefs, type PropType} from 'vue'
import TaskModel from '@/models/task' import type {ITask} from '@/modelTypes/ITask'
import {formatDateLong, formatDateSince} from '@/helpers/time/formatDate' import {formatISO, formatDateLong, formatDateSince} from '@/helpers/time/formatDate'
const props = defineProps({ const props = defineProps({
task: { task: {
type: TaskModel, type: Object as PropType<ITask>,
required: true, required: true,
}, },
}) })

View File

@ -1,12 +1,14 @@
<template> <template>
<td v-tooltip="+date === 0 ? '' : formatDate(date)"> <td v-tooltip="+date === 0 ? '' : formatDateLong(date)">
<time :datetime="date ? formatISO(date) : null"> <time :datetime="date ? formatISO(date) : undefined">
{{ +date === 0 ? '-' : formatDateSince(date) }} {{ +date === 0 ? '-' : formatDateSince(date) }}
</time> </time>
</td> </td>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {formatISO, formatDateLong, formatDateSince} from '@/helpers/time/formatDate'
defineProps({ defineProps({
date: { date: {
type: Date, type: Date,

View File

@ -38,17 +38,17 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, shallowReactive, computed, watch, onMounted, onBeforeUnmount} from 'vue' import {ref, shallowReactive, computed, watch, onMounted, onBeforeUnmount, type PropType} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import flatPickr from 'vue-flatpickr-component' import flatPickr from 'vue-flatpickr-component'
import TaskService from '@/services/task' import TaskService from '@/services/task'
import TaskModel from '@/models/task' import type {ITask} from '@/modelTypes/ITask'
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
type: TaskModel, type: Object as PropType<ITask>,
required: true, required: true,
}, },
}) })
@ -58,7 +58,7 @@ const {t} = useI18n({useScope: 'global'})
const store = useStore() const store = useStore()
const taskService = shallowReactive(new TaskService()) const taskService = shallowReactive(new TaskService())
const task = ref<TaskModel>() const task = ref<ITask>()
// We're saving the due date seperately to prevent null errors in very short periods where the task is null. // We're saving the due date seperately to prevent null errors in very short periods where the task is null.
const dueDate = ref<Date>() const dueDate = ref<Date>()

View File

@ -20,40 +20,42 @@
:is-edit-enabled="canWrite" :is-edit-enabled="canWrite"
:upload-callback="attachmentUpload" :upload-callback="attachmentUpload"
:upload-enabled="true" :upload-enabled="true"
@change="save"
:placeholder="$t('task.description.placeholder')" :placeholder="$t('task.description.placeholder')"
:empty-text="$t('task.description.empty')" :empty-text="$t('task.description.empty')"
:show-save="true" :show-save="true"
edit-shortcut="e"
v-model="task.description" v-model="task.description"
@update:model-value="save"
/> />
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref,computed, watch} from 'vue' import {ref,computed, watch, type PropType} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import Editor from '@/components/input/AsyncEditor' import Editor from '@/components/input/AsyncEditor'
import TaskModel from '@/models/task' import type {ITask} from '@/modelTypes/ITask'
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
type: TaskModel, type: Object as PropType<ITask>,
required: true, required: true,
}, },
attachmentUpload: { attachmentUpload: {
required: true, required: true,
}, },
canWrite: { canWrite: {
type: Boolean,
required: true, required: true,
}, },
}) })
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])
const task = ref<TaskModel>({description: ''}) const task = ref<ITask>({description: ''})
const saved = ref(false) const saved = ref(false)
// Since loading is global state, this variable ensures we're only showing the saving icon when saving the description. // Since loading is global state, this variable ensures we're only showing the saving icon when saving the description.

View File

@ -10,7 +10,7 @@
@search="findUser" @search="findUser"
:search-results="foundUsers" :search-results="foundUsers"
@select="addAssignee" @select="addAssignee"
label="username" label="name"
:select-placeholder="$t('task.assignee.selectPlaceholder')" :select-placeholder="$t('task.assignee.selectPlaceholder')"
v-model="assignees" v-model="assignees"
ref="multiselect" ref="multiselect"
@ -28,8 +28,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, shallowReactive, watch, PropType} from 'vue' import {ref, shallowReactive, watch, type PropType} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import User from '@/components/misc/user.vue' import User from '@/components/misc/user.vue'
@ -37,9 +37,9 @@ import Multiselect from '@/components/input/multiselect.vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import {includesById} from '@/helpers/utils' import {includesById} from '@/helpers/utils'
import UserModel from '@/models/user'
import ListUserService from '@/services/listUsers' import ListUserService from '@/services/listUsers'
import {success} from '@/message' import {success} from '@/message'
import type { IUser } from '@/modelTypes/IUser'
const props = defineProps({ const props = defineProps({
taskId: { taskId: {
@ -54,7 +54,7 @@ const props = defineProps({
default: false, default: false,
}, },
modelValue: { modelValue: {
type: Array as PropType<UserModel[]>, type: Array as PropType<IUser[]>,
default: () => [], default: () => [],
}, },
}) })
@ -65,7 +65,7 @@ const {t} = useI18n({useScope: 'global'})
const listUserService = shallowReactive(new ListUserService()) const listUserService = shallowReactive(new ListUserService())
const foundUsers = ref([]) const foundUsers = ref([])
const assignees = ref<UserModel[]>([]) const assignees = ref<IUser[]>([])
watch( watch(
() => props.modelValue, () => props.modelValue,
@ -78,13 +78,13 @@ watch(
}, },
) )
async function addAssignee(user: UserModel) { async function addAssignee(user: IUser) {
await store.dispatch('tasks/addAssignee', {user: user, taskId: props.taskId}) await store.dispatch('tasks/addAssignee', {user: user, taskId: props.taskId})
emit('update:modelValue', assignees.value) emit('update:modelValue', assignees.value)
success({message: t('task.assignee.assignSuccess')}) success({message: t('task.assignee.assignSuccess')})
} }
async function removeAssignee(user: UserModel) { async function removeAssignee(user: IUser) {
await store.dispatch('tasks/removeAssignee', {user: user, taskId: props.taskId}) await store.dispatch('tasks/removeAssignee', {user: user, taskId: props.taskId})
// Remove the assignee from the list // Remove the assignee from the list
@ -106,6 +106,11 @@ async function findUser(query: string) {
// Filter the results to not include users who are already assigned // Filter the results to not include users who are already assigned
foundUsers.value = response.filter(({id}) => !includesById(assignees.value, id)) foundUsers.value = response.filter(({id}) => !includesById(assignees.value, id))
.map(u => {
// Users may not have a display name set, so we fall back on the username in that case
u.name = u.name === '' ? u.username : u.name
return u
})
} }
function clearAllFoundUsers() { function clearAllFoundUsers() {

View File

@ -39,8 +39,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {PropType, ref, computed, shallowReactive, watch} from 'vue' import {type PropType, ref, computed, shallowReactive, watch} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import LabelModel from '@/models/label' import LabelModel from '@/models/label'
@ -49,10 +49,12 @@ import {success} from '@/message'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import Multiselect from '@/components/input/multiselect.vue' import Multiselect from '@/components/input/multiselect.vue'
import type { ILabel } from '@/modelTypes/ILabel'
import { useLabelStore } from '@/stores/labels'
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
type: Array as PropType<LabelModel[]>, type: Array as PropType<ILabel[]>,
default: () => [], default: () => [],
}, },
taskId: { taskId: {
@ -65,13 +67,13 @@ const props = defineProps({
}, },
}) })
const emit = defineEmits(['update:modelValue', 'change']) const emit = defineEmits(['update:modelValue'])
const store = useStore() const store = useStore()
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
const labelTaskService = shallowReactive(new LabelTaskService()) const labelTaskService = shallowReactive(new LabelTaskService())
const labels = ref<LabelModel[]>([]) const labels = ref<ILabel[]>([])
const query = ref('') const query = ref('')
watch( watch(
@ -85,17 +87,18 @@ watch(
}, },
) )
const foundLabels = computed(() => store.getters['labels/filterLabelsByQuery'](labels.value, query.value)) const labelStore = useLabelStore()
const loading = computed(() => labelTaskService.loading || (store.state.loading && store.state.loadingModule === 'labels'))
const foundLabels = computed(() => labelStore.filterLabelsByQuery(labels.value, query.value))
const loading = computed(() => labelTaskService.loading || labelStore.isLoading)
function findLabel(newQuery: string) { function findLabel(newQuery: string) {
query.value = newQuery query.value = newQuery
} }
async function addLabel(label: LabelModel, showNotification = true) { async function addLabel(label: ILabel, showNotification = true) {
const bubble = () => { const bubble = () => {
emit('update:modelValue', labels.value) emit('update:modelValue', labels.value)
emit('change', labels.value)
} }
if (props.taskId === 0) { if (props.taskId === 0) {
@ -110,18 +113,17 @@ async function addLabel(label: LabelModel, showNotification = true) {
} }
} }
async function removeLabel(label: LabelModel) { async function removeLabel(label: ILabel) {
if (props.taskId !== 0) { if (props.taskId !== 0) {
await store.dispatch('tasks/removeLabel', {label, taskId: props.taskId}) await store.dispatch('tasks/removeLabel', {label, taskId: props.taskId})
} }
for (const l in labels.value) { for (const l in labels.value) {
if (labels.value[l].id === label.id) { if (labels.value[l].id === label.id) {
labels.value.splice(l, 1) labels.value.splice(l, 1) // FIXME: l should be index
} }
} }
emit('update:modelValue', labels.value) emit('update:modelValue', labels.value)
emit('change', labels.value)
success({message: t('task.label.removeSuccess')}) success({message: t('task.label.removeSuccess')})
} }
@ -130,7 +132,8 @@ async function createAndAddLabel(title: string) {
return return
} }
const newLabel = await store.dispatch('labels/createLabel', new LabelModel({title})) const labelStore = useLabelStore()
const newLabel = await labelStore.createLabel(new LabelModel({title}))
addLabel(newLabel, false) addLabel(newLabel, false)
labels.value.push(newLabel) labels.value.push(newLabel)
success({message: t('task.label.addCreateSuccess')}) success({message: t('task.label.addCreateSuccess')})

View File

@ -2,6 +2,11 @@
<div class="heading"> <div class="heading">
<BaseButton @click="copyUrl"><h1 class="title task-id">{{ textIdentifier }}</h1></BaseButton> <BaseButton @click="copyUrl"><h1 class="title task-id">{{ textIdentifier }}</h1></BaseButton>
<Done class="heading__done" :is-done="task.done"/> <Done class="heading__done" :is-done="task.done"/>
<ColorBubble
v-if="task.hexColor !== ''"
:color="task.getHexColor()"
class="mt-1 ml-2"
/>
<h1 <h1
class="title input" class="title input"
:class="{'disabled': !canWrite}" :class="{'disabled': !canWrite}"
@ -32,18 +37,21 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, computed} from 'vue' import {ref, computed, type PropType} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useRouter} from 'vue-router'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import Done from '@/components/misc/Done.vue' import Done from '@/components/misc/Done.vue'
import TaskModel from '@/models/task'
import { useRouter } from 'vue-router'
import {useCopyToClipboard} from '@/composables/useCopyToClipboard' import {useCopyToClipboard} from '@/composables/useCopyToClipboard'
import type {ITask} from '@/modelTypes/ITask'
import ColorBubble from '@/components/misc/colorBubble.vue'
const props = defineProps({ const props = defineProps({
task: { task: {
type: TaskModel, type: Object as PropType<ITask>,
required: true, required: true,
}, },
canWrite: { canWrite: {
@ -56,6 +64,7 @@ const emit = defineEmits(['update:task'])
const router = useRouter() const router = useRouter()
const copy = useCopyToClipboard() const copy = useCopyToClipboard()
async function copyUrl() { async function copyUrl() {
const route = router.resolve({name: 'task.detail', query: {taskId: props.task.id}}) const route = router.resolve({name: 'task.detail', query: {taskId: props.task.id}})
const absoluteURL = new URL(route.href, window.location.href).href const absoluteURL = new URL(route.href, window.location.href).href
@ -93,8 +102,7 @@ async function save(title: string) {
setTimeout(() => { setTimeout(() => {
showSavedMessage.value = false showSavedMessage.value = false
}, 2000) }, 2000)
} } finally {
finally {
saving.value = false saving.value = false
} }
} }
@ -104,4 +112,9 @@ async function save(title: string) {
.heading__done { .heading__done {
margin-left: .5rem; margin-left: .5rem;
} }
.color-bubble {
height: .75rem;
width: .75rem;
}
</style> </style>

View File

@ -24,7 +24,7 @@
:class="{'overdue': task.dueDate <= new Date() && !task.done}" :class="{'overdue': task.dueDate <= new Date() && !task.done}"
class="due-date" class="due-date"
v-if="task.dueDate > 0" v-if="task.dueDate > 0"
v-tooltip="formatDate(task.dueDate)"> v-tooltip="formatDateLong(task.dueDate)">
<span class="icon"> <span class="icon">
<icon :icon="['far', 'calendar-alt']"/> <icon :icon="['far', 'calendar-alt']"/>
</span> </span>
@ -66,16 +66,18 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import {defineComponent, type PropType} from 'vue'
import {playPop} from '../../../helpers/playPop' import {playPop} from '../../../helpers/playPop'
import PriorityLabel from '../../../components/tasks/partials/priorityLabel' import PriorityLabel from '../../../components/tasks/partials/priorityLabel.vue'
import User from '../../../components/misc/user' import User from '../../../components/misc/user.vue'
import Done from '@/components/misc/Done.vue' import Done from '@/components/misc/Done.vue'
import Labels from '../../../components/tasks/partials/labels' import Labels from '../../../components/tasks/partials/labels.vue'
import ChecklistSummary from './checklist-summary' import ChecklistSummary from './checklist-summary.vue'
import {TASK_DEFAULT_COLOR} from '@/models/task' import {TASK_DEFAULT_COLOR} from '@/models/task'
import type {ITask} from '@/modelTypes/ITask'
import {formatDateLong, formatISO, formatDateSince} from '@/helpers/time/formatDate'
import {colorIsDark} from '@/helpers/color/colorIsDark' import {colorIsDark} from '@/helpers/color/colorIsDark'
export default defineComponent({ export default defineComponent({
@ -95,6 +97,7 @@ export default defineComponent({
}, },
props: { props: {
task: { task: {
type: Object as PropType<ITask>,
required: true, required: true,
}, },
loading: { loading: {
@ -111,8 +114,11 @@ export default defineComponent({
}, },
}, },
methods: { methods: {
formatDateLong,
formatISO,
formatDateSince,
colorIsDark, colorIsDark,
async toggleTaskDone(task) { async toggleTaskDone(task: ITask) {
this.loadingInternal = true this.loadingInternal = true
try { try {
const done = !task.done const done = !task.done

View File

@ -11,8 +11,12 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import type {PropType} from 'vue'
import type {ILabel} from '@/modelTypes/ILabel'
defineProps({ defineProps({
labels: { labels: {
type: Array as PropType<ILabel[]>,
required: true, required: true,
}, },
}) })

View File

@ -1,5 +1,5 @@
<template> <template>
<multiselect <Multiselect
class="control is-expanded" class="control is-expanded"
:placeholder="$t('list.search')" :placeholder="$t('list.search')"
@search="findLists" @search="findLists"
@ -13,23 +13,21 @@
<span class="list-namespace-title search-result">{{ namespace(props.option.namespaceId) }} ></span> <span class="list-namespace-title search-result">{{ namespace(props.option.namespaceId) }} ></span>
{{ props.option.title }} {{ props.option.title }}
</template> </template>
</multiselect> </Multiselect>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {reactive, ref, watch} from 'vue' import {reactive, ref, watch} from 'vue'
import type {PropType} from 'vue' import type {PropType} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import ListModel from '@/models/list' import ListModel from '@/models/list'
import type {IList} from '@/modelTypes/IList'
import Multiselect from '@/components/input/multiselect.vue' import Multiselect from '@/components/input/multiselect.vue'
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
type: Object as PropType<ListModel>, type: Object as PropType<IList>,
validator(value) {
return value instanceof ListModel
},
required: false, required: false,
}, },
}) })
@ -38,7 +36,7 @@ const emit = defineEmits(['update:modelValue'])
const store = useStore() const store = useStore()
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
const list = reactive<ListModel>(new ListModel()) const list: IList = reactive(new ListModel())
watch( watch(
() => props.modelValue, () => props.modelValue,
@ -57,7 +55,10 @@ function findLists(query: string) {
foundLists.value = store.getters['lists/searchList'](query) foundLists.value = store.getters['lists/searchList'](query)
} }
function select(l: ListModel | null) { function select(l: IList | null) {
if (l === null) {
return
}
Object.assign(list, l) Object.assign(list, l)
emit('update:modelValue', list) emit('update:modelValue', list)
} }

View File

@ -32,13 +32,12 @@ const props = defineProps({
}, },
}) })
const emit = defineEmits(['update:modelValue', 'change']) const emit = defineEmits(['update:modelValue'])
const percentDone = computed({ const percentDone = computed({
get: () => props.modelValue, get: () => props.modelValue,
set(percentDone) { set(percentDone) {
emit('update:modelValue', percentDone) emit('update:modelValue', percentDone)
emit('change')
}, },
}) })
</script> </script>

View File

@ -21,7 +21,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import priorities from '@/models/constants/priorities' import {PRIORITIES as priorities} from '@/constants/priorities'
defineProps({ defineProps({
priority: { priority: {

View File

@ -5,33 +5,33 @@
@change="updateData" @change="updateData"
:disabled="disabled || undefined" :disabled="disabled || undefined"
> >
<option :value="priorities.UNSET">{{ $t('task.priority.unset') }}</option> <option :value="PRIORITIES.UNSET">{{ $t('task.priority.unset') }}</option>
<option :value="priorities.LOW">{{ $t('task.priority.low') }}</option> <option :value="PRIORITIES.LOW">{{ $t('task.priority.low') }}</option>
<option :value="priorities.MEDIUM">{{ $t('task.priority.medium') }}</option> <option :value="PRIORITIES.MEDIUM">{{ $t('task.priority.medium') }}</option>
<option :value="priorities.HIGH">{{ $t('task.priority.high') }}</option> <option :value="PRIORITIES.HIGH">{{ $t('task.priority.high') }}</option>
<option :value="priorities.URGENT">{{ $t('task.priority.urgent') }}</option> <option :value="PRIORITIES.URGENT">{{ $t('task.priority.urgent') }}</option>
<option :value="priorities.DO_NOW">{{ $t('task.priority.doNow') }}</option> <option :value="PRIORITIES.DO_NOW">{{ $t('task.priority.doNow') }}</option>
</select> </select>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, watch} from 'vue' import {ref, watch} from 'vue'
import priorities from '@/models/constants/priorities.json' import {PRIORITIES} from '@/constants/priorities'
const priority = ref(0)
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
default: 0,
type: Number, type: Number,
default: 0,
}, },
disabled: { disabled: {
default: false, default: false,
}, },
}) })
const emit = defineEmits(['update:modelValue', 'change']) const emit = defineEmits(['update:modelValue'])
const priority = ref(0)
// FIXME: store value outside // FIXME: store value outside
// Set the priority to the :value every time it changes from the outside // Set the priority to the :value every time it changes from the outside
@ -45,6 +45,5 @@ watch(
function updateData() { function updateData() {
emit('update:modelValue', priority.value) emit('update:modelValue', priority.value)
emit('change')
} }
</script> </script>

View File

@ -144,8 +144,8 @@ import {defineComponent} from 'vue'
import TaskService from '../../../services/task' import TaskService from '../../../services/task'
import TaskModel from '../../../models/task' import TaskModel from '../../../models/task'
import TaskRelationService from '../../../services/taskRelation' import TaskRelationService from '../../../services/taskRelation'
import relationKinds from '../../../models/constants/relationKinds' import TaskRelationModel from '@/models/taskRelation'
import TaskRelationModel from '../../../models/taskRelation' import { RELATION_KIND, RELATION_KINDS } from '@/types/IRelationKind'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import Multiselect from '@/components/input/multiselect.vue' import Multiselect from '@/components/input/multiselect.vue'
@ -157,9 +157,9 @@ export default defineComponent({
relatedTasks: {}, relatedTasks: {},
taskService: new TaskService(), taskService: new TaskService(),
foundTasks: [], foundTasks: [],
relationKinds: relationKinds, relationKinds: RELATION_KINDS,
newTaskRelationTask: new TaskModel(), newTaskRelationTask: new TaskModel(),
newTaskRelationKind: 'related', newTaskRelationKind: RELATION_KIND.RELATED,
taskRelationService: new TaskRelationService(), taskRelationService: new TaskRelationService(),
showDeleteModal: false, showDeleteModal: false,
relationToDelete: {}, relationToDelete: {},
@ -221,7 +221,7 @@ export default defineComponent({
}, },
}, },
methods: { methods: {
async findTasks(query) { async findTasks(query: string) {
this.query = query this.query = query
this.foundTasks = await this.taskService.getAll({}, {s: query}) this.foundTasks = await this.taskService.getAll({}, {s: query})
}, },

View File

@ -26,7 +26,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {PropType, ref, onMounted, watch} from 'vue' import {type PropType, ref, onMounted, watch} from 'vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import Datepicker from '@/components/input/datepicker.vue' import Datepicker from '@/components/input/datepicker.vue'
@ -45,8 +45,8 @@ const props = defineProps({
return false return false
} }
const isDate = (e: any) => e instanceof Date const isDate = (e: unknown) => e instanceof Date
const isString = (e: any) => typeof e === 'string' const isString = (e: unknown) => typeof e === 'string'
for (const e of prop) { for (const e of prop) {
if (!isDate(e) && !isString(e)) { if (!isDate(e) && !isString(e)) {
@ -63,7 +63,7 @@ const props = defineProps({
}, },
}) })
const emit = defineEmits(['update:modelValue', 'change']) const emit = defineEmits(['update:modelValue'])
const reminders = ref<Reminder[]>([]) const reminders = ref<Reminder[]>([])
@ -86,7 +86,6 @@ watch(
function updateData() { function updateData() {
emit('update:modelValue', reminders.value) emit('update:modelValue', reminders.value)
emit('change')
} }
const newReminder = ref(null) const newReminder = ref(null)

View File

@ -18,17 +18,14 @@
<div class="control"> <div class="control">
<div class="select"> <div class="select">
<select @change="updateData" v-model="task.repeatMode" id="repeatMode"> <select @change="updateData" v-model="task.repeatMode" id="repeatMode">
<option :value="repeatModes.REPEAT_MODE_DEFAULT">{{ $t('misc.default') }}</option> <option :value="TASK_REPEAT_MODES.REPEAT_MODE_DEFAULT">{{ $t('misc.default') }}</option>
<option :value="repeatModes.REPEAT_MODE_MONTH">{{ $t('task.repeat.monthly') }}</option> <option :value="TASK_REPEAT_MODES.REPEAT_MODE_MONTH">{{ $t('task.repeat.monthly') }}</option>
<option :value="repeatModes.REPEAT_MODE_FROM_CURRENT_DATE">{{ <option :value="TASK_REPEAT_MODES.REPEAT_MODE_FROM_CURRENT_DATE">{{ $t('task.repeat.fromCurrentDate') }}</option>
$t('task.repeat.fromCurrentDate')
}}
</option>
</select> </select>
</div> </div>
</div> </div>
</div> </div>
<div class="is-flex" v-if="task.repeatMode !== repeatModes.REPEAT_MODE_MONTH"> <div class="is-flex" v-if="task.repeatMode !== TASK_REPEAT_MODES.REPEAT_MODE_MONTH">
<p class="pr-4"> <p class="pr-4">
{{ $t('task.repeat.each') }} {{ $t('task.repeat.each') }}
</p> </p>
@ -65,14 +62,18 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, reactive, watch} from 'vue' import {ref, reactive, watch, type PropType} from 'vue'
import repeatModes from '@/models/constants/taskRepeatModes.json'
import TaskModel from '@/models/task'
import {error} from '@/message'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import {error} from '@/message'
import {TASK_REPEAT_MODES} from '@/types/IRepeatMode'
import type {IRepeatAfter} from '@/types/IRepeatAfter'
import type {ITask} from '@/modelTypes/ITask'
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
type: Object as PropType<ITask>,
default: () => ({}), default: () => ({}),
required: true, required: true,
}, },
@ -84,9 +85,9 @@ const props = defineProps({
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
const emit = defineEmits(['update:modelValue', 'change']) const emit = defineEmits(['update:modelValue'])
const task = ref<TaskModel>() const task = ref<ITask>()
const repeatAfter = reactive({ const repeatAfter = reactive({
amount: 0, amount: 0,
type: '', type: '',
@ -104,7 +105,7 @@ watch(
) )
function updateData() { function updateData() {
if (task.value.repeatMode !== repeatModes.REPEAT_MODE_DEFAULT && repeatAfter.amount === 0) { if (!task.value || task.value.repeatMode !== TASK_REPEAT_MODES.REPEAT_MODE_DEFAULT && repeatAfter.amount === 0) {
return return
} }
@ -115,10 +116,9 @@ function updateData() {
Object.assign(task.value.repeatAfter, repeatAfter) Object.assign(task.value.repeatAfter, repeatAfter)
emit('update:modelValue', task.value) emit('update:modelValue', task.value)
emit('change')
} }
function setRepeatAfter(amount: number, type) { function setRepeatAfter(amount: number, type: IRepeatAfter['type']) {
Object.assign(repeatAfter, { amount, type}) Object.assign(repeatAfter, { amount, type})
updateData() updateData()
} }

View File

@ -1,12 +1,11 @@
<template> <template>
<div :class="{'is-loading': taskService.loading}" class="task loader-container"> <div :class="{'is-loading': taskService.loading}" class="task loader-container">
<fancycheckbox :disabled="(isArchived || disabled) && !canMarkAsDone" @change="markAsDone" v-model="task.done"/> <fancycheckbox :disabled="(isArchived || disabled) && !canMarkAsDone" @change="markAsDone" v-model="task.done"/>
<span <ColorBubble
v-if="showListColor && listColor !== ''" v-if="showListColor && listColor !== ''"
:style="{backgroundColor: listColor }" :color="listColor"
class="color-bubble" class="mr-1"
> />
</span>
<router-link <router-link
:to="taskDetailRoute" :to="taskDetailRoute"
:class="{ 'done': task.done}" :class="{ 'done': task.done}"
@ -15,11 +14,17 @@
<router-link <router-link
:to="{ name: 'list.list', params: { listId: task.listId } }" :to="{ name: 'list.list', params: { listId: task.listId } }"
class="task-list" class="task-list"
:class="{'mr-2': task.hexColor !== ''}"
v-if="showList && $store.getters['lists/getListById'](task.listId) !== null" v-if="showList && $store.getters['lists/getListById'](task.listId) !== null"
v-tooltip="$t('task.detail.belongsToList', {list: $store.getters['lists/getListById'](task.listId).title})"> v-tooltip="$t('task.detail.belongsToList', {list: $store.getters['lists/getListById'](task.listId).title})">
{{ $store.getters['lists/getListById'](task.listId).title }} {{ $store.getters['lists/getListById'](task.listId).title }}
</router-link> </router-link>
<ColorBubble
v-if="task.hexColor !== ''"
:color="task.getHexColor()"
class="mr-1"
/>
<!-- Show any parent tasks to make it clear this task is a sub task of something --> <!-- Show any parent tasks to make it clear this task is a sub task of something -->
<span class="parent-tasks" v-if="typeof task.relatedTasks.parenttask !== 'undefined'"> <span class="parent-tasks" v-if="typeof task.relatedTasks.parenttask !== 'undefined'">
<template v-for="(pt, i) in task.relatedTasks.parenttask"> <template v-for="(pt, i) in task.relatedTasks.parenttask">
@ -43,7 +48,7 @@
v-if="+new Date(task.dueDate) > 0" v-if="+new Date(task.dueDate) > 0"
class="dueDate" class="dueDate"
@click.prevent.stop="showDefer = !showDefer" @click.prevent.stop="showDefer = !showDefer"
v-tooltip="formatDate(task.dueDate)" v-tooltip="formatDateLong(task.dueDate)"
> >
<time <time
:datetime="formatISO(task.dueDate)" :datetime="formatISO(task.dueDate)"
@ -96,19 +101,22 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import {defineComponent, type PropType} from 'vue'
import TaskModel from '../../../models/task' import TaskModel from '@/models/task'
import PriorityLabel from './priorityLabel' import type {ITask} from '@/modelTypes/ITask'
import PriorityLabel from './priorityLabel.vue'
import TaskService from '../../../services/task' import TaskService from '../../../services/task'
import Labels from './labels' import Labels from '@/components/tasks/partials/labels.vue'
import User from '../../misc/user' import User from '@/components/misc/user.vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import Fancycheckbox from '../../input/fancycheckbox' import Fancycheckbox from '../../input/fancycheckbox.vue'
import DeferTask from './defer-task' import DeferTask from './defer-task.vue'
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside' import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
import {playPop} from '@/helpers/playPop' import {playPop} from '@/helpers/playPop'
import ChecklistSummary from './checklist-summary' import ChecklistSummary from './checklist-summary.vue'
import {formatDateSince, formatISO, formatDateLong} from '@/helpers/time/formatDate'
import ColorBubble from '@/components/misc/colorBubble.vue'
export default defineComponent({ export default defineComponent({
name: 'singleTaskInList', name: 'singleTaskInList',
@ -120,6 +128,7 @@ export default defineComponent({
} }
}, },
components: { components: {
ColorBubble,
BaseButton, BaseButton,
ChecklistSummary, ChecklistSummary,
DeferTask, DeferTask,
@ -130,7 +139,7 @@ export default defineComponent({
}, },
props: { props: {
theTask: { theTask: {
type: TaskModel, type: Object as PropType<ITask>,
required: true, required: true,
}, },
isArchived: { isArchived: {
@ -188,7 +197,11 @@ export default defineComponent({
}, },
}, },
methods: { methods: {
async markAsDone(checked) { formatDateSince,
formatISO,
formatDateLong,
async markAsDone(checked: boolean) {
const updateFunc = async () => { const updateFunc = async () => {
const task = await this.taskService.update(this.task) const task = await this.taskService.update(this.task)
if (this.task.done) { if (this.task.done) {
@ -213,7 +226,7 @@ export default defineComponent({
} }
}, },
undoDone(checked) { undoDone(checked: boolean) {
this.task.done = !this.task.done this.task.done = !this.task.done
this.markAsDone(!checked) this.markAsDone(!checked)
}, },
@ -276,11 +289,6 @@ export default defineComponent({
white-space: nowrap; white-space: nowrap;
} }
.color-bubble {
height: 10px;
flex: 0 0 10px;
}
.avatar { .avatar {
border-radius: 50%; border-radius: 50%;
vertical-align: bottom; vertical-align: bottom;

View File

@ -7,7 +7,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {PropType} from 'vue' import type {PropType} from 'vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
type Order = 'asc' | 'desc' | 'none' type Order = 'asc' | 'desc' | 'none'

View File

@ -4,10 +4,41 @@ import {useI18n} from 'vue-i18n'
export function useCopyToClipboard() { export function useCopyToClipboard() {
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
function fallbackCopyTextToClipboard(text: string) {
const textArea = document.createElement('textarea')
textArea.value = text
// Avoid scrolling to bottom
textArea.style.top = '0'
textArea.style.left = '0'
textArea.style.position = 'fixed'
document.body.appendChild(textArea)
textArea.focus()
textArea.select()
try {
// NOTE: the execCommand is deprecated but as of 2022_09
// widely supported and works without https
const successful = document.execCommand('copy')
if (!successful) {
throw new Error()
}
} catch (err) {
error(t('misc.copyError'))
}
document.body.removeChild(textArea)
}
return async (text: string) => { return async (text: string) => {
if (!navigator.clipboard) {
fallbackCopyTextToClipboard(text)
return
}
try { try {
await navigator.clipboard.writeText(text) await navigator.clipboard.writeText(text)
} catch { } catch(e) {
error(t('misc.copyError')) error(t('misc.copyError'))
} }
} }

View File

@ -0,0 +1,37 @@
import {watch, reactive, shallowReactive, unref, toRefs, readonly} from 'vue'
import type {MaybeRef} from '@vueuse/core'
import {useStore} from '@/store'
import ListService from '@/services/list'
import ListModel from '@/models/list'
import { success } from '@/message'
import {useI18n} from 'vue-i18n'
export function useList(listId: MaybeRef<ListModel['id']>) {
const listService = shallowReactive(new ListService())
const {loading: isLoading} = toRefs(listService)
const list : ListModel = reactive(new ListModel({}))
const {t} = useI18n({useScope: 'global'})
watch(
() => unref(listId),
async (listId) => {
const loadedList = await listService.get(new ListModel({id: listId}))
Object.assign(list, loadedList)
},
{immediate: true},
)
const store = useStore()
async function save() {
await store.dispatch('lists/updateList', list)
success({message: t('list.edit.success')})
}
return {
isLoading: readonly(isLoading),
list,
save,
}
}

View File

@ -1,5 +1,5 @@
import {ref, computed} from 'vue' import {ref, computed} from 'vue'
import {useStore} from 'vuex' import {useStore} from '@/store'
export function useNameSpaceSearch() { export function useNameSpaceSearch() {
const query = ref('') const query = ref('')

View File

@ -1,12 +1,21 @@
import { computed, watchEffect } from 'vue' import { computed } from 'vue'
import type { ComputedGetter } from 'vue' import type { Ref } from 'vue'
import { setTitle } from '@/helpers/setTitle' import {useTitle as useTitleVueUse, resolveRef} from '@vueuse/core'
export function useTitle(titleGetter: ComputedGetter<string>) { type UseTitleParameters = Parameters<typeof useTitleVueUse>
const titleRef = computed(titleGetter)
watchEffect(() => setTitle(titleRef.value)) export function useTitle(...args: UseTitleParameters) {
return titleRef const [newTitle, ...restArgs] = args
const pageTitle = resolveRef(newTitle) as Ref<string>
const completeTitle = computed(() =>
(typeof pageTitle.value === 'undefined' || pageTitle.value === '')
? 'Vikunja'
: `${pageTitle.value} | Vikunja`,
)
return useTitleVueUse(completeTitle, ...restArgs)
} }

View File

@ -0,0 +1,10 @@
export const PRIORITIES = {
'UNSET': 0,
'LOW': 1,
'MEDIUM': 2,
'HIGH': 3,
'URGENT': 4,
'DO_NOW': 5,
} as const
export type Priority = typeof PRIORITIES[keyof typeof PRIORITIES]

7
src/constants/rights.ts Normal file
View File

@ -0,0 +1,7 @@
export const RIGHTS = {
'READ': 0,
'READ_WRITE': 1,
'ADMIN': 2,
} as const
export type Right = typeof RIGHTS[keyof typeof RIGHTS]

View File

@ -4,6 +4,9 @@ import {isAppleDevice} from '@/helpers/isAppleDevice'
const directive: Directive = { const directive: Directive = {
mounted(el, {value}) { mounted(el, {value}) {
if(value === '') {
return
}
if (isAppleDevice() && value.includes('Control')) { if (isAppleDevice() && value.includes('Control')) {
value = value.replace('Control', 'Meta') value = value.replace('Control', 'Meta')
} }

View File

@ -1,22 +1,28 @@
import AttachmentModel from '@/models/attachment' import AttachmentModel from '@/models/attachment'
import FileModel from '@/models/file' import type {IAttachment} from '@/modelTypes/IAttachment'
import type {IFile} from '@/modelTypes/IFile'
import AttachmentService from '@/services/attachment' import AttachmentService from '@/services/attachment'
import { store } from '@/store' import { store } from '@/store'
export function uploadFile(taskId: number, file: FileModel, onSuccess: () => Function) { export function uploadFile(taskId: number, file: IFile, onSuccess: () => Function) {
const attachmentService = new AttachmentService() const attachmentService = new AttachmentService()
const files = [file] const files = [file]
return uploadFiles(attachmentService, taskId, files, onSuccess) return uploadFiles(attachmentService, taskId, files, onSuccess)
} }
export async function uploadFiles(attachmentService: AttachmentService, taskId: number, files: FileModel[], onSuccess : Function = () => {}) { export async function uploadFiles(
attachmentService: AttachmentService,
taskId: number,
files: IFile[],
onSuccess: Function = () => {},
) {
const attachmentModel = new AttachmentModel({taskId}) const attachmentModel = new AttachmentModel({taskId})
const response = await attachmentService.create(attachmentModel, files) const response = await attachmentService.create(attachmentModel, files)
console.debug(`Uploaded attachments for task ${taskId}, response was`, response) console.debug(`Uploaded attachments for task ${taskId}, response was`, response)
response.success?.map((attachment: AttachmentModel) => { response.success?.map((attachment: IAttachment) => {
store.dispatch('tasks/addTaskAttachment', { store.dispatch('tasks/addTaskAttachment', {
taskId, taskId,
attachment, attachment,
@ -29,6 +35,6 @@ export async function uploadFiles(attachmentService: AttachmentService, taskId:
} }
} }
export function generateAttachmentUrl(taskId: number, attachmentId: number) : any { export function generateAttachmentUrl(taskId: number, attachmentId: number) {
return `${window.API_URL}/tasks/${taskId}/attachments/${attachmentId}` return `${window.API_URL}/tasks/${taskId}/attachments/${attachmentId}`
} }

View File

@ -1,5 +1,5 @@
import {AuthenticatedHTTPFactory} from '@/http-common' import {AuthenticatedHTTPFactory} from '@/http-common'
import {AxiosResponse} from 'axios' import type {AxiosResponse} from 'axios'
let savedToken: string | null = null let savedToken: string | null = null

View File

@ -1,4 +1,4 @@
export function colorIsDark(color) { export function colorIsDark(color: string | undefined) {
if (typeof color === 'undefined') { if (typeof color === 'undefined') {
return true // Defaults to dark return true // Defaults to dark
} }

View File

@ -0,0 +1,18 @@
const SIZES = [
'B',
'KB',
'MB',
'GB',
'TB',
] as const
export function getHumanSize(inputSize: number) {
let iterator = 0
let size = inputSize
while (size > 1024) {
size /= 1024
iterator++
}
return Number(Math.round(Number(size + 'e2')) + 'e-2') + ' ' + SIZES[iterator]
}

View File

@ -1,8 +1,7 @@
import {i18n} from '@/i18n' import {i18n} from '@/i18n'
import type {IList} from '@/modelTypes/IList'
import type ListModal from '@/models/list' export function getListTitle(l: IList) {
export function getListTitle(l: ListModal) {
if (l.id === -1) { if (l.id === -1) {
return i18n.global.t('list.pseudo.favorites.title') return i18n.global.t('list.pseudo.favorites.title')
} }

View File

@ -1,7 +1,7 @@
import {i18n} from '@/i18n' import {i18n} from '@/i18n'
import NamespaceModel from '@/models/namespace' import type {INamespace} from '@/modelTypes/INamespace'
export const getNamespaceTitle = (n: NamespaceModel) => { export const getNamespaceTitle = (n: INamespace) => {
if (n.id === -1) { if (n.id === -1) {
return i18n.global.t('namespace.pseudo.sharedLists.title') return i18n.global.t('namespace.pseudo.sharedLists.title')
} }

View File

@ -1,47 +0,0 @@
import {describe, it, expect} from 'vitest'
import {filterLabelsByQuery} from './labels'
import {createNewIndexer} from '../indexes'
const {add} = createNewIndexer('labels', ['title', 'description'])
describe('filter labels', () => {
const state = {
labels: {
1: {id: 1, title: 'label1'},
2: {id: 2, title: 'label2'},
3: {id: 3, title: 'label3'},
4: {id: 4, title: 'label4'},
5: {id: 5, title: 'label5'},
6: {id: 6, title: 'label6'},
7: {id: 7, title: 'label7'},
8: {id: 8, title: 'label8'},
9: {id: 9, title: 'label9'},
},
}
Object.values(state.labels).forEach(add)
it('should return an empty array for an empty query', () => {
const labels = filterLabelsByQuery(state, [], '')
expect(labels).toHaveLength(0)
})
it('should return labels for a query', () => {
const labels = filterLabelsByQuery(state, [], 'label2')
expect(labels).toHaveLength(1)
expect(labels[0].title).toBe('label2')
})
it('should not return found but hidden labels', () => {
interface label {
id: number,
title: string,
}
const labelsToHide: label[] = [{id: 1, title: 'label1'}]
const labels = filterLabelsByQuery(state, labelsToHide, 'label1')
expect(labels).toHaveLength(0)
})
})

View File

@ -1,41 +0,0 @@
import {createNewIndexer} from '../indexes'
const {search} = createNewIndexer('labels', ['title', 'description'])
export interface label {
id: number,
title: string,
}
interface labelState {
labels: {
[k: number]: label,
},
}
/**
* Checks if a list of labels is available in the store and filters them then query
* @param {Object} state
* @param {Array} labelsToHide
* @param {String} query
* @returns {Array}
*/
export function filterLabelsByQuery(state: labelState, labelsToHide: label[], query: string) {
const labelIdsToHide: number[] = labelsToHide.map(({id}) => id)
return search(query)
?.filter(value => !labelIdsToHide.includes(value))
.map(id => state.labels[id])
|| []
}
/**
* Returns the labels by id if found
* @param {Object} state
* @param {Array} ids
* @returns {Array}
*/
export function getLabelsByIds(state: labelState, ids: number[]) {
return Object.values(state.labels).filter(({id}) => ids.includes(id))
}

View File

@ -0,0 +1,44 @@
import {marked} from 'marked'
import hljs from 'highlight.js/lib/common'
export function setupMarkdownRenderer(checkboxId: string) {
const renderer = new marked.Renderer()
const linkRenderer = renderer.link
let checkboxNum = -1
marked.use({
renderer: {
image: (src, title, text) => {
title = title ? ` title="${title}` : ''
// If the url starts with the api url, the image is likely an attachment and
// we'll need to download and parse it properly.
if (src.substr(0, window.API_URL.length + 7) === `${window.API_URL}/tasks/`) {
return `<img data-src="${src}" alt="${text}" ${title} class="attachment-image"/>`
}
return `<img src="${src}" alt="${text}" ${title}/>`
},
checkbox: (checked) => {
if (checked) {
checked = ' checked="checked"'
}
checkboxNum++
return `<input type="checkbox" data-checkbox-num="${checkboxNum}" ${checked} class="text-checkbox-${checkboxId}"/>`
},
link: (href, title, text) => {
const isLocal = href.startsWith(`${location.protocol}//${location.hostname}`)
const html = linkRenderer.call(renderer, href, title, text)
return isLocal ? html : html.replace(/^<a /, '<a target="_blank" rel="noreferrer noopener nofollow" ')
},
},
highlight: function (code, language) {
const validLanguage = hljs.getLanguage(language) ? language : 'plaintext'
return hljs.highlight(code, {language: validLanguage}).value
},
})
return renderer
}

View File

@ -1,7 +1,7 @@
import {createRandomID} from '@/helpers/randomId' import {createRandomID} from '@/helpers/randomId'
import {parseURL} from 'ufo' import {parseURL} from 'ufo'
interface Provider { export interface Provider {
name: string name: string
key: string key: string
authUrl: string authUrl: string

View File

@ -1,4 +1,4 @@
import ListModel from '@/models/list' import type {IList} from '@/modelTypes/IList'
const key = 'collapsedBuckets' const key = 'collapsedBuckets'
@ -11,7 +11,10 @@ const getAllState = () => {
return JSON.parse(saved) return JSON.parse(saved)
} }
export const saveCollapsedBucketState = (listId: ListModel['id'], collapsedBuckets) => { export const saveCollapsedBucketState = (
listId: IList['id'],
collapsedBuckets,
) => {
const state = getAllState() const state = getAllState()
state[listId] = collapsedBuckets state[listId] = collapsedBuckets
for (const bucketId in state[listId]) { for (const bucketId in state[listId]) {
@ -22,7 +25,7 @@ export const saveCollapsedBucketState = (listId: ListModel['id'], collapsedBucke
localStorage.setItem(key, JSON.stringify(state)) localStorage.setItem(key, JSON.stringify(state))
} }
export const getCollapsedBucketState = (listId : ListModel['id']) => { export const getCollapsedBucketState = (listId : IList['id']) => {
const state = getAllState() const state = getAllState()
if (typeof state[listId] !== 'undefined') { if (typeof state[listId] !== 'undefined') {
return state[listId] return state[listId]

View File

@ -1,6 +1,6 @@
import ListModel from '@/models/list' import type {IList} from '@/modelTypes/IList'
export function getSavedFilterIdFromListId(listId: ListModel['id']) { export function getSavedFilterIdFromListId(listId: IList['id']) {
let filterId = listId * -1 - 1 let filterId = listId * -1 - 1
// FilterIds from listIds are always positive // FilterIds from listIds are always positive
if (filterId < 0) { if (filterId < 0) {

View File

@ -12,7 +12,9 @@ interface dateFoundResult {
date: Date | null, date: Date | null,
} }
export const parseDate = (text: string): dateParseResult => { const monthsRegexGroup = '(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)'
export const parseDate = (text: string, now: Date = new Date()): dateParseResult => {
const lowerText: string = text.toLowerCase() const lowerText: string = text.toLowerCase()
if (lowerText.includes('today')) { if (lowerText.includes('today')) {
@ -63,38 +65,43 @@ export const parseDate = (text: string): dateParseResult => {
parsed = getDayFromText(text) parsed = getDayFromText(text)
if (parsed.date !== null) { if (parsed.date !== null) {
return addTimeToDate(text, parsed.date, parsed.foundText) const month = getMonthFromText(text, parsed.date)
return addTimeToDate(text, month.date, parsed.foundText)
} }
parsed = getDateFromTextIn(text) parsed = getDateFromTextIn(text, now)
if (parsed.date !== null) { if (parsed.date !== null) {
return { return addTimeToDate(text, parsed.date, parsed.foundText)
newText: replaceAll(text, parsed.foundText, ''),
date: parsed.date,
}
} }
parsed = getDateFromText(text) parsed = getDateFromText(text)
if (parsed.date === null) {
return { return {
newText: replaceAll(text, parsed.foundText, ''), newText: replaceAll(text, parsed.foundText, ''),
date: parsed.date, date: parsed.date,
} }
} }
const addTimeToDate = (text: string, date: Date, match: string | null): dateParseResult => { return addTimeToDate(text, parsed.date, parsed.foundText)
if (match === null) { }
const addTimeToDate = (text: string, date: Date, previousMatch: string | null): dateParseResult => {
previousMatch = previousMatch?.trim() || ''
text = replaceAll(text, previousMatch, '')
if (previousMatch === null) {
return { return {
newText: text, newText: text,
date: null, date: null,
} }
} }
const matcher = new RegExp(`(${match} (at|@) )([0-9][0-9]?(:[0-9][0-9]?)?( ?(a|p)m)?)`, 'ig') const timeRegex = ' (at|@) ([0-9][0-9]?(:[0-9][0-9]?)?( ?(a|p)m)?)'
const matcher = new RegExp(timeRegex, 'ig')
const results = matcher.exec(text) const results = matcher.exec(text)
if (results !== null) { if (results !== null) {
const time = results[3] const time = results[2]
const parts = time.split(':') const parts = time.split(':')
let hours = parseInt(parts[0]) let hours = parseInt(parts[0])
let minutes = 0 let minutes = 0
@ -110,7 +117,7 @@ const addTimeToDate = (text: string, date: Date, match: string | null): datePars
date.setSeconds(0) date.setSeconds(0)
} }
const replace = results !== null ? results[0] : match const replace = results !== null ? results[0] : previousMatch
return { return {
newText: replaceAll(text, replace, ''), newText: replaceAll(text, replace, ''),
date: date, date: date,
@ -127,10 +134,10 @@ export const getDateFromText = (text: string, now: Date = new Date()) => {
let containsYear: boolean = true let containsYear: boolean = true
if (result === null) { if (result === null) {
// 2. Try parsing the date as something like "jan 21" or "21 jan" // 2. Try parsing the date as something like "jan 21" or "21 jan"
const monthRegex: RegExp = /((jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) [0-9][0-9]?|[0-9][0-9]? (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec))/ig const monthRegex: RegExp = new RegExp(` (${monthsRegexGroup} [0-9][0-9]?|[0-9][0-9]? ${monthsRegexGroup})`, 'ig')
results = monthRegex.exec(text) results = monthRegex.exec(text)
result = results === null ? null : `${results[0]} ${now.getFullYear()}` result = results === null ? null : `${results[0]} ${now.getFullYear()}`.trim()
foundText = results === null ? '' : results[0] foundText = results === null ? '' : results[0].trim()
containsYear = false containsYear = false
if (result === null) { if (result === null) {
@ -320,6 +327,25 @@ const getDayFromText = (text: string) => {
} }
} }
const getMonthFromText = (text: string, date: Date) => {
const matcher = new RegExp(monthsRegexGroup, 'ig')
const results = matcher.exec(text)
if (results === null) {
return {
newText: text,
date,
}
}
const fullDate = new Date(`${results[0]} 1 ${(new Date()).getFullYear()}`)
date.setMonth(fullDate.getMonth())
return {
newText: replaceAll(text, results[0], ''),
date,
}
}
const getDateFromInterval = (interval: number): Date => { const getDateFromInterval = (interval: number): Date => {
const newDate = new Date() const newDate = new Date()
newDate.setDate(newDate.getDate() + interval) newDate.setDate(newDate.getDate() + interval)

View File

@ -1,8 +1,8 @@
export function findIndexById(array : [], id : string | number) { export function findIndexById<T extends {id: string | number}>(array : T[], id : string | number) {
return array.findIndex(({id: currentId}) => currentId === id) return array.findIndex(({id: currentId}) => currentId === id)
} }
export function findById(array : [], id : string | number) { export function findById<T extends {id: string | number}>(array : T[], id : string | number) {
return array.find(({id: currentId}) => currentId === id) return array.find(({id: currentId}) => currentId === id)
} }
@ -11,11 +11,11 @@ export function includesById(array: [], id: string | number) {
} }
// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isnil // https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isnil
export function isNil(value: any) { export function isNil(value: unknown) {
return value == null return value == null
} }
export function omitBy(obj: {}, check: (value: any) => boolean): {} { export function omitBy(obj: {}, check: (value: unknown) => boolean) {
if (isNil(obj)) { if (isNil(obj)) {
return {} return {}
} }

View File

@ -2,17 +2,35 @@ import axios from 'axios'
import {getToken} from '@/helpers/auth' import {getToken} from '@/helpers/auth'
export function HTTPFactory() { export function HTTPFactory() {
return axios.create({ const instance = axios.create({baseURL: window.API_URL})
baseURL: window.API_URL,
instance.interceptors.request.use((config) => {
// by setting the baseURL fresh for every request
// we make sure that it is never outdated in case it is updated
config.baseURL = window.API_URL
return config
}) })
return instance
} }
export function AuthenticatedHTTPFactory(token = getToken()) { export function AuthenticatedHTTPFactory() {
return axios.create({ const instance = HTTPFactory()
baseURL: window.API_URL,
headers: { instance.interceptors.request.use((config) => {
Authorization: `Bearer ${token}`, config.headers = {
...config.headers,
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}, }
})
// Set the default auth header if we have a token
const token = getToken()
if (token !== null) {
config.headers['Authorization'] = `Bearer ${token}`
}
return config
})
return instance
} }

View File

@ -172,6 +172,7 @@
"search": "Type to search for a list…", "search": "Type to search for a list…",
"searchSelect": "Click or press enter to select this list", "searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists", "shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": { "create": {
"header": "New list", "header": "New list",
"titlePlaceholder": "The list's title goes here…", "titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"remove": "Remove a link share", "remove": "Remove a link share",
"removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!", "removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!",
"createSuccess": "The link share was successfully created.", "createSuccess": "The link share was successfully created.",
"deleteSuccess": "The link share was successfully deleted" "deleteSuccess": "The link share was successfully deleted",
"view": "View",
"sharedBy": "Shared by {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "user | users", "typeUser": "user | users",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete" "delete": "Delete"
} }
}, },
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task", "related": "Modify related tasks of this task",
"color": "Change the color of this task", "color": "Change the color of this task",
"move": "Move this task to another list", "move": "Move this task to another list",
"reminder": "Manage reminders of this task" "reminder": "Manage reminders of this task",
"description": "Toggle editing of the task description"
}, },
"list": { "list": {
"title": "List Views", "title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Začni psát pro vyhledání seznamu…", "search": "Začni psát pro vyhledání seznamu…",
"searchSelect": "Klikněte nebo stiskněte Enter pro výběr tohoto seznamu", "searchSelect": "Klikněte nebo stiskněte Enter pro výběr tohoto seznamu",
"shared": "Sdílené seznamy", "shared": "Sdílené seznamy",
"noDescriptionAvailable": "No list description is available.",
"create": { "create": {
"header": "Nový seznam", "header": "Nový seznam",
"titlePlaceholder": "Název seznamu přijde sem…", "titlePlaceholder": "Název seznamu přijde sem…",
@ -242,7 +243,9 @@
"remove": "Odstranit sdílený odkaz", "remove": "Odstranit sdílený odkaz",
"removeText": "Jste si jisti, že chcete odstranit tento sdílený odkaz? K tomuto seznamu již nebude možné přistupovat s tímto sdíleným odkazem. Tuto akci nelze vrátit zpět!", "removeText": "Jste si jisti, že chcete odstranit tento sdílený odkaz? K tomuto seznamu již nebude možné přistupovat s tímto sdíleným odkazem. Tuto akci nelze vrátit zpět!",
"createSuccess": "Sdílený odkaz byl úspěšně vytvořen.", "createSuccess": "Sdílený odkaz byl úspěšně vytvořen.",
"deleteSuccess": "Sdílený odkaz byl úspěšně smazán" "deleteSuccess": "Sdílený odkaz byl úspěšně smazán",
"view": "View",
"sharedBy": "Shared by {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "uživatel | uživatelé", "typeUser": "uživatel | uživatelé",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Odkaz", "link": "Odkaz",
"name": "Název",
"sharedBy": "Sdíleno od",
"right": "Právo",
"delete": "Smazat" "delete": "Smazat"
} }
}, },
@ -870,7 +870,8 @@
"related": "Upravit související úkoly tohoto úkolu", "related": "Upravit související úkoly tohoto úkolu",
"color": "Změnit barvu tohoto úkolu", "color": "Změnit barvu tohoto úkolu",
"move": "Přesunout tento úkol do jiného seznamu", "move": "Přesunout tento úkol do jiného seznamu",
"reminder": "Manage reminders of this task" "reminder": "Manage reminders of this task",
"description": "Toggle editing of the task description"
}, },
"list": { "list": {
"title": "Zobrazení seznamů", "title": "Zobrazení seznamů",

View File

@ -172,6 +172,7 @@
"search": "Tippe, um nach einer Liste zu suchen…", "search": "Tippe, um nach einer Liste zu suchen…",
"searchSelect": "Klicke auf oder drücke die Eingabetaste, um diese Liste auszuwählen", "searchSelect": "Klicke auf oder drücke die Eingabetaste, um diese Liste auszuwählen",
"shared": "Geteilte Listen", "shared": "Geteilte Listen",
"noDescriptionAvailable": "Keine Listenbeschreibung verfügbar.",
"create": { "create": {
"header": "Neue Liste", "header": "Neue Liste",
"titlePlaceholder": "Der Titel der Liste steht hier…", "titlePlaceholder": "Der Titel der Liste steht hier…",
@ -242,7 +243,9 @@
"remove": "Eine Linkfreigabe löschen", "remove": "Eine Linkfreigabe löschen",
"removeText": "Bist du sicher, dass du diese Linkfreigabe unwiderruflich löschen möchtest? Über die Linkfreigabe ist danach der Zugriff auf die Liste nicht mehr möglich!", "removeText": "Bist du sicher, dass du diese Linkfreigabe unwiderruflich löschen möchtest? Über die Linkfreigabe ist danach der Zugriff auf die Liste nicht mehr möglich!",
"createSuccess": "Die Linkfreigabe wurde erfolgreich erstellt.", "createSuccess": "Die Linkfreigabe wurde erfolgreich erstellt.",
"deleteSuccess": "Die Linkfreigabe wurde erfolgreich gelöscht" "deleteSuccess": "Die Linkfreigabe wurde erfolgreich gelöscht",
"view": "Ansicht",
"sharedBy": "Von {0} geteilt"
}, },
"userTeam": { "userTeam": {
"typeUser": "Benutzer:in | Benutzer:innen", "typeUser": "Benutzer:in | Benutzer:innen",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Name",
"sharedBy": "Geteilt von",
"right": "Berechtigungen",
"delete": "Löschen" "delete": "Löschen"
} }
}, },
@ -870,7 +870,8 @@
"related": "Ändere die Abhängigen Aufgaben dieser Aufgabe", "related": "Ändere die Abhängigen Aufgaben dieser Aufgabe",
"color": "Die Farbe dieser Aufgabe ändern", "color": "Die Farbe dieser Aufgabe ändern",
"move": "Diese Aufgabe in eine andere Liste verschieben", "move": "Diese Aufgabe in eine andere Liste verschieben",
"reminder": "Erinnerungen für diese Aufgabe verwalten" "reminder": "Erinnerungen für diese Aufgabe verwalten",
"description": "Aufgabenbeschreibung bearbeiten"
}, },
"list": { "list": {
"title": "Listenansicht", "title": "Listenansicht",

View File

@ -172,6 +172,7 @@
"search": "Schriib, um nachere Liste z'sueche…", "search": "Schriib, um nachere Liste z'sueche…",
"searchSelect": "Druck uf Enter um die Liste uuszwähle", "searchSelect": "Druck uf Enter um die Liste uuszwähle",
"shared": "Teilti Liste", "shared": "Teilti Liste",
"noDescriptionAvailable": "Keine Listenbeschreibung verfügbar.",
"create": { "create": {
"header": "Neue Liste", "header": "Neue Liste",
"titlePlaceholder": "Listetitl da ahgeh…", "titlePlaceholder": "Listetitl da ahgeh…",
@ -242,7 +243,9 @@
"remove": "Linkfreigab lösche", "remove": "Linkfreigab lösche",
"removeText": "Bisch du sicher, dass du die Freigab lösche wetsch? Es wird nüme möglich sii, die Liste mit dem Link z'erreiche. Das chann nid rückgängig gmacht werde!", "removeText": "Bisch du sicher, dass du die Freigab lösche wetsch? Es wird nüme möglich sii, die Liste mit dem Link z'erreiche. Das chann nid rückgängig gmacht werde!",
"createSuccess": "De Freigabelink isch erfolgriich erstellt wore.", "createSuccess": "De Freigabelink isch erfolgriich erstellt wore.",
"deleteSuccess": "De g'teilti Link isch erfolgriich g'chüblet wore" "deleteSuccess": "De g'teilti Link isch erfolgriich g'chüblet wore",
"view": "Ansicht",
"sharedBy": "Von {0} geteilt"
}, },
"userTeam": { "userTeam": {
"typeUser": "Benutzer | Benutzer", "typeUser": "Benutzer | Benutzer",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Namä",
"sharedBy": "Teilt vo",
"right": "Rechts",
"delete": "Chüble" "delete": "Chüble"
} }
}, },
@ -870,7 +870,8 @@
"related": "Beziehige vo dere Uufgab bearbeite", "related": "Beziehige vo dere Uufgab bearbeite",
"color": "Die Farbe dieser Aufgabe ändern", "color": "Die Farbe dieser Aufgabe ändern",
"move": "Diese Aufgabe in eine andere Liste verschieben", "move": "Diese Aufgabe in eine andere Liste verschieben",
"reminder": "Erinnerungen für diese Aufgabe verwalten" "reminder": "Erinnerungen für diese Aufgabe verwalten",
"description": "Aufgabenbeschreibung bearbeiten"
}, },
"list": { "list": {
"title": "Listenansicht", "title": "Listenansicht",

View File

@ -172,6 +172,7 @@
"search": "Type to search for a list…", "search": "Type to search for a list…",
"searchSelect": "Click or press enter to select this list", "searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists", "shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": { "create": {
"header": "New list", "header": "New list",
"titlePlaceholder": "The list's title goes here…", "titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"remove": "Remove a link share", "remove": "Remove a link share",
"removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!", "removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!",
"createSuccess": "The link share was successfully created.", "createSuccess": "The link share was successfully created.",
"deleteSuccess": "The link share was successfully deleted" "deleteSuccess": "The link share was successfully deleted",
"view": "View",
"sharedBy": "Shared by {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "user | users", "typeUser": "user | users",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete" "delete": "Delete"
} }
}, },
@ -873,7 +873,8 @@
"related": "Modify related tasks of this task", "related": "Modify related tasks of this task",
"color": "Change the color of this task", "color": "Change the color of this task",
"move": "Move this task to another list", "move": "Move this task to another list",
"reminder": "Manage reminders of this task" "reminder": "Manage reminders of this task",
"description": "Toggle editing of the task description"
}, },
"list": { "list": {
"title": "List Views", "title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Type to search for a list…", "search": "Type to search for a list…",
"searchSelect": "Click or press enter to select this list", "searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists", "shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": { "create": {
"header": "New list", "header": "New list",
"titlePlaceholder": "The list's title goes here…", "titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"remove": "Remove a link share", "remove": "Remove a link share",
"removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!", "removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!",
"createSuccess": "The link share was successfully created.", "createSuccess": "The link share was successfully created.",
"deleteSuccess": "The link share was successfully deleted" "deleteSuccess": "The link share was successfully deleted",
"view": "View",
"sharedBy": "Shared by {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "user | users", "typeUser": "user | users",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete" "delete": "Delete"
} }
}, },
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task", "related": "Modify related tasks of this task",
"color": "Change the color of this task", "color": "Change the color of this task",
"move": "Move this task to another list", "move": "Move this task to another list",
"reminder": "Manage reminders of this task" "reminder": "Manage reminders of this task",
"description": "Toggle editing of the task description"
}, },
"list": { "list": {
"title": "List Views", "title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Écris pour rechercher une liste…", "search": "Écris pour rechercher une liste…",
"searchSelect": "Clique ou appuie sur la touche Entrée pour sélectionner cette liste", "searchSelect": "Clique ou appuie sur la touche Entrée pour sélectionner cette liste",
"shared": "Listes partagées", "shared": "Listes partagées",
"noDescriptionAvailable": "No list description is available.",
"create": { "create": {
"header": "Nouvelle liste", "header": "Nouvelle liste",
"titlePlaceholder": "Entre le nom de la liste…", "titlePlaceholder": "Entre le nom de la liste…",
@ -242,7 +243,9 @@
"remove": "Retirer un lien de partage", "remove": "Retirer un lien de partage",
"removeText": "Retirer ce partage de lien ? Il ne sera plus possible daccéder à cette liste avec ce partage de lien. Cette opération ne peut être annulée !", "removeText": "Retirer ce partage de lien ? Il ne sera plus possible daccéder à cette liste avec ce partage de lien. Cette opération ne peut être annulée !",
"createSuccess": "Partage créé.", "createSuccess": "Partage créé.",
"deleteSuccess": "Lien supprimé" "deleteSuccess": "Lien supprimé",
"view": "View",
"sharedBy": "Shared by {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "utilisateur·rice | utilisateur·rice·s", "typeUser": "utilisateur·rice | utilisateur·rice·s",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Lien", "link": "Lien",
"name": "Nom",
"sharedBy": "Partagé par",
"right": "Droit",
"delete": "Supprimer" "delete": "Supprimer"
} }
}, },
@ -870,7 +870,8 @@
"related": "Modifier les tâches connexes de cette tâche", "related": "Modifier les tâches connexes de cette tâche",
"color": "Changer la couleur de cette tâche", "color": "Changer la couleur de cette tâche",
"move": "Déplacer cette tâche dans une autre liste", "move": "Déplacer cette tâche dans une autre liste",
"reminder": "Manage reminders of this task" "reminder": "Manage reminders of this task",
"description": "Toggle editing of the task description"
}, },
"list": { "list": {
"title": "Vues en liste", "title": "Vues en liste",

View File

@ -87,7 +87,7 @@
"language": "Lingua", "language": "Lingua",
"defaultList": "Lista predefinita", "defaultList": "Lista predefinita",
"timezone": "Fuso Orario", "timezone": "Fuso Orario",
"overdueTasksRemindersTime": "Orario email del promemoria attività in ritardo" "overdueTasksRemindersTime": "Orario email attività in scadute"
}, },
"totp": { "totp": {
"title": "Autenticazione a due fattori", "title": "Autenticazione a due fattori",
@ -172,6 +172,7 @@
"search": "Digita per cercare una lista…", "search": "Digita per cercare una lista…",
"searchSelect": "Fare clic o premere invio per selezionare questa lista", "searchSelect": "Fare clic o premere invio per selezionare questa lista",
"shared": "Liste Condivise", "shared": "Liste Condivise",
"noDescriptionAvailable": "Nessuna descrizione della lista disponibile.",
"create": { "create": {
"header": "Nuova lista", "header": "Nuova lista",
"titlePlaceholder": "Il titolo della lista va qui…", "titlePlaceholder": "Il titolo della lista va qui…",
@ -242,7 +243,9 @@
"remove": "Rimuovi un link di condivisione", "remove": "Rimuovi un link di condivisione",
"removeText": "Sei sicuro di voler rimuovere questo link di condivisione? Non sarà più possibile accedere a questa lista con questo link. Non può essere ripristinato!", "removeText": "Sei sicuro di voler rimuovere questo link di condivisione? Non sarà più possibile accedere a questa lista con questo link. Non può essere ripristinato!",
"createSuccess": "Link di condivisione creato.", "createSuccess": "Link di condivisione creato.",
"deleteSuccess": "Link di condivisione elimitato" "deleteSuccess": "Link di condivisione elimitato",
"view": "Mostra",
"sharedBy": "Condiviso da {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "utente | utenti", "typeUser": "utente | utenti",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Nome",
"sharedBy": "Condiviso da",
"right": "Permessi",
"delete": "Elimina" "delete": "Elimina"
} }
}, },
@ -562,12 +562,12 @@
} }
}, },
"datemathHelp": { "datemathHelp": {
"canuse": "You can use date math to filter for relative dates.", "canuse": "Puoi usare le date calcolate per filtrare per date relative.",
"learnhow": "Scopri come funziona", "learnhow": "Scopri come funziona",
"title": "Date Math", "title": "Date Calcolate",
"intro": "Date Math allows you to specify relative dates which are resolved on the fly by Vikunja when applying the filter.", "intro": "Le Date Calcolate ti permettono di specificare date relative che vengono calcolate al volo da Vikunja quando viene applicato il 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.", "expression": "Ogni Data Calcolata inizia con una data base, che può essere {0}, o una data con {1} alla fine. Questa data base può essere seguita da una o più espressioni matematiche.",
"similar": "These expressions are similar to the ones provided by {0} and {1}.", "similar": "Queste espressioni sono simili a quelle fornite da {0} e {1}.",
"add1Day": "Aggiungi un giorno", "add1Day": "Aggiungi un giorno",
"minus1Day": "Sottrai un giorno", "minus1Day": "Sottrai un giorno",
"roundDay": "Arrotonda per difetto al giorno più vicino", "roundDay": "Arrotonda per difetto al giorno più vicino",
@ -781,7 +781,7 @@
"weeks": "Settimane", "weeks": "Settimane",
"months": "Mesi", "months": "Mesi",
"years": "Anni", "years": "Anni",
"invalidAmount": "Please enter more than 0." "invalidAmount": "Inserisci più di 0."
}, },
"quickAddMagic": { "quickAddMagic": {
"hint": "Puoi usare l'Aggiunta Rapida Magica", "hint": "Puoi usare l'Aggiunta Rapida Magica",
@ -791,15 +791,15 @@
"multiple": "Puoi usarlo più volte.", "multiple": "Puoi usarlo più volte.",
"label1": "Per aggiungere un'etichetta, basta aggiungere il nome dell'etichetta preceduto da {prefix}.", "label1": "Per aggiungere un'etichetta, basta aggiungere il nome dell'etichetta preceduto da {prefix}.",
"label2": "Vikunja controllerà prima se l'etichetta esiste già e nel caso la creerà.", "label2": "Vikunja controllerà prima se l'etichetta esiste già e nel caso la creerà.",
"label3": "To use spaces, simply add a \" or ' around the label name.", "label3": "Per usare gli spazi, basta aggiungere un \" o ' prima e dopo il nome dell'etichetta.",
"label4": "Per esempio: {prefix}\"Etichetta con spazi\".", "label4": "Per esempio: {prefix}\"Etichetta con spazi\".",
"priority1": "Per impostare la priorità di un'attività, aggiungi un numero 1-5, preceduto da {prefix}.", "priority1": "Per impostare la priorità di un'attività, aggiungi un numero 1-5, preceduto da {prefix}.",
"priority2": "Più alto è il numero, più alta è la priorità.", "priority2": "Più alto è il numero, più alta è la priorità.",
"assignees": "Per assegnare direttamente l'attività a un utente, aggiungere il suo nome utente preceduto da {prefix} all'attività.", "assignees": "Per assegnare direttamente l'attività a un utente, aggiungere il suo nome utente preceduto da {prefix} all'attività.",
"list1": "Per impostare una lista di appartenenza all'attività, inserisci il suo nome prefisso con {prefix}.", "list1": "Per impostare una lista di appartenenza all'attività, inserisci il suo nome prefisso con {prefix}.",
"list2": "Ciò restituirà un errore se la lista non esiste.", "list2": "Ciò restituirà un errore se la lista non esiste.",
"list3": "To use spaces, simply add a \" or ' around the list name.", "list3": "Per usare gli spazi, basta aggiungere un \" o ' prima e dopo il nome della lista.",
"list4": "For example: {prefix}\"List with spaces\".", "list4": "Per esempio: {prefix}\"Etichetta con spazi\".",
"dateAndTime": "Data e ora", "dateAndTime": "Data e ora",
"date": "Qualsiasi data verrà utilizzata come data di scadenza della nuova attività. È possibile utilizzare le date in uno qualsiasi di questi formati:", "date": "Qualsiasi data verrà utilizzata come data di scadenza della nuova attività. È possibile utilizzare le date in uno qualsiasi di questi formati:",
"dateWeekday": "qualsiasi giorno della settimana, userà la data più vicina", "dateWeekday": "qualsiasi giorno della settimana, userà la data più vicina",
@ -870,7 +870,8 @@
"related": "Modifica le attività collegate a questa", "related": "Modifica le attività collegate a questa",
"color": "Cambia il colore di questa attività", "color": "Cambia il colore di questa attività",
"move": "Sposta questa attività in un altro elenco", "move": "Sposta questa attività in un altro elenco",
"reminder": "Gestisci i promemoria di questa attività" "reminder": "Gestisci i promemoria di questa attività",
"description": "Attiva/Disattiva modifica della descrizione dell'attività"
}, },
"list": { "list": {
"title": "Viste Liste", "title": "Viste Liste",

View File

@ -172,6 +172,7 @@
"search": "Typ om naar een lijst te zoeken…", "search": "Typ om naar een lijst te zoeken…",
"searchSelect": "Klik of druk op enter om deze lijst te selecteren", "searchSelect": "Klik of druk op enter om deze lijst te selecteren",
"shared": "Gedeelde lijsten", "shared": "Gedeelde lijsten",
"noDescriptionAvailable": "No list description is available.",
"create": { "create": {
"header": "Nieuwe lijst", "header": "Nieuwe lijst",
"titlePlaceholder": "De titel van de lijst komt hier…", "titlePlaceholder": "De titel van de lijst komt hier…",
@ -242,7 +243,9 @@
"remove": "Remove a link share", "remove": "Remove a link share",
"removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!", "removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!",
"createSuccess": "The link share was successfully created.", "createSuccess": "The link share was successfully created.",
"deleteSuccess": "The link share was successfully deleted" "deleteSuccess": "The link share was successfully deleted",
"view": "View",
"sharedBy": "Shared by {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "gebruiker | gebruikers", "typeUser": "gebruiker | gebruikers",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Naam",
"sharedBy": "Gedeeld door",
"right": "Rechten",
"delete": "Verwijderen" "delete": "Verwijderen"
} }
}, },
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task", "related": "Modify related tasks of this task",
"color": "Change the color of this task", "color": "Change the color of this task",
"move": "Move this task to another list", "move": "Move this task to another list",
"reminder": "Manage reminders of this task" "reminder": "Manage reminders of this task",
"description": "Toggle editing of the task description"
}, },
"list": { "list": {
"title": "List Views", "title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Wpisz, aby wyszukać listę…", "search": "Wpisz, aby wyszukać listę…",
"searchSelect": "Kliknij lub naciśnij Enter, aby wybrać tę listę", "searchSelect": "Kliknij lub naciśnij Enter, aby wybrać tę listę",
"shared": "Współdzielone listy", "shared": "Współdzielone listy",
"noDescriptionAvailable": "No list description is available.",
"create": { "create": {
"header": "Nowa lista", "header": "Nowa lista",
"titlePlaceholder": "Tu wpisz tytuł listy…", "titlePlaceholder": "Tu wpisz tytuł listy…",
@ -242,7 +243,9 @@
"remove": "Usuń link", "remove": "Usuń link",
"removeText": "Czy na pewno chcesz usunąć ten link? Dostęp do tej listy z tym linkiem nie będzie już możliwy. Tego nie da się cofnąć!", "removeText": "Czy na pewno chcesz usunąć ten link? Dostęp do tej listy z tym linkiem nie będzie już możliwy. Tego nie da się cofnąć!",
"createSuccess": "Pomyślnie utworzono udostępniony link.", "createSuccess": "Pomyślnie utworzono udostępniony link.",
"deleteSuccess": "Udostępniony link został pomyślnie usunięty" "deleteSuccess": "Udostępniony link został pomyślnie usunięty",
"view": "View",
"sharedBy": "Shared by {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "użytkownik(a) | użytkownikom", "typeUser": "użytkownik(a) | użytkownikom",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Nazwa",
"sharedBy": "Udostępniony przez",
"right": "Uprawnienia",
"delete": "Usuń" "delete": "Usuń"
} }
}, },
@ -870,7 +870,8 @@
"related": "Zmodyfikuj zadania powiązane z tym zadaniem", "related": "Zmodyfikuj zadania powiązane z tym zadaniem",
"color": "Zmień kolor tego zadania", "color": "Zmień kolor tego zadania",
"move": "Przenieś to zadanie do innej listy", "move": "Przenieś to zadanie do innej listy",
"reminder": "Zarządzaj przypomnieniami o tym zadaniu" "reminder": "Zarządzaj przypomnieniami o tym zadaniu",
"description": "Toggle editing of the task description"
}, },
"list": { "list": {
"title": "Widoki listy", "title": "Widoki listy",

View File

@ -172,6 +172,7 @@
"search": "Type to search for a list…", "search": "Type to search for a list…",
"searchSelect": "Click or press enter to select this list", "searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists", "shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": { "create": {
"header": "New list", "header": "New list",
"titlePlaceholder": "The list's title goes here…", "titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"remove": "Remove a link share", "remove": "Remove a link share",
"removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!", "removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!",
"createSuccess": "The link share was successfully created.", "createSuccess": "The link share was successfully created.",
"deleteSuccess": "The link share was successfully deleted" "deleteSuccess": "The link share was successfully deleted",
"view": "View",
"sharedBy": "Shared by {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "user | users", "typeUser": "user | users",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete" "delete": "Delete"
} }
}, },
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task", "related": "Modify related tasks of this task",
"color": "Change the color of this task", "color": "Change the color of this task",
"move": "Move this task to another list", "move": "Move this task to another list",
"reminder": "Manage reminders of this task" "reminder": "Manage reminders of this task",
"description": "Toggle editing of the task description"
}, },
"list": { "list": {
"title": "List Views", "title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Escreve para pesquisar por uma lista…", "search": "Escreve para pesquisar por uma lista…",
"searchSelect": "Clica ou pressiona Enter para selecionar esta lista", "searchSelect": "Clica ou pressiona Enter para selecionar esta lista",
"shared": "Listas Partilhadas", "shared": "Listas Partilhadas",
"noDescriptionAvailable": "Não está disponível nenhuma descrição da lista.",
"create": { "create": {
"header": "Nova lista", "header": "Nova lista",
"titlePlaceholder": "O título da lista será aqui…", "titlePlaceholder": "O título da lista será aqui…",
@ -242,7 +243,9 @@
"remove": "Remover um link partilhado", "remove": "Remover um link partilhado",
"removeText": "Tens a certeza que queres remover este link partilhado? Não será mais possível aceder a esta lista utilizando este link partilhado. Isto não pode ser revertido!", "removeText": "Tens a certeza que queres remover este link partilhado? Não será mais possível aceder a esta lista utilizando este link partilhado. Isto não pode ser revertido!",
"createSuccess": "O link partilhado foi criado com sucesso.", "createSuccess": "O link partilhado foi criado com sucesso.",
"deleteSuccess": "O link partilhado foi eliminado com sucesso" "deleteSuccess": "O link partilhado foi eliminado com sucesso",
"view": "Visualizar",
"sharedBy": "Partilhado por {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "utilizador | utilizadores", "typeUser": "utilizador | utilizadores",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Nome",
"sharedBy": "Partilhado por",
"right": "Permissões",
"delete": "Eliminar" "delete": "Eliminar"
} }
}, },
@ -781,7 +781,7 @@
"weeks": "Semanas", "weeks": "Semanas",
"months": "Meses", "months": "Meses",
"years": "Anos", "years": "Anos",
"invalidAmount": "Please enter more than 0." "invalidAmount": "Por favor, insere mais do que 0."
}, },
"quickAddMagic": { "quickAddMagic": {
"hint": "Podes utilizar a Introdução Mágica Rápida", "hint": "Podes utilizar a Introdução Mágica Rápida",
@ -870,7 +870,8 @@
"related": "Modificar as tarefas relacionadas desta tarefa", "related": "Modificar as tarefas relacionadas desta tarefa",
"color": "Alterar a cor desta tarefa", "color": "Alterar a cor desta tarefa",
"move": "Mover esta tarefa para outra lista", "move": "Mover esta tarefa para outra lista",
"reminder": "Gerir lembretes desta tarefa" "reminder": "Gerir lembretes desta tarefa",
"description": "Alternar edição da descrição da tarefa"
}, },
"list": { "list": {
"title": "Visualização em Lista", "title": "Visualização em Lista",

View File

@ -172,6 +172,7 @@
"search": "Type to search for a list…", "search": "Type to search for a list…",
"searchSelect": "Click or press enter to select this list", "searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists", "shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": { "create": {
"header": "New list", "header": "New list",
"titlePlaceholder": "The list's title goes here…", "titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"remove": "Remove a link share", "remove": "Remove a link share",
"removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!", "removeText": "Are you sure you want to remove this link share? It will no longer be possible to access this list with this link share. This cannot be undone!",
"createSuccess": "The link share was successfully created.", "createSuccess": "The link share was successfully created.",
"deleteSuccess": "The link share was successfully deleted" "deleteSuccess": "The link share was successfully deleted",
"view": "View",
"sharedBy": "Shared by {0}"
}, },
"userTeam": { "userTeam": {
"typeUser": "user | users", "typeUser": "user | users",
@ -264,9 +267,6 @@
}, },
"attributes": { "attributes": {
"link": "Link", "link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete" "delete": "Delete"
} }
}, },
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task", "related": "Modify related tasks of this task",
"color": "Change the color of this task", "color": "Change the color of this task",
"move": "Move this task to another list", "move": "Move this task to another list",
"reminder": "Manage reminders of this task" "reminder": "Manage reminders of this task",
"description": "Toggle editing of the task description"
}, },
"list": { "list": {
"title": "List Views", "title": "List Views",

Some files were not shown because too many files have changed in this diff Show More