Compare commits

..

169 Commits

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -12,12 +12,7 @@
</template>
<script lang="ts">
import {defineComponent} from 'vue'
// see https://v3.vuejs.org/api/sfc-script-setup.html#usage-alongside-normal-script
export default defineComponent({
inheritAttrs: false,
})
export default { inheritAttrs: false }
</script>
<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!
import {ref, watchEffect, computed, useAttrs, PropType} from 'vue'
import { ref, watchEffect, computed, useAttrs, type PropType } from 'vue'
const BASE_BUTTON_TYPES_MAP = Object.freeze({
button: 'button',

View File

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

View File

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

View File

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

View File

@ -16,6 +16,10 @@
{{ currentList.title === '' ? $t('misc.loading') : getListTitle(currentList) }}
</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"/>
</template>
</div>
@ -88,11 +92,11 @@
<script setup lang="ts">
import {ref, computed, onMounted, nextTick} from 'vue'
import {useStore} from 'vuex'
import {useStore} from '@/store'
import {useRouter} from 'vue-router'
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 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 MenuButton from '@/components/home/MenuButton.vue'
import {getListTitle} from '@/helpers/getListTitle'
const store = useStore()
const userInfo = computed(() => store.state.auth.info)
@ -282,10 +288,21 @@ $hamburger-menu-icon-width: 28px;
:deep(.dropdown-trigger) {
color: var(--grey-400);
margin-left: 1rem;
margin-left: .5rem;
height: 1rem;
width: 1rem;
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>

View File

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

View File

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

View File

@ -56,10 +56,10 @@
class="menu-label"
v-tooltip="namespaceTitles[nk]"
>
<span
<ColorBubble
v-if="n.hexColor !== ''"
:style="{ backgroundColor: n.hexColor }"
class="color-bubble"
:color="n.hexColor"
class="mr-1"
/>
<span class="name">{{ namespaceTitles[nk] }}</span>
<div
@ -114,11 +114,11 @@
<span class="icon handle">
<icon icon="grip-lines"/>
</span>
<span
:style="{ backgroundColor: l.hexColor }"
class="color-bubble"
v-if="l.hexColor !== ''">
</span>
<ColorBubble
v-if="l.hexColor !== ''"
:color="l.hexColor"
class="mr-1"
/>
<span class="list-menu-title">{{ getListTitle(l) }}</span>
</BaseButton>
<BaseButton
@ -141,9 +141,9 @@
<script setup lang="ts">
import {ref, computed, onMounted, onBeforeMount} from 'vue'
import {useStore} from 'vuex'
import {useStore} from '@/store'
import draggable from 'zhyswan-vuedraggable'
import {SortableEvent} from 'sortablejs'
import type {SortableEvent} from 'sortablejs'
import BaseButton from '@/components/base/BaseButton.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 {calculateItemPosition} from '@/helpers/calculateItemPosition'
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
import {getListTitle} from '@/helpers/getListTitle'
import {useEventListener} from '@vueuse/core'
import NamespaceModel from '@/models/namespace'
import ListModel from '@/models/list'
import type {IList} from '@/modelTypes/IList'
import type {INamespace} from '@/modelTypes/INamespace'
import ColorBubble from '@/components/misc/colorBubble.vue'
const drag = ref(false)
const dragOptions = {
@ -171,7 +173,7 @@ const loading = computed(() => store.state.loading && store.state.loadingModule
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(() => {
return namespaces.value.map(({lists}) => {
@ -194,7 +196,7 @@ useEventListener('resize', resize)
onMounted(() => resize())
function toggleFavoriteList(list: ListModel) {
function toggleFavoriteList(list: IList) {
// The favorites pseudo list is always favorite
// Archived lists cannot be marked favorite
if (list.id === -1 || list.isArchived) {
@ -208,14 +210,14 @@ function resize() {
store.commit(MENU_ACTIVE, window.innerWidth >= 770)
}
function toggleLists(namespaceId: number) {
function toggleLists(namespaceId: INamespace['id']) {
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
onBeforeMount(async () => {
const namespaces = await store.dispatch('namespaces/loadNamespaces') as NamespaceModel[]
const namespaces = await store.dispatch('namespaces/loadNamespaces') as INamespace[]
namespaces.forEach(n => {
if (typeof listsVisible.value[n.id] === 'undefined') {
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
// 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
@ -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) {
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 listsActive = activeLists.value[newNamespaceIndex]
const list = listsActive[e.newIndex]
const listBefore = listsActive[e.newIndex - 1] ?? null
const listAfter = listsActive[e.newIndex + 1] ?? null
// If the list was dragged to the last position, Safari will report e.newIndex as the size of the listsActive
// array instead of using the position. Because the index is wrong in that case, dragging the list will fail.
// 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
const position = calculateItemPosition(

View File

@ -1,7 +1,7 @@
<template>
<div class="update-notification" v-if="updateAvailable">
<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') }}
</x-button>
</div>
@ -43,24 +43,19 @@ function refreshApp() {
<style lang="scss" scoped>
.update-notification {
margin: .5rem;
display: flex;
align-items: center;
background: $warning;
padding: 0 .25rem;
padding: .5rem;
border-radius: $radius;
font-size: .9rem;
color: var(--grey-900);
justify-content: space-between;
@media screen and (max-width: $desktop) {
position: fixed;
bottom: 1rem;
margin: 0;
width: 450px;
left: calc(50vw - 225px);
padding: .5rem;
}
position: fixed;
bottom: 1rem;
width: 450px;
left: calc(50vw - 225px);
@media screen and (max-width: $tablet) {
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 !== ''">
<icon :icon="icon"/>
<icon
:icon="icon"
:style="{'color': iconColor !== '' ? iconColor : false}"
/>
</span>
<slot />
</BaseButton>
</template>
<script lang="ts">
import {defineComponent} from 'vue'
export default defineComponent({
name: 'x-button',
})
export default { name: 'x-button' }
</script>
<script setup lang="ts">
import {computed, useSlots, PropType} from 'vue'
import {computed, useSlots, type PropType} from 'vue'
import BaseButton from '@/components/base/BaseButton.vue'
const BUTTON_TYPES_MAP = Object.freeze({
@ -46,6 +49,10 @@ const props = defineProps({
type: [String, Array],
default: '',
},
iconColor: {
type: String,
default: '',
},
loading: {
type: Boolean,
default: false,
@ -69,9 +76,11 @@ const showIconOnly = computed(() => props.icon !== '' && typeof slots.default ==
text-transform: uppercase;
font-size: 0.85rem;
font-weight: bold;
height: auto;
min-height: $button-height;
box-shadow: var(--shadow-sm);
display: inline-flex;
white-space: break-spaces;
&:hover {
box-shadow: var(--shadow-md);

View File

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

View File

@ -97,7 +97,7 @@ import {i18n} from '@/i18n'
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 {calculateNearestHours} from '@/helpers/time/calculateNearestHours'
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
@ -131,7 +131,7 @@ export default defineComponent({
default: false,
},
},
emits: ['update:modelValue', 'change', 'close', 'close-on-change'],
emits: ['update:modelValue', 'close', 'close-on-change'],
mounted() {
document.addEventListener('click', this.hideDatePopup)
},
@ -170,11 +170,12 @@ export default defineComponent({
return ''
}
return format(this.date, 'yyy-LL-dd H:mm')
return formatDate(this.date, 'yyy-LL-dd H:mm')
},
},
},
methods: {
formatDateShort,
setDateValue(newVal) {
if (newVal === null) {
this.date = null
@ -185,7 +186,6 @@ export default defineComponent({
updateData() {
this.changed = true
this.$emit('update:modelValue', this.date)
this.$emit('change', this.date)
},
toggleDatePopup() {
if (this.disabled) {
@ -233,7 +233,7 @@ export default defineComponent({
const interval = calculateDayInterval(date)
const newDate = new Date()
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">
{{ emptyText }}
<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>
</p>
<ul class="actions d-print-none" v-if="bottomActions.length > 0">
<li v-if="isEditEnabled && !showPreviewText && showSave">
<BaseButton v-if="showEditButton" @click="toggleEdit">{{ $t('input.editor.edit') }}</BaseButton>
<BaseButton v-else-if="isEditActive" @click="toggleEdit" class="done-edit">{{ $t('misc.save') }}</BaseButton>
<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 v-for="(action, k) in bottomActions" :key="k">
<BaseButton @click="action.action">{{ action.title }}</BaseButton>
@ -32,7 +47,11 @@
<template v-else-if="isEditEnabled && showSave">
<ul v-if="showEditButton" class="actions d-print-none">
<li>
<BaseButton @click="toggleEdit">{{ $t('input.editor.edit') }}</BaseButton>
<BaseButton
@click="toggleEdit"
v-shortcut="editShortcut">
{{ $t('input.editor.edit') }}
</BaseButton>
</li>
</ul>
<x-button
@ -53,7 +72,7 @@ import {defineComponent} from 'vue'
import VueEasymde from './vue-easymde.vue'
import {marked} from 'marked'
import DOMPurify from 'dompurify'
import hljs from 'highlight.js/lib/common'
import {setupMarkdownRenderer} from '@/helpers/markdownRenderer'
import {createEasyMDEConfig} from './editorConfig'
@ -110,8 +129,14 @@ export default defineComponent({
type: Boolean,
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: {
showPreviewText() {
return this.isPreviewActive && this.text === '' && this.emptyText !== ''
@ -187,7 +212,6 @@ export default defineComponent({
this.changeTimeout = setTimeout(() => {
this.$emit('update:modelValue', this.text)
this.$emit('change', this.text)
}, timeout)
},
replaceAt(str, index, replacement) {
@ -198,43 +222,7 @@ export default defineComponent({
return checkboxes[n]
},
renderPreview() {
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-${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
},
})
setupMarkdownRenderer(this.checkboxId)
this.preview = DOMPurify.sanitize(marked(this.text), {ADD_ATTR: ['target']})

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,11 +16,21 @@
</span>
</BaseButton>
</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}">
<slot></slot>
<slot />
</div>
</div>
<footer v-if="$slots.footer" class="card-footer">
<slot name="footer" />
</footer>
</div>
</template>
@ -76,9 +86,11 @@ defineEmits(['close'])
border-radius: $radius $radius 0 0;
}
// FIXME: should maybe be merged somehow with modal
:deep(.modal-card-foot) {
.card-footer {
background-color: var(--grey-50);
border-top: 0;
padding: var(--modal-card-head-padding);
display: flex;
justify-content: flex-end;
}
</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,38 +4,41 @@
:title="title"
:shadow="false"
:padding="false"
class="has-text-left has-overflow"
class="has-text-left"
:has-close="true"
@close="$router.back()"
:loading="loading"
>
<div class="p-4">
<slot></slot>
<slot />
</div>
<footer class="modal-card-foot is-flex is-justify-content-flex-end">
<x-button
v-if="tertiary !== ''"
:shadow="false"
variant="tertiary"
@click.prevent.stop="$emit('tertiary')"
>
{{ tertiary }}
</x-button>
<x-button
variant="secondary"
@click.prevent.stop="$router.back()"
>
{{ $t('misc.cancel') }}
</x-button>
<x-button
variant="primary"
@click.prevent.stop="primary()"
:icon="primaryIcon"
:disabled="primaryDisabled"
>
{{ primaryLabel || $t('misc.create') }}
</x-button>
</footer>
<template #footer>
<slot name="footer">
<x-button
v-if="tertiary !== ''"
:shadow="false"
variant="tertiary"
@click.prevent.stop="$emit('tertiary')"
>
{{ tertiary }}
</x-button>
<x-button
variant="secondary"
@click.prevent.stop="$router.back()"
>
{{ $t('misc.cancel') }}
</x-button>
<x-button
variant="primary"
@click.prevent.stop="primary()"
:icon="primaryIcon"
:disabled="primaryDisabled || loading"
>
{{ primaryLabel || $t('misc.create') }}
</x-button>
</slot>
</template>
</card>
</modal>
</template>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -30,7 +30,7 @@
{{ n.toText(userInfo) }}
</BaseButton>
</div>
<span class="created" v-tooltip="formatDate(n.created)">
<span class="created" v-tooltip="formatDateLong(n.created)">
{{ formatDateSince(n.created) }}
</span>
</div>
@ -52,17 +52,18 @@ import {computed, onMounted, onUnmounted, ref} from 'vue'
import NotificationService from '@/services/notification'
import BaseButton from '@/components/base/BaseButton.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 {useStore} from 'vuex'
import {useStore} from '@/store'
import {useRouter} from 'vue-router'
import {formatDateLong, formatDateSince} from '@/helpers/time/formatDate'
const LOAD_NOTIFICATIONS_INTERVAL = 10000
const store = useStore()
const router = useRouter()
const allNotifications = ref([])
const allNotifications = ref<INotification[]>([])
const showNotifications = ref(false)
const popup = ref(null)

View File

@ -79,30 +79,59 @@
>
<thead>
<tr>
<th>{{ $t('list.share.attributes.link') }}</th>
<th>{{ $t('list.share.attributes.name') }}</th>
<th>{{ $t('list.share.attributes.sharedBy') }}</th>
<th>{{ $t('list.share.attributes.right') }}</th>
<th></th>
<th>{{ $t('list.share.links.view') }}</th>
<th>{{ $t('list.share.attributes.delete') }}</th>
</tr>
</thead>
<tbody>
<tr :key="s.id" v-for="s in linkShares">
<td>
<p class="mb-2 is-italic" v-if="s.name !== ''">
{{ s.name }}
</p>
<p class="mb-2">
<i18n-t keypath="list.share.links.sharedBy">
<strong>{{ s.sharedBy.getDisplayName() }}</strong>
</i18n-t>
</p>
<p class="mb-2">
<template v-if="s.right === RIGHTS.ADMIN">
<span class="icon is-small">
<icon icon="lock"/>
</span>&nbsp;
{{ $t('list.share.right.admin') }}
</template>
<template v-else-if="s.right === RIGHTS.READ_WRITE">
<span class="icon is-small">
<icon icon="pen"/>
</span>&nbsp;
{{ $t('list.share.right.readWrite') }}
</template>
<template v-else>
<span class="icon is-small">
<icon icon="users"/>
</span>&nbsp;
{{ $t('list.share.right.read') }}
</template>
</p>
<div class="field has-addons no-input-mobile">
<div class="control">
<input
:value="getShareLink(s.hash)"
class="input"
readonly
type="text"
:value="getShareLink(s.hash, selectedView[s.id])"
class="input"
readonly
type="text"
/>
</div>
<div class="control">
<x-button
@click="copy(getShareLink(s.hash))"
:shadow="false"
v-tooltip="$t('misc.copy')"
@click="copy(getShareLink(s.hash, selectedView[s.id]))"
:shadow="false"
v-tooltip="$t('misc.copy')"
>
<span class="icon">
<icon icon="paste"/>
@ -112,33 +141,16 @@
</div>
</td>
<td>
<template v-if="s.name !== ''">
{{ s.name }}
</template>
<i v-else>{{ $t('list.share.links.noName') }}</i>
</td>
<td>
{{ s.sharedBy.getDisplayName() }}
</td>
<td class="type">
<template v-if="s.right === RIGHTS.ADMIN">
<span class="icon is-small">
<icon icon="lock"/>
</span>&nbsp;
{{ $t('list.share.right.admin') }}
</template>
<template v-else-if="s.right === RIGHTS.READ_WRITE">
<span class="icon is-small">
<icon icon="pen"/>
</span>&nbsp;
{{ $t('list.share.right.readWrite') }}
</template>
<template v-else>
<span class="icon is-small">
<icon icon="users"/>
</span>&nbsp;
{{ $t('list.share.right.read') }}
</template>
<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 class="actions">
<x-button
@ -166,7 +178,7 @@
<template #header>
<span>{{ $t('list.share.links.remove') }}</span>
</template>
<template #text>
<p>{{ $t('list.share.links.removeText') }}</p>
</template>
@ -177,16 +189,21 @@
<script setup lang="ts">
import {ref, watch, computed, shallowReactive} from 'vue'
import {useStore} from 'vuex'
import {useStore} from '@/store'
import {useI18n} from 'vue-i18n'
import RIGHTS from '@/models/constants/rights.json'
import {RIGHTS} from '@/constants/rights'
import LinkShareModel from '@/models/linkShare'
import type {ILinkShare} from '@/modelTypes/ILinkShare'
import type {IList} from '@/modelTypes/IList'
import LinkShareService from '@/services/linkShare'
import {useCopyToClipboard} from '@/composables/useCopyToClipboard'
import {success} from '@/message'
import type {ListView} from '@/types/ListView'
import {LIST_VIEWS} from '@/types/ListView'
const props = defineProps({
listId: {
@ -197,7 +214,7 @@ const props = defineProps({
const {t} = useI18n({useScope: 'global'})
const linkShares = ref([])
const linkShares = ref<ILinkShare[]>([])
const linkShareService = shallowReactive(new LinkShareService())
const selectedRight = ref(RIGHTS.READ)
const name = ref('')
@ -206,6 +223,17 @@ const showDeleteModal = ref(false)
const linkIdToDelete = ref(0)
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()
watch(
() => props.listId,
@ -216,16 +244,20 @@ watch(
const store = useStore()
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) {
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({
right: selectedRight.value,
listId,
@ -241,7 +273,7 @@ async function add(listId) {
await load(listId)
}
async function remove(listId) {
async function remove(listId: IList['id']) {
try {
await linkShareService.delete(new LinkShareModel({
id: linkIdToDelete.value,
@ -254,15 +286,15 @@ async function remove(listId) {
}
}
function getShareLink(hash: string) {
return frontendUrl.value + 'share/' + hash + '/auth'
function getShareLink(hash: string, view: ListView = LIST_VIEWS.LIST) {
return frontendUrl.value + 'share/' + hash + '/auth?view=' + view
}
</script>
<style lang="scss" scoped>
// FIXME: I think this is not needed
.sharables-list:not(.card-content) {
overflow-y: auto
overflow-y: auto
}
@include modal-transition();

View File

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

View File

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

View File

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

View File

@ -175,19 +175,20 @@
import {defineComponent} from 'vue'
import VueDragResize from 'vue-drag-resize'
import EditTask from './edit-task'
import EditTask from './edit-task.vue'
import TaskService from '../../services/task'
import TaskModel from '../../models/task'
import priorities from '../../models/constants/priorities'
import PriorityLabel from './partials/priorityLabel'
import {PRIORITIES as priorities} from '@/constants/priorities'
import PriorityLabel from './partials/priorityLabel.vue'
import TaskCollectionService from '../../services/taskCollection'
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 BaseButton from '@/components/base/BaseButton.vue'
import {colorIsDark} from '@/helpers/color/colorIsDark'
import {formatDate} from '@/helpers/time/formatDate'
export default defineComponent({
name: 'GanttChart',
@ -439,7 +440,7 @@ export default defineComponent({
formatMonthAndYear(year, month) {
month = month < 10 ? '0' + month : month
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">
<p class="attachment-info-meta">
<i18n-t keypath="task.attachment.createdBy">
<span v-tooltip="formatDate(a.created)">
<span v-tooltip="formatDateLong(a.created)">
{{ formatDateSince(a.created) }}
</span>
<user
@ -49,7 +49,7 @@
/>
</i18n-t>
<span>
{{ a.file.getHumanSize() }}
{{ getHumanSize(a.file.size) }}
</span>
<span v-if="a.file.mime">
{{ a.file.mime }}
@ -147,14 +147,18 @@
import {defineComponent} from 'vue'
import AttachmentService from '../../../services/attachment'
import AttachmentModel from '../../../models/attachment'
import User from '../../misc/user'
import AttachmentModel from '@/models/attachment'
import type {IAttachment} from '@/modelTypes/IAttachment'
import User from '@/components/misc/user.vue'
import {mapState} from 'vuex'
import { useCopyToClipboard } from '@/composables/useCopyToClipboard'
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({
name: 'attachments',
@ -190,7 +194,7 @@ export default defineComponent({
setup(props) {
const copy = useCopyToClipboard()
function copyUrl(attachment: AttachmentModel) {
function copyUrl(attachment: IAttachment) {
copy(generateAttachmentUrl(props.taskId, attachment.id))
}
@ -229,7 +233,12 @@ export default defineComponent({
})
},
methods: {
downloadAttachment(attachment) {
getHumanSize,
formatDate,
formatDateSince,
formatDateLong,
downloadAttachment(attachment: IAttachment) {
this.attachmentService.download(attachment)
},
uploadNewAttachment() {
@ -239,7 +248,7 @@ export default defineComponent({
this.uploadFiles(this.$refs.files.files)
},
uploadFiles(files) {
uploadFiles(files: IFile[]) {
uploadFiles(this.attachmentService, this.taskId, files)
},
async deleteAttachment() {

View File

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

View File

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

View File

@ -1,6 +1,6 @@
<template>
<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">
<span>{{ formatDateSince(task.created) }}</span>
{{ task.createdBy.getDisplayName() }}
@ -27,13 +27,13 @@
</template>
<script lang="ts" setup>
import {computed, toRefs} from 'vue'
import TaskModel from '@/models/task'
import {formatDateLong, formatDateSince} from '@/helpers/time/formatDate'
import {computed, toRefs, type PropType} from 'vue'
import type {ITask} from '@/modelTypes/ITask'
import {formatISO, formatDateLong, formatDateSince} from '@/helpers/time/formatDate'
const props = defineProps({
task: {
type: TaskModel,
type: Object as PropType<ITask>,
required: true,
},
})

View File

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

View File

@ -38,17 +38,17 @@
</template>
<script setup lang="ts">
import {ref, shallowReactive, computed, watch, onMounted, onBeforeUnmount} from 'vue'
import {useStore} from 'vuex'
import {ref, shallowReactive, computed, watch, onMounted, onBeforeUnmount, type PropType} from 'vue'
import {useStore} from '@/store'
import {useI18n} from 'vue-i18n'
import flatPickr from 'vue-flatpickr-component'
import TaskService from '@/services/task'
import TaskModel from '@/models/task'
import type {ITask} from '@/modelTypes/ITask'
const props = defineProps({
modelValue: {
type: TaskModel,
type: Object as PropType<ITask>,
required: true,
},
})
@ -58,7 +58,7 @@ const {t} = useI18n({useScope: 'global'})
const store = useStore()
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.
const dueDate = ref<Date>()

View File

@ -20,40 +20,42 @@
:is-edit-enabled="canWrite"
:upload-callback="attachmentUpload"
:upload-enabled="true"
@change="save"
:placeholder="$t('task.description.placeholder')"
:empty-text="$t('task.description.empty')"
:show-save="true"
edit-shortcut="e"
v-model="task.description"
@update:model-value="save"
/>
</div>
</template>
<script setup lang="ts">
import {ref,computed, watch} from 'vue'
import {useStore} from 'vuex'
import {ref,computed, watch, type PropType} from 'vue'
import {useStore} from '@/store'
import Editor from '@/components/input/AsyncEditor'
import TaskModel from '@/models/task'
import type {ITask} from '@/modelTypes/ITask'
const props = defineProps({
modelValue: {
type: TaskModel,
type: Object as PropType<ITask>,
required: true,
},
attachmentUpload: {
required: true,
},
canWrite: {
type: Boolean,
required: true,
},
})
const emit = defineEmits(['update:modelValue'])
const task = ref<TaskModel>({description: ''})
const task = ref<ITask>({description: ''})
const saved = ref(false)
// 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-results="foundUsers"
@select="addAssignee"
label="username"
label="name"
:select-placeholder="$t('task.assignee.selectPlaceholder')"
v-model="assignees"
ref="multiselect"
@ -28,8 +28,8 @@
</template>
<script setup lang="ts">
import {ref, shallowReactive, watch, PropType} from 'vue'
import {useStore} from 'vuex'
import {ref, shallowReactive, watch, type PropType} from 'vue'
import {useStore} from '@/store'
import {useI18n} from 'vue-i18n'
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 {includesById} from '@/helpers/utils'
import UserModel from '@/models/user'
import ListUserService from '@/services/listUsers'
import {success} from '@/message'
import type { IUser } from '@/modelTypes/IUser'
const props = defineProps({
taskId: {
@ -54,7 +54,7 @@ const props = defineProps({
default: false,
},
modelValue: {
type: Array as PropType<UserModel[]>,
type: Array as PropType<IUser[]>,
default: () => [],
},
})
@ -65,7 +65,7 @@ const {t} = useI18n({useScope: 'global'})
const listUserService = shallowReactive(new ListUserService())
const foundUsers = ref([])
const assignees = ref<UserModel[]>([])
const assignees = ref<IUser[]>([])
watch(
() => 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})
emit('update:modelValue', assignees.value)
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})
// 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
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() {

View File

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

View File

@ -1,7 +1,12 @@
<template>
<div class="heading">
<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
class="title input"
:class="{'disabled': !canWrite}"
@ -32,18 +37,21 @@
</template>
<script setup lang="ts">
import {ref, computed} from 'vue'
import {useStore} from 'vuex'
import {ref, computed, type PropType} from 'vue'
import {useStore} from '@/store'
import {useRouter} from 'vue-router'
import BaseButton from '@/components/base/BaseButton.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({
task: {
type: TaskModel,
type: Object as PropType<ITask>,
required: true,
},
canWrite: {
@ -56,10 +64,11 @@ const emit = defineEmits(['update:task'])
const router = useRouter()
const copy = useCopyToClipboard()
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
await copy(absoluteURL)
}
@ -93,8 +102,7 @@ async function save(title: string) {
setTimeout(() => {
showSavedMessage.value = false
}, 2000)
}
finally {
} finally {
saving.value = false
}
}
@ -104,4 +112,9 @@ async function save(title: string) {
.heading__done {
margin-left: .5rem;
}
.color-bubble {
height: .75rem;
width: .75rem;
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -26,7 +26,7 @@
</template>
<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 Datepicker from '@/components/input/datepicker.vue'
@ -45,8 +45,8 @@ const props = defineProps({
return false
}
const isDate = (e: any) => e instanceof Date
const isString = (e: any) => typeof e === 'string'
const isDate = (e: unknown) => e instanceof Date
const isString = (e: unknown) => typeof e === 'string'
for (const e of prop) {
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[]>([])
@ -86,7 +86,6 @@ watch(
function updateData() {
emit('update:modelValue', reminders.value)
emit('change')
}
const newReminder = ref(null)

View File

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

View File

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

View File

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

View File

@ -3,11 +3,42 @@ import {useI18n} from 'vue-i18n'
export function useCopyToClipboard() {
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) => {
if (!navigator.clipboard) {
fallbackCopyTextToClipboard(text)
return
}
try {
await navigator.clipboard.writeText(text)
} catch {
} catch(e) {
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 {useStore} from 'vuex'
import {useStore} from '@/store'
export function useNameSpaceSearch() {
const query = ref('')

View File

@ -1,12 +1,21 @@
import { computed, watchEffect } from 'vue'
import type { ComputedGetter } from 'vue'
import { computed } 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>) {
const titleRef = computed(titleGetter)
type UseTitleParameters = Parameters<typeof useTitleVueUse>
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 = {
mounted(el, {value}) {
if(value === '') {
return
}
if (isAppleDevice() && value.includes('Control')) {
value = value.replace('Control', 'Meta')
}

View File

@ -1,22 +1,28 @@
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 { 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 files = [file]
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 response = await attachmentService.create(attachmentModel, files)
console.debug(`Uploaded attachments for task ${taskId}, response was`, response)
response.success?.map((attachment: AttachmentModel) => {
response.success?.map((attachment: IAttachment) => {
store.dispatch('tasks/addTaskAttachment', {
taskId,
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}`
}

View File

@ -1,5 +1,5 @@
import {AuthenticatedHTTPFactory} from '@/http-common'
import {AxiosResponse} from 'axios'
import type {AxiosResponse} from 'axios'
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') {
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 type {IList} from '@/modelTypes/IList'
import type ListModal from '@/models/list'
export function getListTitle(l: ListModal) {
export function getListTitle(l: IList) {
if (l.id === -1) {
return i18n.global.t('list.pseudo.favorites.title')
}

View File

@ -1,7 +1,7 @@
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) {
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 {parseURL} from 'ufo'
interface Provider {
export interface Provider {
name: string
key: string
authUrl: string

View File

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

View File

@ -12,7 +12,9 @@ interface dateFoundResult {
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()
if (lowerText.includes('today')) {
@ -62,39 +64,44 @@ export const parseDate = (text: string): dateParseResult => {
}
parsed = getDayFromText(text)
if (parsed.date !== null) {
const month = getMonthFromText(text, parsed.date)
return addTimeToDate(text, month.date, parsed.foundText)
}
parsed = getDateFromTextIn(text, now)
if (parsed.date !== null) {
return addTimeToDate(text, parsed.date, parsed.foundText)
}
parsed = getDateFromTextIn(text)
if (parsed.date !== null) {
parsed = getDateFromText(text)
if (parsed.date === null) {
return {
newText: replaceAll(text, parsed.foundText, ''),
date: parsed.date,
}
}
parsed = getDateFromText(text)
return {
newText: replaceAll(text, parsed.foundText, ''),
date: parsed.date,
}
return addTimeToDate(text, parsed.date, parsed.foundText)
}
const addTimeToDate = (text: string, date: Date, match: string | null): dateParseResult => {
if (match === null) {
const addTimeToDate = (text: string, date: Date, previousMatch: string | null): dateParseResult => {
previousMatch = previousMatch?.trim() || ''
text = replaceAll(text, previousMatch, '')
if (previousMatch === null) {
return {
newText: text,
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)
if (results !== null) {
const time = results[3]
const time = results[2]
const parts = time.split(':')
let hours = parseInt(parts[0])
let minutes = 0
@ -110,7 +117,7 @@ const addTimeToDate = (text: string, date: Date, match: string | null): datePars
date.setSeconds(0)
}
const replace = results !== null ? results[0] : match
const replace = results !== null ? results[0] : previousMatch
return {
newText: replaceAll(text, replace, ''),
date: date,
@ -118,7 +125,7 @@ const addTimeToDate = (text: string, date: Date, match: string | null): datePars
}
export const getDateFromText = (text: string, now: Date = new Date()) => {
const fullDateRegex: RegExp = /([0-9][0-9]?\/[0-9][0-9]?\/[0-9][0-9]([0-9][0-9])?|[0-9][0-9][0-9][0-9]\/[0-9][0-9]?\/[0-9][0-9]?|[0-9][0-9][0-9][0-9]-[0-9][0-9]?-[0-9][0-9]?)/ig
const fullDateRegex: RegExp = / ([0-9][0-9]?\/[0-9][0-9]?\/[0-9][0-9]([0-9][0-9])?|[0-9][0-9][0-9][0-9]\/[0-9][0-9]?\/[0-9][0-9]?|[0-9][0-9][0-9][0-9]-[0-9][0-9]?-[0-9][0-9]?)/ig
// 1. Try parsing the text as a "usual" date, like 2021-06-24 or 06/24/2021
let results: string[] | null = fullDateRegex.exec(text)
@ -127,15 +134,15 @@ export const getDateFromText = (text: string, now: Date = new Date()) => {
let containsYear: boolean = true
if (result === null) {
// 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)
result = results === null ? null : `${results[0]} ${now.getFullYear()}`
foundText = results === null ? '' : results[0]
result = results === null ? null : `${results[0]} ${now.getFullYear()}`.trim()
foundText = results === null ? '' : results[0].trim()
containsYear = false
if (result === null) {
// 3. Try parsing the date as "27/01" or "01/27"
const monthNumericRegex: RegExp = /([0-9][0-9]?\/[0-9][0-9]?)/ig
const monthNumericRegex: RegExp = / ([0-9][0-9]?\/[0-9][0-9]?)/ig
results = monthNumericRegex.exec(text)
// Put the year before or after the date, depending on what works
@ -309,7 +316,7 @@ const getDayFromText = (text: string) => {
while (date < now) {
date.setMonth(date.getMonth() + 1)
}
if (date.getDate() !== day) {
date.setDate(day)
}
@ -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 newDate = new Date()
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)
}
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)
}
@ -11,11 +11,11 @@ export function includesById(array: [], id: string | number) {
}
// 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
}
export function omitBy(obj: {}, check: (value: any) => boolean): {} {
export function omitBy(obj: {}, check: (value: unknown) => boolean) {
if (isNil(obj)) {
return {}
}

View File

@ -2,17 +2,35 @@ import axios from 'axios'
import {getToken} from '@/helpers/auth'
export function HTTPFactory() {
return axios.create({
baseURL: window.API_URL,
const instance = axios.create({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()) {
return axios.create({
baseURL: window.API_URL,
headers: {
Authorization: `Bearer ${token}`,
export function AuthenticatedHTTPFactory() {
const instance = HTTPFactory()
instance.interceptors.request.use((config) => {
config.headers = {
...config.headers,
'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…",
"searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": {
"header": "New list",
"titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "user | users",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete"
}
},
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task",
"color": "Change the color of this task",
"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": {
"title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Začni psát pro vyhledání seznamu…",
"searchSelect": "Klikněte nebo stiskněte Enter pro výběr tohoto seznamu",
"shared": "Sdílené seznamy",
"noDescriptionAvailable": "No list description is available.",
"create": {
"header": "Nový seznam",
"titlePlaceholder": "Název seznamu přijde sem…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "uživatel | uživatelé",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Odkaz",
"name": "Název",
"sharedBy": "Sdíleno od",
"right": "Právo",
"delete": "Smazat"
}
},
@ -870,7 +870,8 @@
"related": "Upravit související úkoly tohoto úkolu",
"color": "Změnit barvu tohoto úkolu",
"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": {
"title": "Zobrazení seznamů",

View File

@ -172,6 +172,7 @@
"search": "Tippe, um nach einer Liste zu suchen…",
"searchSelect": "Klicke auf oder drücke die Eingabetaste, um diese Liste auszuwählen",
"shared": "Geteilte Listen",
"noDescriptionAvailable": "Keine Listenbeschreibung verfügbar.",
"create": {
"header": "Neue Liste",
"titlePlaceholder": "Der Titel der Liste steht hier…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "Benutzer:in | Benutzer:innen",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Name",
"sharedBy": "Geteilt von",
"right": "Berechtigungen",
"delete": "Löschen"
}
},
@ -870,7 +870,8 @@
"related": "Ändere die Abhängigen Aufgaben dieser Aufgabe",
"color": "Die Farbe dieser Aufgabe ändern",
"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": {
"title": "Listenansicht",

View File

@ -172,6 +172,7 @@
"search": "Schriib, um nachere Liste z'sueche…",
"searchSelect": "Druck uf Enter um die Liste uuszwähle",
"shared": "Teilti Liste",
"noDescriptionAvailable": "Keine Listenbeschreibung verfügbar.",
"create": {
"header": "Neue Liste",
"titlePlaceholder": "Listetitl da ahgeh…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "Benutzer | Benutzer",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Namä",
"sharedBy": "Teilt vo",
"right": "Rechts",
"delete": "Chüble"
}
},
@ -870,7 +870,8 @@
"related": "Beziehige vo dere Uufgab bearbeite",
"color": "Die Farbe dieser Aufgabe ändern",
"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": {
"title": "Listenansicht",

View File

@ -172,6 +172,7 @@
"search": "Type to search for a list…",
"searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": {
"header": "New list",
"titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "user | users",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete"
}
},
@ -873,7 +873,8 @@
"related": "Modify related tasks of this task",
"color": "Change the color of this task",
"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": {
"title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Type to search for a list…",
"searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": {
"header": "New list",
"titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "user | users",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete"
}
},
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task",
"color": "Change the color of this task",
"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": {
"title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Écris pour rechercher une liste…",
"searchSelect": "Clique ou appuie sur la touche Entrée pour sélectionner cette liste",
"shared": "Listes partagées",
"noDescriptionAvailable": "No list description is available.",
"create": {
"header": "Nouvelle liste",
"titlePlaceholder": "Entre le nom de la liste…",
@ -242,7 +243,9 @@
"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 !",
"createSuccess": "Partage créé.",
"deleteSuccess": "Lien supprimé"
"deleteSuccess": "Lien supprimé",
"view": "View",
"sharedBy": "Shared by {0}"
},
"userTeam": {
"typeUser": "utilisateur·rice | utilisateur·rice·s",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Lien",
"name": "Nom",
"sharedBy": "Partagé par",
"right": "Droit",
"delete": "Supprimer"
}
},
@ -870,7 +870,8 @@
"related": "Modifier les tâches connexes de cette tâche",
"color": "Changer la couleur de cette tâche",
"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": {
"title": "Vues en liste",

View File

@ -87,7 +87,7 @@
"language": "Lingua",
"defaultList": "Lista predefinita",
"timezone": "Fuso Orario",
"overdueTasksRemindersTime": "Orario email del promemoria attività in ritardo"
"overdueTasksRemindersTime": "Orario email attività in scadute"
},
"totp": {
"title": "Autenticazione a due fattori",
@ -172,6 +172,7 @@
"search": "Digita per cercare una lista…",
"searchSelect": "Fare clic o premere invio per selezionare questa lista",
"shared": "Liste Condivise",
"noDescriptionAvailable": "Nessuna descrizione della lista disponibile.",
"create": {
"header": "Nuova lista",
"titlePlaceholder": "Il titolo della lista va qui…",
@ -242,7 +243,9 @@
"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!",
"createSuccess": "Link di condivisione creato.",
"deleteSuccess": "Link di condivisione elimitato"
"deleteSuccess": "Link di condivisione elimitato",
"view": "Mostra",
"sharedBy": "Condiviso da {0}"
},
"userTeam": {
"typeUser": "utente | utenti",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Nome",
"sharedBy": "Condiviso da",
"right": "Permessi",
"delete": "Elimina"
}
},
@ -562,12 +562,12 @@
}
},
"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",
"title": "Date Math",
"intro": "Date Math allows you to specify relative dates which are resolved on the fly by Vikunja when applying the filter.",
"expression": "Each Date Math expression starts with an anchor date, which can either be {0}, or a date string ending with {1}. This anchor date can optionally be followed by one or more maths expressions.",
"similar": "These expressions are similar to the ones provided by {0} and {1}.",
"title": "Date Calcolate",
"intro": "Le Date Calcolate ti permettono di specificare date relative che vengono calcolate al volo da Vikunja quando viene applicato il filtro.",
"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": "Queste espressioni sono simili a quelle fornite da {0} e {1}.",
"add1Day": "Aggiungi un giorno",
"minus1Day": "Sottrai un giorno",
"roundDay": "Arrotonda per difetto al giorno più vicino",
@ -781,7 +781,7 @@
"weeks": "Settimane",
"months": "Mesi",
"years": "Anni",
"invalidAmount": "Please enter more than 0."
"invalidAmount": "Inserisci più di 0."
},
"quickAddMagic": {
"hint": "Puoi usare l'Aggiunta Rapida Magica",
@ -791,15 +791,15 @@
"multiple": "Puoi usarlo più volte.",
"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à.",
"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\".",
"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à.",
"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}.",
"list2": "Ciò restituirà un errore se la lista non esiste.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"list3": "Per usare gli spazi, basta aggiungere un \" o ' prima e dopo il nome della lista.",
"list4": "Per esempio: {prefix}\"Etichetta con spazi\".",
"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:",
"dateWeekday": "qualsiasi giorno della settimana, userà la data più vicina",
@ -870,7 +870,8 @@
"related": "Modifica le attività collegate a questa",
"color": "Cambia il colore di questa attività",
"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": {
"title": "Viste Liste",

View File

@ -172,6 +172,7 @@
"search": "Typ om naar een lijst te zoeken…",
"searchSelect": "Klik of druk op enter om deze lijst te selecteren",
"shared": "Gedeelde lijsten",
"noDescriptionAvailable": "No list description is available.",
"create": {
"header": "Nieuwe lijst",
"titlePlaceholder": "De titel van de lijst komt hier…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "gebruiker | gebruikers",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Naam",
"sharedBy": "Gedeeld door",
"right": "Rechten",
"delete": "Verwijderen"
}
},
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task",
"color": "Change the color of this task",
"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": {
"title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Wpisz, aby wyszukać listę…",
"searchSelect": "Kliknij lub naciśnij Enter, aby wybrać tę listę",
"shared": "Współdzielone listy",
"noDescriptionAvailable": "No list description is available.",
"create": {
"header": "Nowa lista",
"titlePlaceholder": "Tu wpisz tytuł listy…",
@ -242,7 +243,9 @@
"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ąć!",
"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": {
"typeUser": "użytkownik(a) | użytkownikom",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Nazwa",
"sharedBy": "Udostępniony przez",
"right": "Uprawnienia",
"delete": "Usuń"
}
},
@ -870,7 +870,8 @@
"related": "Zmodyfikuj zadania powiązane z tym zadaniem",
"color": "Zmień kolor tego zadania",
"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": {
"title": "Widoki listy",

View File

@ -172,6 +172,7 @@
"search": "Type to search for a list…",
"searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": {
"header": "New list",
"titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "user | users",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete"
}
},
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task",
"color": "Change the color of this task",
"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": {
"title": "List Views",

View File

@ -172,6 +172,7 @@
"search": "Escreve para pesquisar por uma lista…",
"searchSelect": "Clica ou pressiona Enter para selecionar esta lista",
"shared": "Listas Partilhadas",
"noDescriptionAvailable": "Não está disponível nenhuma descrição da lista.",
"create": {
"header": "Nova lista",
"titlePlaceholder": "O título da lista será aqui…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "utilizador | utilizadores",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Nome",
"sharedBy": "Partilhado por",
"right": "Permissões",
"delete": "Eliminar"
}
},
@ -781,7 +781,7 @@
"weeks": "Semanas",
"months": "Meses",
"years": "Anos",
"invalidAmount": "Please enter more than 0."
"invalidAmount": "Por favor, insere mais do que 0."
},
"quickAddMagic": {
"hint": "Podes utilizar a Introdução Mágica Rápida",
@ -870,7 +870,8 @@
"related": "Modificar as tarefas relacionadas desta tarefa",
"color": "Alterar a cor desta tarefa",
"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": {
"title": "Visualização em Lista",

View File

@ -172,6 +172,7 @@
"search": "Type to search for a list…",
"searchSelect": "Click or press enter to select this list",
"shared": "Shared Lists",
"noDescriptionAvailable": "No list description is available.",
"create": {
"header": "New list",
"titlePlaceholder": "The list's title goes here…",
@ -242,7 +243,9 @@
"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!",
"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": {
"typeUser": "user | users",
@ -264,9 +267,6 @@
},
"attributes": {
"link": "Link",
"name": "Name",
"sharedBy": "Shared by",
"right": "Right",
"delete": "Delete"
}
},
@ -870,7 +870,8 @@
"related": "Modify related tasks of this task",
"color": "Change the color of this task",
"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": {
"title": "List Views",

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