Compare commits

..

88 Commits

Author SHA1 Message Date
Dominik Pschenitschni 8846f681fa
feat: improve types
continuous-integration/drone/pr Build is failing Details
2022-07-20 21:27:12 +02:00
Dominik Pschenitschni 2e697ad19f
chore: better variable typing 2022-07-20 21:27:12 +02:00
Dominik Pschenitschni bfb75cd612
chore: remove unnecessary defineComponent 2022-07-20 21:27:12 +02:00
Dominik Pschenitschni eaebb8d529
chore: remove global mixing 2022-07-20 21:27:12 +02:00
Dominik Pschenitschni fb1832edfd
chore: remove date mixins 2022-07-20 21:27:12 +02:00
Dominik Pschenitschni c1b5547004
feat: function attribute typing 2022-07-20 21:26:06 +02:00
Dominik Pschenitschni e1288a9c40
feat: constants 2022-07-20 21:25:01 +02:00
Dominik Pschenitschni 32e9dcb56b
chore: improve type imports 2022-07-20 21:25:00 +02:00
Dominik Pschenitschni 91d8bc1229
feat: add properties to models 2022-07-20 21:21:43 +02:00
Dominik Pschenitschni 4e93b6d156
feat: convert abstractService to ts 2022-07-20 21:21:42 +02:00
kolaente 9ddb55a5ef
fix: vuex state mutation error when moving a kanban bucket
continuous-integration/drone/push Build is passing Details
2022-07-20 17:18:27 +02:00
kolaente cdb63b578d
chore: use the <dropdown> and <dropdown-item> components everywhere
continuous-integration/drone/push Build is passing Details
Resolves #2176
2022-07-20 17:08:58 +02:00
renovate d6a10b01dd chore(deps): update dependency vue-tsc to v0.38.9 (#2162)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2162
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-20 09:06:08 +00:00
renovate b74c961723 chore(deps): update dependency cypress to v10.3.1 (#2175)
continuous-integration/drone/push Build is failing Details
Reviewed-on: #2175
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-19 20:24:27 +00:00
kolaente 8b0e88b574
fix: lint
continuous-integration/drone/push Build is passing Details
2022-07-19 21:20:44 +02:00
kolaente 175fb02629
fix: don't allow marking a task as done in a read-only list
continuous-integration/drone/push Build is failing Details
2022-07-19 18:37:11 +02:00
kolaente dac9d918b5
feat(kanban): show loading indicators when handling tasks
continuous-integration/drone/push Build is failing Details
2022-07-19 18:33:45 +02:00
kolaente e7de930129
fix: properly update state when duplicating a list
continuous-integration/drone/push Build is passing Details
2022-07-19 17:15:39 +02:00
kolaente a0d0c2cb1f
fix(kanban): error when moving a task to an empty bucket
continuous-integration/drone/push Build is passing Details
2022-07-19 17:13:22 +02:00
kolaente a4d3cafdf1
fix: pagination on table view should not open the list view
continuous-integration/drone/push Build is passing Details
Resolves #2173
2022-07-19 17:11:11 +02:00
kolaente f5bb697032
fix: quick actions arrow key navigation in dark mode
continuous-integration/drone/push Build is passing Details
2022-07-19 17:04:35 +02:00
kolaente 62bbffb17e
fix: user avatar settings
continuous-integration/drone/push Build is passing Details
2022-07-19 17:00:40 +02:00
kolaente c2d5370e4a
fix: don't use transitions for elements where it is not possible
continuous-integration/drone/push Build is passing Details
Resolves #2153
2022-07-19 16:56:09 +02:00
kolaente 6dc02c45dd
fix: don't try to pass nonexistant props to filters
continuous-integration/drone/push Build is passing Details
Resolves #2152
2022-07-19 16:41:55 +02:00
Dominik Pschenitschni 0456f4a041 fix: use of sortable js with transition-group (#2160)
continuous-integration/drone/push Build is failing Details
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #2160
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-07-19 14:32:12 +00:00
renovate c1dd20a30b fix(deps): update dependency vue-i18n to v9.2.0-beta.40 (#2172)
continuous-integration/drone/push Build is failing Details
Reviewed-on: #2172
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-19 14:20:44 +00:00
renovate acc7bf4305 fix(deps): update dependency dompurify to v2.3.10 (#2167)
continuous-integration/drone/push Build is failing Details
Reviewed-on: #2167
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-18 20:36:42 +00:00
renovate 86688d7e95 chore(deps): update dependency vite to v3.0.2 (#2166)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2166
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-18 20:36:11 +00:00
renovate aaee49b70e chore(deps): update typescript-eslint monorepo to v5.30.7 (#2168)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2168
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-18 20:35:44 +00:00
renovate 6b23b954a8 chore(deps): update dependency @vitejs/plugin-vue to v3.0.1 (#2147)
continuous-integration/drone/push Build is failing Details
Reviewed-on: #2147
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-18 20:35:17 +00:00
kolaente 9fd2f4ea5c
fix: datepicker confirm button overflow
continuous-integration/drone/push Build is passing Details
Resolves #2165
2022-07-18 15:13:51 +02:00
konrad dca05f852c chore(deps): update dependency vite to v3 (#2149)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2149
Reviewed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Reviewed-by: konrad <k@knt.li>
2022-07-18 13:05:36 +00:00
kolaente 5aa6cce185
chore: update lockfile
continuous-integration/drone/pr Build is passing Details
2022-07-18 12:15:07 +02:00
Dominik Pschenitschni d96ea384dc
fix: upgrade packages for vite 3.0
continuous-integration/drone/pr Build was killed Details
2022-07-18 12:13:28 +02:00
renovate 5d33144b8e
chore(deps): update dependency vite to v3 2022-07-18 12:13:25 +02:00
renovate d462d56202 chore(deps): update dependency eslint to v8.20.0 (#2159)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2159
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-18 10:10:19 +00:00
renovate 2648592ac0 fix(deps): update vueuse to v8.9.4 (#2161)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2161
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-18 10:09:49 +00:00
renovate 1ac78729a4 fix(deps): update dependency vue-i18n to v9.2.0-beta.39 (#2163)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2163
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-18 10:09:19 +00:00
renovate 9d1195a2ed chore(deps): update dependency happy-dom to v6.0.4 (#2164)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2164
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-18 10:06:05 +00:00
renovate 8db3c6c09f chore(deps): update dependency rollup to v2.77.0
continuous-integration/drone/push Build is passing Details
2022-07-16 21:10:55 +00:00
renovate b927c65637 chore(deps): update dependency vue-tsc to v0.38.7
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2022-07-16 19:02:35 +00:00
renovate 0af0a9808f fix(deps): update sentry-javascript monorepo to v7.7.0
continuous-integration/drone/push Build is passing Details
2022-07-16 18:53:14 +00:00
renovate 24294217ea chore(deps): update dependency rollup-plugin-visualizer to v5.7.1
continuous-integration/drone/push Build is passing Details
2022-07-16 18:52:42 +00:00
renovate a71d0a8e94 fix(deps): update dependency vue-i18n to v9.2.0-beta.38
continuous-integration/drone/push Build is passing Details
2022-07-16 18:52:00 +00:00
renovate 3304983c18 chore(deps): update dependency vitest to v0.18.1
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2022-07-16 16:02:42 +00:00
drone 0714c83ed9 [skip ci] Updated translations via Crowdin 2022-07-15 00:14:58 +00:00
renovate 5f35bee025 fix(deps): update vueuse to v8.9.3 (#2148)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2148
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 16:15:56 +00:00
renovate c73d828d4e fix(deps): update sentry-javascript monorepo to v7.6.0 (#2142)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2142
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 14:53:54 +00:00
renovate 95c3599bd7 fix(deps): update vueuse to v8.9.2 (#2143)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2143
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 14:53:12 +00:00
renovate 6effd80702 chore(deps): update dependency rollup-plugin-visualizer to v5.7.0 (#2141)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2141
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 14:17:33 +00:00
renovate d4a4fc00a4 fix(deps): update dependency vue-router to v4.1.2 (#2136)
continuous-integration/drone/push Build is failing Details
Reviewed-on: #2136
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 14:17:00 +00:00
renovate a460327492 fix(deps): update dependency highlight.js to v11.6.0 (#2140)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2140
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 12:43:46 +00:00
renovate 743902fa52 chore(deps): update dependency vitest to v0.18.0 (#2139)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2139
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 12:43:24 +00:00
renovate 0afbc99ce3 chore(deps): update dependency rollup to v2.76.0 (#2138)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2138
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 12:43:08 +00:00
renovate ee43c588ef chore(deps): update dependency eslint-plugin-vue to v9.2.0 (#2137)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2137
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 12:42:43 +00:00
renovate c6b9162ec0 fix(deps): update dependency vue-i18n to v9.2.0-beta.37 (#2135)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2135
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 12:42:09 +00:00
renovate 646840141d fix(deps): update dependency ufo to v0.8.5 (#2134)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2134
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 12:41:41 +00:00
renovate 202c9c4190 fix(deps): update dependency marked to v4.0.18 (#2133)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2133
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 12:41:13 +00:00
renovate 309d4b785d chore(deps): update dependency vite to v2.9.14 (#2126)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2126
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 12:40:03 +00:00
renovate 537fedcd24 chore(deps): update dependency @cypress/vite-dev-server to v2.2.3 (#2121)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2121
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 07:09:33 +00:00
renovate c9d6dc8e8e chore(deps): update dependency @vue/test-utils to v2.0.2 (#2123)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2123
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 07:08:50 +00:00
renovate d8aef0c4e5 chore(deps): update dependency esbuild to v0.14.49 (#2124)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2124
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 07:08:10 +00:00
renovate 2f6c962eef chore(deps): update dependency happy-dom to v6.0.3 (#2125)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2125
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 07:07:32 +00:00
renovate d0cb6b1757 chore(deps): update dependency vite-plugin-pwa to v0.12.3 (#2127)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2127
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 07:06:43 +00:00
renovate e87621bea5 chore(deps): update dependency vue-tsc to v0.38.5 (#2128)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2128
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 07:06:02 +00:00
renovate e06b44b6b3 chore(deps): update typescript-eslint monorepo to v5.30.6 (#2129)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2129
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 07:05:29 +00:00
renovate f052148c53 fix(deps): update dependency @kyvg/vue3-notification to v2.3.5 (#2130)
continuous-integration/drone/push Build is failing Details
Reviewed-on: #2130
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 07:02:22 +00:00
renovate 7b6de0d22f fix(deps): update dependency dompurify to v2.3.9 (#2131)
continuous-integration/drone/push Build is failing Details
Reviewed-on: #2131
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-14 07:01:36 +00:00
renovate 0f44902ffc chore(deps): update dependency @cypress/vue to v3.1.2 (#2122)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2122
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-13 21:48:47 +00:00
renovate 2a85ccd316 chore(deps): update dependency netlify-cli to v10.9.0 (#2024)
continuous-integration/drone/push Build is passing Details
Reviewed-on: #2024
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-07-13 21:48:20 +00:00
kolaente a4c3939fb6
fix: make sure saved filter data is correctly populated when editing a filter
continuous-integration/drone/push Build is passing Details
Resolves #2114
2022-07-13 17:52:42 +02:00
kolaente ef0fe0b11d
fix(tests): correctly set task position in cypress test fixtures
continuous-integration/drone/push Build is passing Details
2022-07-13 17:00:38 +02:00
kolaente 99cd68ad43
fix(kanban): make sure the task position is calculated correctly
continuous-integration/drone/push Build is failing Details
The very first task in a bucket always has the position 0. Now, if we move another task in front of that, it too gets the position 0 assigned. That means the two first tasks now both have the position 0 and are not sorted correctly. This commit fixes that: When moving a task to the very first position it checks if the task now on the second position also has position 0 assigned to it. If that's the case, we'll now update that task's position as well to make sure it has another position than 0.
2022-07-13 16:51:56 +02:00
kolaente 302728526a
chore(quick add magic): clarify the use of spaces for lists and labels
continuous-integration/drone/push Build is failing Details
2022-07-13 16:31:30 +02:00
kolaente 99a5afc817
fix: task sorting by position in list view
continuous-integration/drone/push Build is failing Details
Resolves #2119
2022-07-13 16:24:50 +02:00
kolaente 4a8b7a726a
fix: task sorting in table
continuous-integration/drone/push Build is passing Details
Resolves #2118
2022-07-13 16:19:58 +02:00
kolaente 579cff647d
feat: allow marking a task done from a filter
continuous-integration/drone/push Build is passing Details
Resolves #2113
2022-07-12 11:59:39 +02:00
kolaente 2a20c95ba5
fix(tests): remove old label task relations before adding a new one
continuous-integration/drone/push Build is passing Details
2022-07-12 09:12:04 +02:00
kolaente 97e6147351
feat(tests): change cypress default viewport size 2022-07-12 09:09:26 +02:00
kolaente e8705c66dd
fix: add a task relation with enter when only one search result is available
continuous-integration/drone/push Build is failing Details
Resolves #2107
2022-07-11 20:02:35 +02:00
kolaente 6973d76e17
feat: select a value when there is one exact match in multiselect
continuous-integration/drone/push Build is failing Details
Related to #2107
2022-07-11 19:55:03 +02:00
kolaente cc079336a8
fix: expose focus function for BaseButton
continuous-integration/drone/push Build is passing Details
This fixes an issue with the usage of BaseButton in multiselect.
2022-07-11 17:06:18 +02:00
kolaente ab7bf7d8f9
fix: datepicker button color and spacing for overdue dates
continuous-integration/drone/push Build is passing Details
2022-07-11 16:41:08 +02:00
Dominik Pschenitschni 6e54929104 fix: pass modal bindings to teleport target (#2109)
continuous-integration/drone/push Build is passing Details
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #2109
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-07-11 13:27:57 +00:00
kolaente dff5d84ebb
fix: make sure weekday parsing in quick add magic ignores the casing
continuous-integration/drone/push Build is passing Details
Resolves #2105
2022-07-11 12:35:08 +02:00
kolaente 990639dd24
fix: setting a label on a task fails if the kanban view is open in the background
continuous-integration/drone/push Build encountered an error Details
2022-07-08 23:30:03 +02:00
kolaente a073cfac66
fix(tests): set correct user issuer for test users
continuous-integration/drone/push Build is passing Details
2022-07-08 17:22:33 +02:00
kolaente 40b30079c1
fix(gantt): correctly show month and year in gantt chart on safari
continuous-integration/drone/push Build is failing Details
Resolves https://github.com/go-vikunja/frontend/issues/59
2022-07-08 16:39:21 +02:00
76 changed files with 1632 additions and 1593 deletions

View File

@ -1,23 +1,25 @@
import { defineConfig } from 'cypress' import {defineConfig} from 'cypress'
export default defineConfig({ export default defineConfig({
env: { env: {
API_URL: 'http://localhost:3456/api/v1', API_URL: 'http://localhost:3456/api/v1',
TEST_SECRET: 'averyLongSecretToSe33dtheDB', TEST_SECRET: 'averyLongSecretToSe33dtheDB',
}, },
video: false, video: false,
retries: { retries: {
runMode: 2, runMode: 2,
}, },
projectId: '181c7x', projectId: '181c7x',
e2e: { e2e: {
baseUrl: 'http://localhost:4173', baseUrl: 'http://localhost:4173',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
}, },
component: { component: {
devServer: { devServer: {
framework: 'vue', framework: 'vue',
bundler: 'vite', bundler: 'vite',
}, },
}, },
viewportWidth: 1600,
viewportHeight: 900,
}) })

View File

@ -91,7 +91,9 @@ describe('List View List', () => {
cy.visit('/lists/1/list') cy.visit('/lists/1/list')
cy.get('.tasks-container .tasks') cy.get('.tasks-container .tasks')
.should('contain', tasks[99].title) .should('contain', tasks[1].title)
cy.get('.tasks-container .tasks')
.should('not.contain', tasks[99].title)
cy.get('.card-content .pagination .pagination-link') cy.get('.card-content .pagination .pagination-link')
.contains('2') .contains('2')
@ -100,8 +102,8 @@ describe('List View List', () => {
cy.url() cy.url()
.should('contain', '?page=2') .should('contain', '?page=2')
cy.get('.tasks-container .tasks') cy.get('.tasks-container .tasks')
.should('contain', tasks[1].title) .should('contain', tasks[99].title)
cy.get('.tasks-container .tasks') cy.get('.tasks-container .tasks')
.should('not.contain', tasks[99].title) .should('not.contain', tasks[1].title)
}) })
}) })

View File

@ -340,6 +340,7 @@ describe('Task', () => {
list_id: 1, list_id: 1,
}) })
const labels = LabelFactory.create(1) const labels = LabelFactory.create(1)
LabelTaskFactory.truncate()
cy.visit(`/tasks/${tasks[0].id}`) cy.visit(`/tasks/${tasks[0].id}`)

View File

@ -15,6 +15,7 @@ export class TaskFactory extends Factory {
list_id: 1, list_id: 1,
created_by_id: 1, created_by_id: 1,
index: '{increment}', index: '{increment}',
position: '{increment}',
created: formatISO(now), created: formatISO(now),
updated: formatISO(now) updated: formatISO(now)
} }

View File

@ -14,6 +14,7 @@ export class UserFactory extends Factory {
username: faker.lorem.word(10) + faker.datatype.uuid(), username: faker.lorem.word(10) + faker.datatype.uuid(),
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.', // 1234 password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.', // 1234
status: 0, status: 0,
issuer: 'local',
created: formatISO(now), created: formatISO(now),
updated: formatISO(now) updated: formatISO(now)
} }

View File

@ -19,80 +19,80 @@
}, },
"dependencies": { "dependencies": {
"@github/hotkey": "2.0.0", "@github/hotkey": "2.0.0",
"@kyvg/vue3-notification": "2.3.4", "@kyvg/vue3-notification": "2.3.5",
"@sentry/tracing": "7.5.0", "@sentry/tracing": "7.7.0",
"@sentry/vue": "7.5.0", "@sentry/vue": "7.7.0",
"@types/is-touch-device": "1.0.0", "@types/is-touch-device": "1.0.0",
"@types/sortablejs": "1.13.0", "@types/sortablejs": "1.13.0",
"@vueuse/core": "8.7.5", "@vueuse/core": "8.9.4",
"@vueuse/router": "8.7.5", "@vueuse/router": "8.9.4",
"blurhash": "1.1.5", "blurhash": "1.1.5",
"bulma-css-variables": "0.9.33", "bulma-css-variables": "0.9.33",
"camel-case": "4.1.2", "camel-case": "4.1.2",
"date-fns": "2.28.0", "date-fns": "2.28.0",
"dompurify": "2.3.8", "dompurify": "2.3.10",
"easymde": "2.16.1", "easymde": "2.16.1",
"flatpickr": "4.6.13", "flatpickr": "4.6.13",
"flexsearch": "0.7.21", "flexsearch": "0.7.21",
"highlight.js": "11.5.1", "highlight.js": "11.6.0",
"is-touch-device": "1.0.1", "is-touch-device": "1.0.1",
"lodash.clonedeep": "4.5.0", "lodash.clonedeep": "4.5.0",
"lodash.debounce": "4.0.8", "lodash.debounce": "4.0.8",
"marked": "4.0.17", "marked": "4.0.18",
"minimist": "1.2.6", "minimist": "1.2.6",
"register-service-worker": "1.7.2", "register-service-worker": "1.7.2",
"snake-case": "3.0.4", "snake-case": "3.0.4",
"ufo": "0.8.4", "ufo": "0.8.5",
"v-tooltip": "4.0.0-beta.17", "v-tooltip": "4.0.0-beta.17",
"vue": "3.2.37", "vue": "3.2.37",
"vue-advanced-cropper": "2.8.3", "vue-advanced-cropper": "2.8.3",
"vue-drag-resize": "2.0.3", "vue-drag-resize": "2.0.3",
"vue-flatpickr-component": "9.0.6", "vue-flatpickr-component": "9.0.6",
"vue-i18n": "9.2.0-beta.36", "vue-i18n": "9.2.0-beta.40",
"vue-router": "4.1.0", "vue-router": "4.1.2",
"vuex": "4.0.2", "vuex": "4.0.2",
"workbox-precaching": "6.5.3", "workbox-precaching": "6.5.3",
"zhyswan-vuedraggable": "4.1.3" "zhyswan-vuedraggable": "4.1.3"
}, },
"devDependencies": { "devDependencies": {
"@4tw/cypress-drag-drop": "2.2.1", "@4tw/cypress-drag-drop": "2.2.1",
"@cypress/vite-dev-server": "2.2.2", "@cypress/vite-dev-server": "3.0.0",
"@cypress/vue": "3.1.1", "@cypress/vue": "4.0.0",
"@faker-js/faker": "7.3.0", "@faker-js/faker": "7.3.0",
"@fortawesome/fontawesome-svg-core": "6.1.1", "@fortawesome/fontawesome-svg-core": "6.1.1",
"@fortawesome/free-regular-svg-icons": "6.1.1", "@fortawesome/free-regular-svg-icons": "6.1.1",
"@fortawesome/free-solid-svg-icons": "6.1.1", "@fortawesome/free-solid-svg-icons": "6.1.1",
"@fortawesome/vue-fontawesome": "3.0.1", "@fortawesome/vue-fontawesome": "3.0.1",
"@types/flexsearch": "0.7.3", "@types/flexsearch": "0.7.3",
"@typescript-eslint/eslint-plugin": "5.30.4", "@typescript-eslint/eslint-plugin": "5.30.7",
"@typescript-eslint/parser": "5.30.4", "@typescript-eslint/parser": "5.30.7",
"@vitejs/plugin-legacy": "1.8.2", "@vitejs/plugin-legacy": "2.0.0",
"@vitejs/plugin-vue": "2.3.3", "@vitejs/plugin-vue": "3.0.1",
"@vue/eslint-config-typescript": "11.0.0", "@vue/eslint-config-typescript": "11.0.0",
"@vue/test-utils": "2.0.0-rc.18", "@vue/test-utils": "2.0.2",
"@vue/tsconfig": "0.1.3", "@vue/tsconfig": "0.1.3",
"autoprefixer": "10.4.7", "autoprefixer": "10.4.7",
"axios": "0.27.2", "axios": "0.27.2",
"browserslist": "4.21.1", "browserslist": "4.21.1",
"caniuse-lite": "1.0.30001363", "caniuse-lite": "1.0.30001363",
"cypress": "10.3.0", "cypress": "10.3.1",
"esbuild": "0.14.48", "esbuild": "0.14.49",
"eslint": "8.19.0", "eslint": "8.20.0",
"eslint-plugin-vue": "9.1.1", "eslint-plugin-vue": "9.2.0",
"express": "4.18.1", "express": "4.18.1",
"happy-dom": "6.0.0", "happy-dom": "6.0.4",
"netlify-cli": "10.3.1", "netlify-cli": "10.9.0",
"postcss": "8.4.14", "postcss": "8.4.14",
"postcss-preset-env": "7.7.2", "postcss-preset-env": "7.7.2",
"rollup": "2.75.7", "rollup": "2.77.0",
"rollup-plugin-visualizer": "5.6.0", "rollup-plugin-visualizer": "5.7.1",
"sass": "1.53.0", "sass": "1.53.0",
"typescript": "4.7.4", "typescript": "4.7.4",
"vite": "2.9.13", "vite": "3.0.2",
"vite-plugin-pwa": "0.12.2", "vite-plugin-pwa": "0.12.3",
"vite-svg-loader": "3.4.0", "vite-svg-loader": "3.4.0",
"vitest": "0.17.0", "vitest": "0.18.1",
"vue-tsc": "0.38.2", "vue-tsc": "0.38.9",
"wait-on": "6.0.1", "wait-on": "6.0.1",
"workbox-cli": "6.5.3" "workbox-cli": "6.5.3"
}, },

View File

@ -10,9 +10,7 @@
</no-auth-wrapper> </no-auth-wrapper>
<Notification/> <Notification/>
<transition name="fade"> <keyboard-shortcuts v-if="keyboardShortcutsActive"/>
<keyboard-shortcuts v-if="keyboardShortcutsActive"/>
</transition>
</ready> </ready>
</template> </template>

View File

@ -5,6 +5,7 @@
:class="{ 'base-button--type-button': isButton }" :class="{ 'base-button--type-button': isButton }"
v-bind="elementBindings" v-bind="elementBindings"
:disabled="disabled || undefined" :disabled="disabled || undefined"
ref="button"
> >
<slot /> <slot />
</component> </component>
@ -84,6 +85,15 @@ watchEffect(() => {
}) })
const isButton = computed(() => componentNodeName.value === 'button') const isButton = computed(() => componentNodeName.value === 'button')
const button = ref()
function focus() {
button.value.focus()
}
defineExpose({
focus,
})
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -85,7 +85,12 @@ import DatemathHelp from '@/components/date/datemathHelp.vue'
const store = useStore() const store = useStore()
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
const emit = defineEmits(['dateChanged']) const emit = defineEmits(['dateChanged', 'update:modelValue'])
const props = defineProps({
modelValue: {
required: false,
},
})
// FIXME: This seems to always contain the default value - that breaks the picker // FIXME: This seems to always contain the default value - that breaks the picker
const weekStart = computed<number>(() => store.state.auth.settings.weekStart ?? 0) const weekStart = computed<number>(() => store.state.auth.settings.weekStart ?? 0)
@ -108,11 +113,22 @@ const flatpickrRange = ref('')
const from = ref('') const from = ref('')
const to = ref('') const to = ref('')
watch(
() => props.modelValue,
newValue => {
from.value = newValue.dateFrom
to.value = newValue.dateTo
flatpickrRange.value = `${from.value} to ${to.value}`
},
)
function emitChanged() { function emitChanged() {
emit('dateChanged', { const args = {
dateFrom: from.value === '' ? null : from.value, dateFrom: from.value === '' ? null : from.value,
dateTo: to.value === '' ? null : to.value, dateTo: to.value === '' ? null : to.value,
}) }
emit('dateChanged', args)
emit('update:modelValue', args)
} }
watch( watch(

View File

@ -38,16 +38,14 @@
</keep-alive> </keep-alive>
</router-view> </router-view>
<transition name="modal"> <modal
<modal v-if="currentModal"
v-if="currentModal" @close="closeModal()"
@close="closeModal()" variant="scrolling"
variant="scrolling" class="task-detail-view-modal"
class="task-detail-view-modal" >
> <component :is="currentModal"/>
<component :is="currentModal"/> </modal>
</modal>
</transition>
<BaseButton <BaseButton
class="keyboard-shortcuts-button d-print-none" class="keyboard-shortcuts-button d-print-none"

View File

@ -88,13 +88,12 @@
@end="saveListPosition" @end="saveListPosition"
handle=".handle" handle=".handle"
:disabled="n.id < 0 || undefined" :disabled="n.id < 0 || undefined"
tag="transition-group" tag="ul"
item-key="id" item-key="id"
:data-namespace-id="n.id" :data-namespace-id="n.id"
:data-namespace-index="nk" :data-namespace-index="nk"
:component-data="{ :component-data="{
type: 'transition', type: 'transition-group',
tag: 'ul',
name: !drag ? 'flip-list' : null, name: !drag ? 'flip-list' : null,
class: [ class: [
'menu-list can-be-hidden', 'menu-list can-be-hidden',
@ -556,8 +555,4 @@ $vikunja-nav-selected-width: 0.4rem;
.namespaces-list.loader-container.is-loading { .namespaces-list.loader-container.is-loading {
min-height: calc(100vh - #{$navbar-height + 1.5rem + 1rem + 1.5rem}); min-height: calc(100vh - #{$navbar-height + 1.5rem + 1rem + 1.5rem});
} }
a.dropdown-item:hover {
background: var(--dropdown-item-hover-background-color) !important;
}
</style> </style>

View File

@ -76,7 +76,7 @@
/> />
<x-button <x-button
class="datepicker__close-button is-fullwidth" class="datepicker__close-button"
:shadow="false" :shadow="false"
@click="close" @click="close"
v-cy="'closeDatepicker'" v-cy="'closeDatepicker'"

View File

@ -89,6 +89,15 @@ import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
function elementInResults(elem: string | any, label: string, query: string): boolean {
// Don't make create available if we have an exact match in our search results.
if (label !== '') {
return elem[label] === query
}
return elem === query
}
export default defineComponent({ export default defineComponent({
name: 'multiselect', name: 'multiselect',
components: { components: {
@ -222,14 +231,12 @@ export default defineComponent({
) )
}, },
creatableAvailable() { creatableAvailable() {
return this.creatable && this.query !== '' && !this.filteredSearchResults.some(elem => { const hasResult = this.filteredSearchResults.some(elem => elementInResults(elem, this.label, this.query))
// Don't make create available if we have an exact match in our search results. const hasQueryAlreadyAdded = Array.isArray(this.internalValue) && this.internalValue.some(elem => elementInResults(elem, this.label, this.query))
if (this.label !== '') {
return elem[this.label] === this.query
}
return elem === this.query return this.creatable
}) && this.query !== ''
&& !(hasResult || hasQueryAlreadyAdded)
}, },
filteredSearchResults() { filteredSearchResults() {
if (this.multiple && this.internalValue !== null && Array.isArray(this.internalValue)) { if (this.multiple && this.internalValue !== null && Array.isArray(this.internalValue)) {
@ -352,6 +359,12 @@ export default defineComponent({
} }
if (!this.creatableAvailable) { if (!this.creatableAvailable) {
// Check if there's an exact match for our search term
const exactMatch = this.filteredSearchResults.find(elem => elementInResults(elem, this.label, this.query))
if(exactMatch) {
this.select(exactMatch)
}
return return
} }

View File

@ -56,12 +56,13 @@
{{ $t('menu.archive') }} {{ $t('menu.archive') }}
</dropdown-item> </dropdown-item>
<task-subscription <task-subscription
class="dropdown-item has-no-shadow" class="has-no-shadow"
:is-button="false" :is-button="false"
entity="list" entity="list"
:entity-id="list.id" :entity-id="list.id"
:subscription="list.subscription" :subscription="list.subscription"
@change="sub => subscription = sub" @change="sub => subscription = sub"
type="dropdown"
/> />
<dropdown-item <dropdown-item
:to="{ name: 'list.settings.delete', params: { listId: list.id } }" :to="{ name: 'list.settings.delete', params: { listId: list.id } }"

View File

@ -25,7 +25,6 @@
v-model="value" v-model="value"
ref="filters" ref="filters"
class="filter-popup" class="filter-popup"
:class="{'is-open': isOpen}"
/> />
</modal> </modal>
</template> </template>

View File

@ -67,7 +67,9 @@
<div class="field"> <div class="field">
<label class="label">{{ $t('task.attributes.dueDate') }}</label> <label class="label">{{ $t('task.attributes.dueDate') }}</label>
<div class="control"> <div class="control">
<datepicker-with-range @dateChanged="values => setDateFilter('due_date', values)"> <datepicker-with-range
@dateChanged="values => setDateFilter('due_date', values)"
v-model="filters.dueDate">
<template #trigger="{toggle, buttonText}"> <template #trigger="{toggle, buttonText}">
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2"> <x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
{{ buttonText }} {{ buttonText }}
@ -79,7 +81,9 @@
<div class="field"> <div class="field">
<label class="label">{{ $t('task.attributes.startDate') }}</label> <label class="label">{{ $t('task.attributes.startDate') }}</label>
<div class="control"> <div class="control">
<datepicker-with-range @dateChanged="values => setDateFilter('start_date', values)"> <datepicker-with-range
@dateChanged="values => setDateFilter('start_date', values)"
v-model="filters.startDate">
<template #trigger="{toggle, buttonText}"> <template #trigger="{toggle, buttonText}">
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2"> <x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
{{ buttonText }} {{ buttonText }}
@ -91,7 +95,9 @@
<div class="field"> <div class="field">
<label class="label">{{ $t('task.attributes.endDate') }}</label> <label class="label">{{ $t('task.attributes.endDate') }}</label>
<div class="control"> <div class="control">
<datepicker-with-range @dateChanged="values => setDateFilter('end_date', values)"> <datepicker-with-range
@dateChanged="values => setDateFilter('end_date', values)"
v-model="filters.endDate">
<template #trigger="{toggle, buttonText}"> <template #trigger="{toggle, buttonText}">
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2"> <x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
{{ buttonText }} {{ buttonText }}
@ -103,7 +109,9 @@
<div class="field"> <div class="field">
<label class="label">{{ $t('task.attributes.reminders') }}</label> <label class="label">{{ $t('task.attributes.reminders') }}</label>
<div class="control"> <div class="control">
<datepicker-with-range @dateChanged="values => setDateFilter('reminders', values)"> <datepicker-with-range
@dateChanged="values => setDateFilter('reminders', values)"
v-model="filters.reminders">
<template #trigger="{toggle, buttonText}"> <template #trigger="{toggle, buttonText}">
<x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2"> <x-button @click.prevent.stop="toggle()" variant="secondary" :shadow="false" class="mb-2">
{{ buttonText }} {{ buttonText }}
@ -137,7 +145,8 @@
</div> </div>
</div> </div>
<template v-if="$route.name === 'filters.create' || $route.name === 'list.edit'"> <template
v-if="$route.name === 'filters.create' || $route.name === 'list.edit' || $route.name === 'filter.settings.edit'">
<div class="field"> <div class="field">
<label class="label">{{ $t('list.lists') }}</label> <label class="label">{{ $t('list.lists') }}</label>
<div class="control"> <div class="control">
@ -193,6 +202,7 @@ import EditLabels from '@/components/tasks/partials/editLabels.vue'
import {objectToSnakeCase} from '@/helpers/case' import {objectToSnakeCase} from '@/helpers/case'
import {getDefaultParams} from '@/composables/taskList' import {getDefaultParams} from '@/composables/taskList'
import {camelCase} from 'camel-case'
// FIXME: merge with DEFAULT_PARAMS in taskList.js // FIXME: merge with DEFAULT_PARAMS in taskList.js
const DEFAULT_PARAMS = { const DEFAULT_PARAMS = {
@ -368,6 +378,8 @@ export default defineComponent({
this.params.filter_comparator.push('less_equals') this.params.filter_comparator.push('less_equals')
this.params.filter_value.push(dateTo) this.params.filter_value.push(dateTo)
} }
this.filters[camelCase(filterName)] = {dateFrom, dateTo}
this.change() this.change()
return return
} }
@ -397,9 +409,16 @@ export default defineComponent({
} }
if (foundDateStart !== false && foundDateEnd !== false) { if (foundDateStart !== false && foundDateEnd !== false) {
const start = new Date(this.params.filter_value[foundDateStart]) const startDate = new Date(this.params.filter_value[foundDateStart])
const end = new Date(this.params.filter_value[foundDateEnd]) const endDate = new Date(this.params.filter_value[foundDateEnd])
this.filters[variableName] = `${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()} to ${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()}` this.filters[variableName] = {
dateFrom: !isNaN(startDate)
? `${startDate.getFullYear()}-${startDate.getMonth() + 1}-${startDate.getDate()}`
: this.params.filter_value[foundDateStart],
dateTo: !isNaN(endDate)
? `${endDate.getFullYear()}-${endDate.getMonth() + 1}-${endDate.getDate()}`
: this.params.filter_value[foundDateEnd],
}
} }
}, },
setSingleValueFilter(filterName, variableName, useVariableName = '', comparator = 'equals') { setSingleValueFilter(filterName, variableName, useVariableName = '', comparator = 'equals') {

View File

@ -1,25 +1,95 @@
<template> <template>
<router-link <component
:is="componentNodeName"
v-bind="elementBindings"
:to="to" :to="to"
class="dropdown-item"> class="dropdown-item">
<span class="icon" v-if="icon !== ''"> <span class="icon" v-if="icon">
<icon :icon="icon"/> <icon :icon="icon"/>
</span> </span>
<span> <span>
<slot></slot> <slot></slot>
</span> </span>
</router-link> </component>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
defineProps({ import {ref, useAttrs, watchEffect} from 'vue'
to: {
required: true, const props = defineProps<{
}, to?: object,
icon: { icon?: string | string[],
type: String, }>()
required: false,
default: '', const componentNodeName = ref<Node['nodeName']>('a')
}, const elementBindings = ref({})
const attrs = useAttrs()
watchEffect(() => {
let nodeName = 'a'
if (props.to) {
nodeName = 'router-link'
}
if ('href' in attrs) {
nodeName = 'BaseButton'
}
componentNodeName.value = nodeName
elementBindings.value = {
...attrs,
}
}) })
</script> </script>
<style scoped lang="scss">
.dropdown-item {
color: var(--text);
display: block;
font-size: 0.875rem;
line-height: 1.5;
padding: $item-padding;
position: relative;
}
a.dropdown-item,
button.dropdown-item {
text-align: inherit;
white-space: nowrap;
width: 100%;
display: flex;
align-items: center;
justify-content: left !important;
&:hover {
background-color: var(--grey-100) !important;
}
&.is-active {
background-color: var(--link);
color: var(--link-invert);
}
.icon {
padding-right: .5rem;
}
.icon:not(.has-text-success) {
color: var(--grey-300) !important;
}
&.has-text-danger .icon {
color: var(--danger) !important;
}
&.is-disabled {
cursor: not-allowed;
&:hover {
background-color: transparent;
}
}
}
</style>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="dropdown is-right is-active" ref="dropdown"> <div class="dropdown" ref="dropdown">
<slot name="trigger" :close="close" :toggleOpen="toggleOpen"> <slot name="trigger" :close="close" :toggleOpen="toggleOpen">
<BaseButton class="dropdown-trigger is-flex" @click="toggleOpen"> <BaseButton class="dropdown-trigger is-flex" @click="toggleOpen">
<icon :icon="triggerIcon" class="icon"/> <icon :icon="triggerIcon" class="icon"/>
@ -51,7 +51,36 @@ onClickOutside(dropdown, (e: Event) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dropdown-menu .dropdown-content { .dropdown {
display: inline-flex;
position: relative;
vertical-align: top;
}
.dropdown-menu {
min-width: 12rem;
padding-top: 4px;
position: absolute;
top: 100%;
z-index: 20;
display: block;
left: auto;
right: 0;
}
.dropdown-content {
background-color: var(--scheme-main);
border-radius: $radius;
padding-bottom: .5rem;
padding-top: .5rem;
box-shadow: var(--shadow-md); box-shadow: var(--shadow-md);
} }
</style>
.dropdown-divider {
background-color: var(--border-light);
border: none;
display: block;
height: 1px;
margin: 0.5rem 0;
}
</style>

View File

@ -1,15 +1,16 @@
<template> <template>
<Teleport to="body"> <Teleport to="body">
<!-- FIXME: transition should not be included in the modal --> <!-- FIXME: transition should not be included in the modal -->
<transition name="modal"> <transition :name="transitionName">
<section <section
v-if="enabled" v-if="enabled"
class="modal-mask" class="modal-mask"
:class="[ :class="[
{ 'has-overflow': overflow }, { 'has-overflow': overflow },
variant, variant,
]" ]"
ref="modal" ref="modal"
v-bind="attrs"
> >
<div <div
class="modal-container" class="modal-container"
@ -62,11 +63,18 @@
</Teleport> </Teleport>
</template> </template>
<script lang="ts">
export default {
inheritAttrs: false,
}
</script>
<script lang="ts" setup> <script lang="ts" setup>
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import {onUnmounted, ref, watch} from 'vue' import {onUnmounted, ref, useAttrs, watch} from 'vue'
import {useScrollLock} from '@vueuse/core' import {useScrollLock} from '@vueuse/core'
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
enabled?: boolean, enabled?: boolean,
overflow?: boolean, overflow?: boolean,
@ -81,6 +89,8 @@ const props = withDefaults(defineProps<{
defineEmits(['close', 'submit']) defineEmits(['close', 'submit'])
const attrs = useAttrs()
const modal = ref<HTMLElement | null>(null) const modal = ref<HTMLElement | null>(null)
const scrollLock = useScrollLock(modal) const scrollLock = useScrollLock(modal)

View File

@ -69,9 +69,9 @@ function createPagination(totalPages: number, currentPage: number) {
return pages return pages
} }
function getRouteForPagination(page = 1, type = 'list') { function getRouteForPagination(page = 1, type = null) {
return { return {
name: 'list.' + type, name: type,
params: { params: {
type: type, type: type,
}, },

View File

@ -1,6 +1,6 @@
<template> <template>
<x-button <x-button
v-if="isButton" v-if="type === 'button'"
variant="secondary" variant="secondary"
:icon="iconName" :icon="iconName"
v-tooltip="tooltipText" v-tooltip="tooltipText"
@ -9,6 +9,15 @@
> >
{{ buttonText }} {{ buttonText }}
</x-button> </x-button>
<DropdownItem
v-else-if="type === 'dropdown'"
v-tooltip="tooltipText"
@click="changeSubscription"
:class="{'is-disabled': disabled}"
:icon="iconName"
>
{{ buttonText }}
</DropdownItem>
<BaseButton <BaseButton
v-else v-else
v-tooltip="tooltipText" v-tooltip="tooltipText"
@ -27,6 +36,7 @@ import {computed, shallowRef, type PropType} from 'vue'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import DropdownItem from '@/components/misc/dropdown-item.vue'
import SubscriptionService from '@/services/subscription' import SubscriptionService from '@/services/subscription'
import SubscriptionModel from '@/models/subscription' import SubscriptionModel from '@/models/subscription'
@ -44,6 +54,10 @@ const props = defineProps({
type: Object as PropType<SubscriptionModel>, type: Object as PropType<SubscriptionModel>,
default: null, 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.subscription?.entity ?? null)

View File

@ -34,12 +34,13 @@
{{ $t('menu.archive') }} {{ $t('menu.archive') }}
</dropdown-item> </dropdown-item>
<task-subscription <task-subscription
class="dropdown-item has-no-shadow" class="has-no-shadow"
:is-button="false" :is-button="false"
entity="namespace" entity="namespace"
:entity-id="namespace.id" :entity-id="namespace.id"
:subscription="subscription" :subscription="subscription"
@change="sub => subscription = sub" @change="sub => subscription = sub"
type="dropdown"
/> />
<dropdown-item <dropdown-item
:to="{ name: 'namespace.settings.delete', params: { id: namespace.id } }" :to="{ name: 'namespace.settings.delete', params: { id: namespace.id } }"

View File

@ -526,7 +526,7 @@ export default defineComponent({
.result { .result {
&-title { &-title {
background: var(--grey-50); background: var(--grey-100);
padding: .5rem; padding: .5rem;
display: block; display: block;
font-size: .75rem; font-size: .75rem;
@ -549,7 +549,7 @@ export default defineComponent({
cursor: pointer; cursor: pointer;
&:focus, &:hover { &:focus, &:hover {
background: var(--grey-50); background: var(--grey-100);
box-shadow: none !important; box-shadow: none !important;
} }

View File

@ -200,7 +200,7 @@ function handleEnter(e: KeyboardEvent) {
} }
function focusTaskInput() { function focusTaskInput() {
newTaskInput.value.focus() newTaskInput.value?.focus()
} }
defineExpose({ defineExpose({

View File

@ -16,7 +16,7 @@
class="month" class="month"
v-for="(m, mk) in days[yk]" v-for="(m, mk) in days[yk]"
> >
{{ formatYear(new Date(`${yk}-${parseInt(mk) + 1}-01`)) }} {{ formatMonthAndYear(yk, parseInt(mk) + 1) }}
<div class="days"> <div class="days">
<div <div
:class="{ today: d.toDateString() === now.toDateString() }" :class="{ today: d.toDateString() === now.toDateString() }"
@ -437,7 +437,9 @@ export default defineComponent({
this.newTaskTitle = '' this.newTaskTitle = ''
this.hideCrateNewTask() this.hideCrateNewTask()
}, },
formatYear(date) { formatMonthAndYear(year, month) {
month = month < 10 ? '0' + month : month
const date = new Date(`${year}-${month}-01`)
return formatDate(date, 'MMMM, yyyy') return formatDate(date, 'MMMM, yyyy')
}, },
}, },

View File

@ -117,7 +117,7 @@ async function removeLabel(label: LabelModel) {
for (const l in labels.value) { for (const l in labels.value) {
if (labels.value[l].id === label.id) { if (labels.value[l].id === label.id) {
labels.value.splice(l, 1) labels.value.splice(l, 1) // FIXME: l should be index
} }
} }
emit('update:modelValue', labels.value) emit('update:modelValue', labels.value)

View File

@ -4,9 +4,9 @@
:class="{ :class="{
'is-loading': loadingInternal || loading, 'is-loading': loadingInternal || loading,
'draggable': !(loadingInternal || loading), 'draggable': !(loadingInternal || loading),
'has-light-text': task.getHexColor() !== TASK_DEFAULT_COLOR && !colorIsDark(task.getHexColor()), 'has-light-text': color !== TASK_DEFAULT_COLOR && !colorIsDark(color),
}" }"
:style="{'background-color': task.hexColor !== '#' && task.hexColor !== '' ? task.hexColor : false}" :style="{'background-color': color !== TASK_DEFAULT_COLOR ? color : false}"
@click.exact="openTaskDetail()" @click.exact="openTaskDetail()"
@click.ctrl="() => toggleTaskDone(task)" @click.ctrl="() => toggleTaskDone(task)"
@click.meta="() => toggleTaskDone(task)" @click.meta="() => toggleTaskDone(task)"
@ -105,6 +105,13 @@ export default defineComponent({
default: false, default: false,
}, },
}, },
computed: {
color() {
return this.task.getHexColor
? this.task.getHexColor()
: TASK_DEFAULT_COLOR
},
},
methods: { methods: {
formatDateLong, formatDateLong,
formatISO, formatISO,

View File

@ -1,5 +1,5 @@
<template> <template>
<multiselect <Multiselect
class="control is-expanded" class="control is-expanded"
:placeholder="$t('list.search')" :placeholder="$t('list.search')"
@search="findLists" @search="findLists"
@ -13,7 +13,7 @@
<span class="list-namespace-title search-result">{{ namespace(props.option.namespaceId) }} ></span> <span class="list-namespace-title search-result">{{ namespace(props.option.namespaceId) }} ></span>
{{ props.option.title }} {{ props.option.title }}
</template> </template>
</multiselect> </Multiselect>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -42,6 +42,10 @@
{{ $t('task.quickAddMagic.list1', {prefix: prefixes.list}) }} {{ $t('task.quickAddMagic.list1', {prefix: prefixes.list}) }}
{{ $t('task.quickAddMagic.list2') }} {{ $t('task.quickAddMagic.list2') }}
</p> </p>
<p>
{{ $t('task.quickAddMagic.list3') }}
{{ $t('task.quickAddMagic.list4', {prefix: prefixes.list}) }}
</p>
<h3>{{ $t('task.quickAddMagic.dateAndTime') }}</h3> <h3>{{ $t('task.quickAddMagic.dateAndTime') }}</h3>
<p> <p>

View File

@ -35,6 +35,7 @@
:creatable="true" :creatable="true"
:create-placeholder="$t('task.relation.createPlaceholder')" :create-placeholder="$t('task.relation.createPlaceholder')"
@create="createAndRelateTask" @create="createAndRelateTask"
@select="addTaskRelation"
> >
<template #searchResult="props"> <template #searchResult="props">
<span v-if="typeof props.option !== 'string'" class="search-result"> <span v-if="typeof props.option !== 'string'" class="search-result">

View File

@ -45,12 +45,11 @@ const props = defineProps({
return false return false
} }
const isDate = (e: any) => e instanceof Date const isDate = (e: unknown) => e instanceof Date
const isString = (e: any) => typeof e === 'string' const isString = (e: unknown) => typeof e === 'string'
for (const e of prop) { for (const e of prop) {
if (!isDate(e) && !isString(e)) { if (!isDate(e) && !isString(e)) {
console.log('validation failed', e, e instanceof Date)
return false return false
} }
} }
@ -118,7 +117,7 @@ function removeReminderByIndex(index: number) {
display: flex; display: flex;
align-items: center; align-items: center;
&.overdue :deep(.datepicker a.show) { &.overdue :deep(.datepicker .show) {
color: var(--danger); color: var(--danger);
} }
@ -126,7 +125,7 @@ function removeReminderByIndex(index: number) {
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
} }
a.remove { .remove {
color: var(--danger); color: var(--danger);
padding-left: .5rem; padding-left: .5rem;
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<div :class="{'is-loading': taskService.loading}" class="task loader-container"> <div :class="{'is-loading': taskService.loading}" class="task loader-container">
<fancycheckbox :disabled="isArchived || disabled" @change="markAsDone" v-model="task.done"/> <fancycheckbox :disabled="(isArchived || disabled) && !canMarkAsDone" @change="markAsDone" v-model="task.done"/>
<span <span
v-if="showListColor && listColor !== ''" v-if="showListColor && listColor !== ''"
:style="{backgroundColor: listColor }" :style="{backgroundColor: listColor }"
@ -148,6 +148,10 @@ export default defineComponent({
type: Boolean, type: Boolean,
default: true, default: true,
}, },
canMarkAsDone: {
type: Boolean,
default: true,
},
}, },
emits: ['task-updated'], emits: ['task-updated'],
watch: { watch: {

View File

@ -1,4 +1,4 @@
import { ref, shallowReactive, watch, computed } from 'vue' import {ref, shallowReactive, watch, computed} from 'vue'
import {useRoute} from 'vue-router' import {useRoute} from 'vue-router'
import TaskCollectionService from '@/services/taskCollection' import TaskCollectionService from '@/services/taskCollection'
@ -20,14 +20,13 @@ const SORT_BY_DEFAULT = {
/** /**
* This mixin provides a base set of methods and properties to get tasks on a list. * This mixin provides a base set of methods and properties to get tasks on a list.
*/ */
export function useTaskList(listId) { export function useTaskList(listId, sortByDefault = SORT_BY_DEFAULT) {
const params = ref({...getDefaultParams()}) const params = ref({...getDefaultParams()})
const search = ref('') const search = ref('')
const page = ref(1) const page = ref(1)
const sortBy = ref({ ...SORT_BY_DEFAULT }) const sortBy = ref({ ...sortByDefault })
// This makes sure an id sort order is always sorted last. // This makes sure an id sort order is always sorted last.
// When tasks would be sorted first by id and then by whatever else was specified, the id sort takes // When tasks would be sorted first by id and then by whatever else was specified, the id sort takes
@ -108,5 +107,6 @@ export function useTaskList(listId) {
loadTasks, loadTasks,
searchTerm: search, searchTerm: search,
params, params,
sortByParam: sortBy,
} }
} }

View File

@ -29,6 +29,6 @@ export async function uploadFiles(attachmentService: AttachmentService, taskId:
} }
} }
export function generateAttachmentUrl(taskId: number, attachmentId: number) : any { export function generateAttachmentUrl(taskId: number, attachmentId: number) {
return `${window.API_URL}/tasks/${taskId}/attachments/${attachmentId}` return `${window.API_URL}/tasks/${taskId}/attachments/${attachmentId}`
} }

View File

@ -222,8 +222,8 @@ export const getDateFromTextIn = (text: string, now: Date = new Date()) => {
} }
const getDateFromWeekday = (text: string): dateFoundResult => { const getDateFromWeekday = (text: string): dateFoundResult => {
const matcher: RegExp = / (next )?(monday|mon|tuesday|tue|wednesday|wed|thursday|thu|friday|fri|saturday|sat|sunday|sun)($| )/ig const matcher: RegExp = / (next )?(monday|mon|tuesday|tue|wednesday|wed|thursday|thu|friday|fri|saturday|sat|sunday|sun)($| )/g
const results: string[] | null = matcher.exec(text) const results: string[] | null = matcher.exec(text.toLowerCase()) // The i modifier does not seem to work.
if (results === null) { if (results === null) {
return { return {
foundText: null, foundText: null,

View File

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

View File

@ -790,13 +790,15 @@
"multiple": "You can use this multiple times.", "multiple": "You can use this multiple times.",
"label1": "To add a label, simply prefix the name of the label with {prefix}.", "label1": "To add a label, simply prefix the name of the label with {prefix}.",
"label2": "Vikunja will first check if the label already exist and create it if not.", "label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" around the label name.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".", "label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.", "priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.",
"priority2": "The higher the number, the higher the priority.", "priority2": "The higher the number, the higher the priority.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.", "list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "This will return an error if the list does not exist.", "list2": "This will return an error if the list does not exist.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date and time", "dateAndTime": "Date and time",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:", "date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date", "dateWeekday": "any weekday, will use the next date with that date",

View File

@ -790,13 +790,15 @@
"multiple": "Toto můžete použít několikrát.", "multiple": "Toto můžete použít několikrát.",
"label1": "Chcete-li přidat štítek, jednoduše napište před název štítku {prefix}.", "label1": "Chcete-li přidat štítek, jednoduše napište před název štítku {prefix}.",
"label2": "Vikunja nejprve zkontroluje, zda štítek již existuje a vytvoří jej, pokud ne.", "label2": "Vikunja nejprve zkontroluje, zda štítek již existuje a vytvoří jej, pokud ne.",
"label3": "Chcete-li použít mezery, jednoduše přidejte \" kolem názvu popisku.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "Například: {prefix}\"Štítek s mezerami\".", "label4": "Například: {prefix}\"Štítek s mezerami\".",
"priority1": "Chcete-li nastavit prioritu úkolu, přidejte číslo 1-5, s prefixem {prefix}.", "priority1": "Chcete-li nastavit prioritu úkolu, přidejte číslo 1-5, s prefixem {prefix}.",
"priority2": "Čím vyšší číslo, tím vyšší priorita.", "priority2": "Čím vyšší číslo, tím vyšší priorita.",
"assignees": "Chcete-li přímo přiřadit úkol k uživateli, přidejte k úkolu jejich uživatelské jméno s prefixem {prefix}.", "assignees": "Chcete-li přímo přiřadit úkol k uživateli, přidejte k úkolu jejich uživatelské jméno s prefixem {prefix}.",
"list1": "Chcete-li nastavit seznam, ve kterém se má úkol zobrazit, zadejte jeho název s předponou {prefix}.", "list1": "Chcete-li nastavit seznam, ve kterém se má úkol zobrazit, zadejte jeho název s předponou {prefix}.",
"list2": "Toto vrátí chybu, pokud seznam neexistuje.", "list2": "Toto vrátí chybu, pokud seznam neexistuje.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Datum a čas", "dateAndTime": "Datum a čas",
"date": "Jakékoliv datum bude použito jako datum dokončení nového úkolu. Můžete použít data v kterémkoli z těchto formátů:", "date": "Jakékoliv datum bude použito jako datum dokončení nového úkolu. Můžete použít data v kterémkoli z těchto formátů:",
"dateWeekday": "každý pracovní den použije další datum s tímto datem", "dateWeekday": "každý pracovní den použije další datum s tímto datem",

View File

@ -790,13 +790,15 @@
"multiple": "Du kannst das mehrmals benutzen.", "multiple": "Du kannst das mehrmals benutzen.",
"label1": "Um ein Label hinzuzufügen, gibt einfach den Name mit einem vorangestellten {prefix} ein.", "label1": "Um ein Label hinzuzufügen, gibt einfach den Name mit einem vorangestellten {prefix} ein.",
"label2": "Vikunja prüft zuerst, ob das Label bereits vorhanden ist und erstellt es, falls nicht.", "label2": "Vikunja prüft zuerst, ob das Label bereits vorhanden ist und erstellt es, falls nicht.",
"label3": "Um Leerzeichen zu verwenden, füge einfach ein \" um den Namen des Labels hinzu.", "label3": "Um Leerzeichen zu verwenden, füge einfach ein \" oder ' um den Namen des Labels hinzu.",
"label4": "Zum Beispiel: {prefix}\"Label mit Leerzeichen\".", "label4": "Zum Beispiel: {prefix}\"Label mit Leerzeichen\".",
"priority1": "Um die Priorität einer Aufgabe zu setzen, gibt eine Zahl zwischen 1 und 5 mit einem vorangestellten {prefix} ein.", "priority1": "Um die Priorität einer Aufgabe zu setzen, gibt eine Zahl zwischen 1 und 5 mit einem vorangestellten {prefix} ein.",
"priority2": "Je höher die Zahl, desto höher die Priorität.", "priority2": "Je höher die Zahl, desto höher die Priorität.",
"assignees": "Um die Aufgabe direkt jemandem zuzuweisen, füge vor dem Anmeldenamen der Person ein {prefix} Zeichen ein.", "assignees": "Um die Aufgabe direkt jemandem zuzuweisen, füge vor dem Anmeldenamen der Person ein {prefix} Zeichen ein.",
"list1": "Um eine Liste zu erstellen, in der die Aufgabe erscheinen soll, gib ihren Namen vorangestellt mit einem {prefix} ein.", "list1": "Um eine Liste zu erstellen, in der die Aufgabe erscheinen soll, gib ihren Namen vorangestellt mit einem {prefix} ein.",
"list2": "Dies gibt einen Fehler zurück, wenn die Liste nicht existiert.", "list2": "Dies gibt einen Fehler zurück, wenn die Liste nicht existiert.",
"list3": "Um Leerzeichen zu verwenden, füge einfach ein \" oder ' um den Namen der Liste hinzu.",
"list4": "Zum Beispiel: {prefix}\"Liste mit Leerzeichen\".",
"dateAndTime": "Datum und Uhrzeit", "dateAndTime": "Datum und Uhrzeit",
"date": "Jedes Datum wird als Enddatum der neuen Aufgabe verwendet. Du kannst Daten in jedem dieser Formate verwenden:", "date": "Jedes Datum wird als Enddatum der neuen Aufgabe verwendet. Du kannst Daten in jedem dieser Formate verwenden:",
"dateWeekday": "jeder Wochentag, wird das nächste Datum mit diesem Tag verwenden", "dateWeekday": "jeder Wochentag, wird das nächste Datum mit diesem Tag verwenden",

View File

@ -790,13 +790,15 @@
"multiple": "Du chasch da mehrmals mache.", "multiple": "Du chasch da mehrmals mache.",
"label1": "Um es Label hinzuezfüege, schriib eifach es {prefix} vorne ane.", "label1": "Um es Label hinzuezfüege, schriib eifach es {prefix} vorne ane.",
"label2": "Vikunja prüeft z'ersch, obs da Label bereits git und machst neu, falls nööd.", "label2": "Vikunja prüeft z'ersch, obs da Label bereits git und machst neu, falls nööd.",
"label3": "Um Leerschläg zverwende, setz eifach zwei \" um de Labelname.", "label3": "Um Leerzeichen zu verwenden, füge einfach ein \" oder ' um den Namen des Labels hinzu.",
"label4": "Zum Blaistift: {prefix}\"Label mit Leerschlag\".", "label4": "Zum Blaistift: {prefix}\"Label mit Leerschlag\".",
"priority1": "Um e Task Priorität z'setze: füeg e nummere zwüsched 1 und 5, mit em {prefix} als Prefix iih.", "priority1": "Um e Task Priorität z'setze: füeg e nummere zwüsched 1 und 5, mit em {prefix} als Prefix iih.",
"priority2": "Je höher d'nummere, desto höher d'Priorität.", "priority2": "Je höher d'nummere, desto höher d'Priorität.",
"assignees": "Um die Aufgabe direkt jemandem zuzuweisen, füge vor dem Anmeldenamen der Person ein {prefix} Zeichen ein.", "assignees": "Um die Aufgabe direkt jemandem zuzuweisen, füge vor dem Anmeldenamen der Person ein {prefix} Zeichen ein.",
"list1": "Um e Liste ahzgeh, wo de Task drin erschiine set, gib de name vo de liste mit emne {prefix} ah.", "list1": "Um e Liste ahzgeh, wo de Task drin erschiine set, gib de name vo de liste mit emne {prefix} ah.",
"list2": "Das wird en Fehler werfe, wenn d'Liste nid existiert.", "list2": "Das wird en Fehler werfe, wenn d'Liste nid existiert.",
"list3": "Um Leerzeichen zu verwenden, füge einfach ein \" oder ' um den Namen der Liste hinzu.",
"list4": "Zum Beispiel: {prefix}\"Liste mit Leerzeichen\".",
"dateAndTime": "Datum und Ziit", "dateAndTime": "Datum und Ziit",
"date": "Jedes Datum wird als Abgabedatum für di neu Uufgab gnoh. Du chasch Date i de folgende Format verwende:", "date": "Jedes Datum wird als Abgabedatum für di neu Uufgab gnoh. Du chasch Date i de folgende Format verwende:",
"dateWeekday": "jede Wuchetaag wird nimmt s'negste Datum mit dem Datum", "dateWeekday": "jede Wuchetaag wird nimmt s'negste Datum mit dem Datum",

View File

@ -793,13 +793,15 @@
"multiple": "You can use this multiple times.", "multiple": "You can use this multiple times.",
"label1": "To add a label, simply prefix the name of the label with {prefix}.", "label1": "To add a label, simply prefix the name of the label with {prefix}.",
"label2": "Vikunja will first check if the label already exist and create it if not.", "label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" around the label name.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".", "label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.", "priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.",
"priority2": "The higher the number, the higher the priority.", "priority2": "The higher the number, the higher the priority.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.", "list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "This will return an error if the list does not exist.", "list2": "This will return an error if the list does not exist.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date and time", "dateAndTime": "Date and time",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:", "date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date", "dateWeekday": "any weekday, will use the next date with that date",

View File

@ -790,13 +790,15 @@
"multiple": "You can use this multiple times.", "multiple": "You can use this multiple times.",
"label1": "To add a label, simply prefix the name of the label with {prefix}.", "label1": "To add a label, simply prefix the name of the label with {prefix}.",
"label2": "Vikunja will first check if the label already exist and create it if not.", "label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" around the label name.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".", "label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.", "priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.",
"priority2": "The higher the number, the higher the priority.", "priority2": "The higher the number, the higher the priority.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.", "list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "This will return an error if the list does not exist.", "list2": "This will return an error if the list does not exist.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date and time", "dateAndTime": "Date and time",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:", "date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date", "dateWeekday": "any weekday, will use the next date with that date",

View File

@ -790,13 +790,15 @@
"multiple": "Tu peux utiliser ceci plusieurs fois.", "multiple": "Tu peux utiliser ceci plusieurs fois.",
"label1": "Pour ajouter une étiquette, il suffit de préfixer le nom de létiquette avec {prefix}.", "label1": "Pour ajouter une étiquette, il suffit de préfixer le nom de létiquette avec {prefix}.",
"label2": "Vikunja va dabord vérifier si létiquette existe déjà et la créer si ce nest pas le cas.", "label2": "Vikunja va dabord vérifier si létiquette existe déjà et la créer si ce nest pas le cas.",
"label3": "Pour utiliser des espaces, il suffit dajouter \" autour du nom de létiquette.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "Par exemple : {prefix}\"Étiquette avec espaces\".", "label4": "Par exemple : {prefix}\"Étiquette avec espaces\".",
"priority1": "Pour définir la priorité dune tâche, ajoutez un chiffre de 1 à 5, précédé dun {prefix}.", "priority1": "Pour définir la priorité dune tâche, ajoutez un chiffre de 1 à 5, précédé dun {prefix}.",
"priority2": "Plus le numéro est élevé, plus la priorité est élevée.", "priority2": "Plus le numéro est élevé, plus la priorité est élevée.",
"assignees": "Pour assigner directement la tâche à un utilisateur, ajoutez son nom d'utilisateur préfixé avec {prefix} à la tâche.", "assignees": "Pour assigner directement la tâche à un utilisateur, ajoutez son nom d'utilisateur préfixé avec {prefix} à la tâche.",
"list1": "Pour définir une liste dans laquelle la tâche doit apparaître, entrez son nom précédé de {prefix}.", "list1": "Pour définir une liste dans laquelle la tâche doit apparaître, entrez son nom précédé de {prefix}.",
"list2": "Ceci renverra une erreur si la liste nexiste pas.", "list2": "Ceci renverra une erreur si la liste nexiste pas.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date et heure", "dateAndTime": "Date et heure",
"date": "Toute date sera utilisée comme date déchéance de la nouvelle tâche. Vous pouvez utiliser des dates dans un des formats suivants :", "date": "Toute date sera utilisée comme date déchéance de la nouvelle tâche. Vous pouvez utiliser des dates dans un des formats suivants :",
"dateWeekday": "nimporte quel jour de la semaine, utilisera la date suivante avec cette date", "dateWeekday": "nimporte quel jour de la semaine, utilisera la date suivante avec cette date",

View File

@ -790,13 +790,15 @@
"multiple": "Puoi usarlo più volte.", "multiple": "Puoi usarlo più volte.",
"label1": "Per aggiungere un'etichetta, basta aggiungere il nome dell'etichetta preceduto da {prefix}.", "label1": "Per aggiungere un'etichetta, basta aggiungere il nome dell'etichetta preceduto da {prefix}.",
"label2": "Vikunja controllerà prima se l'etichetta esiste già e nel caso la creerà.", "label2": "Vikunja controllerà prima se l'etichetta esiste già e nel caso la creerà.",
"label3": "Per usare gli spazi, basta \" prima e dopo del nome dell'etichetta.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "Per esempio: {prefix}\"Etichetta con spazi\".", "label4": "Per esempio: {prefix}\"Etichetta con spazi\".",
"priority1": "Per impostare la priorità di un'attività, aggiungi un numero 1-5, preceduto da {prefix}.", "priority1": "Per impostare la priorità di un'attività, aggiungi un numero 1-5, preceduto da {prefix}.",
"priority2": "Più alto è il numero, più alta è la priorità.", "priority2": "Più alto è il numero, più alta è la priorità.",
"assignees": "Per assegnare direttamente l'attività a un utente, aggiungere il suo nome utente preceduto da {prefix} all'attività.", "assignees": "Per assegnare direttamente l'attività a un utente, aggiungere il suo nome utente preceduto da {prefix} all'attività.",
"list1": "Per impostare una lista di appartenenza all'attività, inserisci il suo nome prefisso con {prefix}.", "list1": "Per impostare una lista di appartenenza all'attività, inserisci il suo nome prefisso con {prefix}.",
"list2": "Ciò restituirà un errore se la lista non esiste.", "list2": "Ciò restituirà un errore se la lista non esiste.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Data e ora", "dateAndTime": "Data e ora",
"date": "Qualsiasi data verrà utilizzata come data di scadenza della nuova attività. È possibile utilizzare le date in uno qualsiasi di questi formati:", "date": "Qualsiasi data verrà utilizzata come data di scadenza della nuova attività. È possibile utilizzare le date in uno qualsiasi di questi formati:",
"dateWeekday": "qualsiasi giorno della settimana, userà la data più vicina", "dateWeekday": "qualsiasi giorno della settimana, userà la data più vicina",

View File

@ -790,13 +790,15 @@
"multiple": "Je kan dit meerdere keren gebruiken.", "multiple": "Je kan dit meerdere keren gebruiken.",
"label1": "To add a label, simply prefix the name of the label with {prefix}.", "label1": "To add a label, simply prefix the name of the label with {prefix}.",
"label2": "Vikunja will first check if the label already exist and create it if not.", "label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" around the label name.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".", "label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "Om prioriteit aan een taak te geven voeg je een nummer tussen 1-5 toe, beginnend met een {prefix}.", "priority1": "Om prioriteit aan een taak te geven voeg je een nummer tussen 1-5 toe, beginnend met een {prefix}.",
"priority2": "Hoe hoger het getal, hoe hoger de prioriteit.", "priority2": "Hoe hoger het getal, hoe hoger de prioriteit.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.", "list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "Dit geeft een foutmelding als de lijst niet bestaat.", "list2": "Dit geeft een foutmelding als de lijst niet bestaat.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Datum en tijd", "dateAndTime": "Datum en tijd",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:", "date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date", "dateWeekday": "any weekday, will use the next date with that date",

View File

@ -790,13 +790,15 @@
"multiple": "Możesz użyć tego wielokrotnie.", "multiple": "Możesz użyć tego wielokrotnie.",
"label1": "Aby dodać etykietę, po prostu poprzedź nazwę etykiety przedrostkiem {prefix}.", "label1": "Aby dodać etykietę, po prostu poprzedź nazwę etykiety przedrostkiem {prefix}.",
"label2": "Vikunja najpierw sprawdzi, czy etykieta już istnieje, a jeśli nie, utworzy ją.", "label2": "Vikunja najpierw sprawdzi, czy etykieta już istnieje, a jeśli nie, utworzy ją.",
"label3": "Aby użyć spacji, po prostu podaj nazwę etykiety pomiędzy \".", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "Na przykład: {prefix}\"Etykieta ze spacjami\".", "label4": "Na przykład: {prefix}\"Etykieta ze spacjami\".",
"priority1": "Aby ustawić priorytet zadania, dodaj liczbę 1-5 poprzedzoną {prefix}.", "priority1": "Aby ustawić priorytet zadania, dodaj liczbę 1-5 poprzedzoną {prefix}.",
"priority2": "Im większa liczba, tym wyższy priorytet.", "priority2": "Im większa liczba, tym wyższy priorytet.",
"assignees": "Aby bezpośrednio przypisać zadanie użytkownikowi, dodaj nazwę użytkownika poprzedzoną przedrostkiem {prefix} do zadania.", "assignees": "Aby bezpośrednio przypisać zadanie użytkownikowi, dodaj nazwę użytkownika poprzedzoną przedrostkiem {prefix} do zadania.",
"list1": "Aby ustawić listę, do której ma zostać przypisane zadanie, wprowadź jego nazwę z prefiksem {prefix}.", "list1": "Aby ustawić listę, do której ma zostać przypisane zadanie, wprowadź jego nazwę z prefiksem {prefix}.",
"list2": "Jeśli lista nie istnieje zostanie zwrócony błąd.", "list2": "Jeśli lista nie istnieje zostanie zwrócony błąd.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Data i godzina", "dateAndTime": "Data i godzina",
"date": "Dowolna data może być użyta jako termin wykonania nowego zadania. Możesz wykorzystać datę w dowolnym z podanych formatów:", "date": "Dowolna data może być użyta jako termin wykonania nowego zadania. Możesz wykorzystać datę w dowolnym z podanych formatów:",
"dateWeekday": "dowolny dzień tygodnia spowoduje wybranie najbliższej daty przypadającej na podany dzień tygodnia", "dateWeekday": "dowolny dzień tygodnia spowoduje wybranie najbliższej daty przypadającej na podany dzień tygodnia",

View File

@ -790,13 +790,15 @@
"multiple": "You can use this multiple times.", "multiple": "You can use this multiple times.",
"label1": "To add a label, simply prefix the name of the label with {prefix}.", "label1": "To add a label, simply prefix the name of the label with {prefix}.",
"label2": "Vikunja will first check if the label already exist and create it if not.", "label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" around the label name.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".", "label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.", "priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.",
"priority2": "The higher the number, the higher the priority.", "priority2": "The higher the number, the higher the priority.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.", "list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "This will return an error if the list does not exist.", "list2": "This will return an error if the list does not exist.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date and time", "dateAndTime": "Date and time",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:", "date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date", "dateWeekday": "any weekday, will use the next date with that date",

View File

@ -790,13 +790,15 @@
"multiple": "Podes usar isto várias vezes.", "multiple": "Podes usar isto várias vezes.",
"label1": "Para adicionar uma etiqueta, basta prefixares o nome da etiqueta com {prefix}.", "label1": "Para adicionar uma etiqueta, basta prefixares o nome da etiqueta com {prefix}.",
"label2": "Vikunja irá primeiro verificar se a etiqueta já existe e criá-la se não.", "label2": "Vikunja irá primeiro verificar se a etiqueta já existe e criá-la se não.",
"label3": "Para utilizares espaços, basta adicionares um \" no início e fim do nome da etiqueta.", "label3": "Para utilizares espaços, basta adicionares um \" ou ' no início e fim do nome da etiqueta.",
"label4": "Por exemplo: {prefix}\"Etiqueta com espaços\".", "label4": "Por exemplo: {prefix}\"Etiqueta com espaços\".",
"priority1": "Para definir a prioridade de uma tarefa, adiciona um número entre 1 a 5, prefixado com um {prefix}.", "priority1": "Para definir a prioridade de uma tarefa, adiciona um número entre 1 a 5, prefixado com um {prefix}.",
"priority2": "Quanto maior o número, maior a prioridade.", "priority2": "Quanto maior o número, maior a prioridade.",
"assignees": "Para atribuires uma tarefa diretamente a um utilizador, adiciona à tarefa os seus nomes de utilizador prefixados com {prefix}.", "assignees": "Para atribuires uma tarefa diretamente a um utilizador, adiciona à tarefa os seus nomes de utilizador prefixados com {prefix}.",
"list1": "Para definir uma lista onde a tarefa deve aparecer, adiciona o seu nome prefixado com {prefix}.", "list1": "Para definir uma lista onde a tarefa deve aparecer, adiciona o seu nome prefixado com {prefix}.",
"list2": "Isto vai retornar um erro se a lista não existir.", "list2": "Isto vai retornar um erro se a lista não existir.",
"list3": "Para utilizares espaços, basta adicionares um \" ou ' no início e fim do nome da lista.",
"list4": "Por exemplo: {prefix}\"Etiqueta com espaços\".",
"dateAndTime": "Data e hora", "dateAndTime": "Data e hora",
"date": "Qualquer data será utilizada como data de vencimento da nova tarefa. Podes utilizar datas em qualquer dos seguintes formatos:", "date": "Qualquer data será utilizada como data de vencimento da nova tarefa. Podes utilizar datas em qualquer dos seguintes formatos:",
"dateWeekday": "qualquer dia de semana, usará a próxima data com essa data", "dateWeekday": "qualquer dia de semana, usará a próxima data com essa data",

View File

@ -790,13 +790,15 @@
"multiple": "You can use this multiple times.", "multiple": "You can use this multiple times.",
"label1": "To add a label, simply prefix the name of the label with {prefix}.", "label1": "To add a label, simply prefix the name of the label with {prefix}.",
"label2": "Vikunja will first check if the label already exist and create it if not.", "label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" around the label name.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".", "label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.", "priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.",
"priority2": "The higher the number, the higher the priority.", "priority2": "The higher the number, the higher the priority.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.", "list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "This will return an error if the list does not exist.", "list2": "This will return an error if the list does not exist.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date and time", "dateAndTime": "Date and time",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:", "date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date", "dateWeekday": "any weekday, will use the next date with that date",

View File

@ -790,13 +790,15 @@
"multiple": "Ты можешь использовать это несколько раз.", "multiple": "Ты можешь использовать это несколько раз.",
"label1": "Чтобы добавить метку, просто добавь к названию метки префикс {prefix}.", "label1": "Чтобы добавить метку, просто добавь к названию метки префикс {prefix}.",
"label2": "Vikunja проверит, существует ли такая метка, и создаст её, если ещё нет.", "label2": "Vikunja проверит, существует ли такая метка, и создаст её, если ещё нет.",
"label3": "Чтобы использовать пробелы, оберни метку в \"кавычки\".", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "Например: {prefix}\"Метка с пробелами\".", "label4": "Например: {prefix}\"Метка с пробелами\".",
"priority1": "Чтобы установить задаче приоритет, добавь число 1-5 с префиксом {prefix}.", "priority1": "Чтобы установить задаче приоритет, добавь число 1-5 с префиксом {prefix}.",
"priority2": "Чем больше число, тем выше приоритет.", "priority2": "Чем больше число, тем выше приоритет.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "Чтобы выбрать список, в который будет помещена создаваемая задача, введи его имя с префиксом {prefix}.", "list1": "Чтобы выбрать список, в который будет помещена создаваемая задача, введи его имя с префиксом {prefix}.",
"list2": "Если списка не существует, будет возвращена ошибка.", "list2": "Если списка не существует, будет возвращена ошибка.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Дата и время", "dateAndTime": "Дата и время",
"date": "Любая дата будет использоваться как срок выполнения новой задачи. Ты можешь использовать даты в любом из этих форматов:", "date": "Любая дата будет использоваться как срок выполнения новой задачи. Ты можешь использовать даты в любом из этих форматов:",
"dateWeekday": "любой день недели, будет использовать следующую дату", "dateWeekday": "любой день недели, будет использовать следующую дату",

View File

@ -790,13 +790,15 @@
"multiple": "You can use this multiple times.", "multiple": "You can use this multiple times.",
"label1": "To add a label, simply prefix the name of the label with {prefix}.", "label1": "To add a label, simply prefix the name of the label with {prefix}.",
"label2": "Vikunja will first check if the label already exist and create it if not.", "label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" around the label name.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".", "label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.", "priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.",
"priority2": "The higher the number, the higher the priority.", "priority2": "The higher the number, the higher the priority.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.", "list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "This will return an error if the list does not exist.", "list2": "This will return an error if the list does not exist.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date and time", "dateAndTime": "Date and time",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:", "date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date", "dateWeekday": "any weekday, will use the next date with that date",

View File

@ -790,13 +790,15 @@
"multiple": "You can use this multiple times.", "multiple": "You can use this multiple times.",
"label1": "To add a label, simply prefix the name of the label with {prefix}.", "label1": "To add a label, simply prefix the name of the label with {prefix}.",
"label2": "Vikunja will first check if the label already exist and create it if not.", "label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" around the label name.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".", "label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.", "priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.",
"priority2": "The higher the number, the higher the priority.", "priority2": "The higher the number, the higher the priority.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.", "list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "This will return an error if the list does not exist.", "list2": "This will return an error if the list does not exist.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date and time", "dateAndTime": "Date and time",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:", "date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date", "dateWeekday": "any weekday, will use the next date with that date",

View File

@ -790,13 +790,15 @@
"multiple": "You can use this multiple times.", "multiple": "You can use this multiple times.",
"label1": "To add a label, simply prefix the name of the label with {prefix}.", "label1": "To add a label, simply prefix the name of the label with {prefix}.",
"label2": "Vikunja will first check if the label already exist and create it if not.", "label2": "Vikunja will first check if the label already exist and create it if not.",
"label3": "To use spaces, simply add a \" around the label name.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "For example: {prefix}\"Label with spaces\".", "label4": "For example: {prefix}\"Label with spaces\".",
"priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.", "priority1": "To set a task's priority, add a number 1-5, prefixed with a {prefix}.",
"priority2": "The higher the number, the higher the priority.", "priority2": "The higher the number, the higher the priority.",
"assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.", "assignees": "To directly assign the task to a user, add their username prefixed with {prefix} to the task.",
"list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.", "list1": "To set a list for the task to appear in, enter its name prefixed with {prefix}.",
"list2": "This will return an error if the list does not exist.", "list2": "This will return an error if the list does not exist.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Date and time", "dateAndTime": "Date and time",
"date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:", "date": "Any date will be used as the due date of the new task. You can use dates in any of these formats:",
"dateWeekday": "any weekday, will use the next date with that date", "dateWeekday": "any weekday, will use the next date with that date",

View File

@ -790,13 +790,15 @@
"multiple": "Bạn có thể sử dụng tác vụ này nhiều lần.", "multiple": "Bạn có thể sử dụng tác vụ này nhiều lần.",
"label1": "Để thêm một nhãn, chỉ cần đặt tiền tố tên nhãn bằng {prefix}.", "label1": "Để thêm một nhãn, chỉ cần đặt tiền tố tên nhãn bằng {prefix}.",
"label2": "Đầu tiên Vikunja sẽ kiểm tra xem nhãn đã tồn tại chưa và tạo nó nếu chưa.", "label2": "Đầu tiên Vikunja sẽ kiểm tra xem nhãn đã tồn tại chưa và tạo nó nếu chưa.",
"label3": "Để sử dụng dấu cách, chỉ cần thêm dấu \" xung quanh tên nhãn.", "label3": "To use spaces, simply add a \" or ' around the label name.",
"label4": "Ví dụ: {prefix} \"Nhãn có dấu cách\".", "label4": "Ví dụ: {prefix} \"Nhãn có dấu cách\".",
"priority1": "Để đặt mức độ ưu tiên của công việc, hãy thêm số từ 1-5, có tiền tố là {prefix}.", "priority1": "Để đặt mức độ ưu tiên của công việc, hãy thêm số từ 1-5, có tiền tố là {prefix}.",
"priority2": "Số càng lớn, độ ưu tiên càng cao.", "priority2": "Số càng lớn, độ ưu tiên càng cao.",
"assignees": "Để chỉ định trực tiếp công việc cho một người, hãy thêm tên người dùng của họ có tiền tố là {prefix} vào nhiệm vụ.", "assignees": "Để chỉ định trực tiếp công việc cho một người, hãy thêm tên người dùng của họ có tiền tố là {prefix} vào nhiệm vụ.",
"list1": "Để chọn danh sách trong đó nhiệm vụ sẽ xuất hiện, hãy nhập tên của nhiệm vụ trước {prefix}.", "list1": "Để chọn danh sách trong đó nhiệm vụ sẽ xuất hiện, hãy nhập tên của nhiệm vụ trước {prefix}.",
"list2": "Điều này sẽ trả về một lỗi nếu danh sách không tồn tại.", "list2": "Điều này sẽ trả về một lỗi nếu danh sách không tồn tại.",
"list3": "To use spaces, simply add a \" or ' around the list name.",
"list4": "For example: {prefix}\"List with spaces\".",
"dateAndTime": "Ngày và giờ", "dateAndTime": "Ngày và giờ",
"date": "Bất kỳ ngày nào sẽ được sử dụng làm ngày hết hạn của nhiệm vụ mới. Bạn có thể sử dụng ngày ở bất kỳ định dạng nào sau đây:", "date": "Bất kỳ ngày nào sẽ được sử dụng làm ngày hết hạn của nhiệm vụ mới. Bạn có thể sử dụng ngày ở bất kỳ định dạng nào sau đây:",
"dateWeekday": "bất kỳ ngày nào trong tuần, sẽ sử dụng ngày tiếp theo với ngày đó", "dateWeekday": "bất kỳ ngày nào trong tuần, sẽ sử dụng ngày tiếp theo với ngày đó",

View File

@ -5,4 +5,6 @@ export const PRIORITIES = {
'HIGH': 3, 'HIGH': 3,
'URGENT': 4, 'URGENT': 4,
'DO_NOW': 5, 'DO_NOW': 5,
} as const } as const
export type Priority = typeof PRIORITIES[keyof typeof PRIORITIES]

View File

@ -6,6 +6,7 @@ import AttachmentModel from './attachment'
import SubscriptionModel from '@/models/subscription' import SubscriptionModel from '@/models/subscription'
import {parseDateOrNull} from '@/helpers/parseDateOrNull' import {parseDateOrNull} from '@/helpers/parseDateOrNull'
import type ListModel from './list' import type ListModel from './list'
import type { Priority } from './constants/priorities'
const SUPPORTS_TRIGGERED_NOTIFICATION = 'Notification' in window && 'showTrigger' in Notification.prototype const SUPPORTS_TRIGGERED_NOTIFICATION = 'Notification' in window && 'showTrigger' in Notification.prototype
export const TASK_DEFAULT_COLOR = '#1973ff' export const TASK_DEFAULT_COLOR = '#1973ff'
@ -29,7 +30,7 @@ export default class TaskModel extends AbstractModel {
description: string description: string
done: boolean done: boolean
doneAt: Date | null doneAt: Date | null
priority: 0 priority: Priority
labels: LabelModel[] labels: LabelModel[]
assignees: UserModel[] assignees: UserModel[]

View File

@ -2,18 +2,20 @@ import AbstractModel from './abstractModel'
import UserModel from './user' import UserModel from './user'
import type TaskModel from './task' import type TaskModel from './task'
export const RELATION_KINDS = [ export const RELATION_KIND = {
'subtask', 'SUBTASK': 'subtask',
'parenttask', 'PARENTTASK': 'parenttask',
'related', 'RELATED': 'related',
'duplicates', 'DUPLICATES': 'duplicates',
'blocking', 'BLOCKING': 'blocking',
'blocked', 'BLOCKED': 'blocked',
'precedes', 'PROCEDES': 'precedes',
'follows', 'FOLLOWS': 'follows',
'copiedfrom', 'COPIEDFROM': 'copiedfrom',
'copiedto', 'COPIEDTO': 'copiedto',
] as const } as const
export const RELATION_KINDS = [...Object.values(RELATION_KIND)] as const
export type RelationKind = typeof RELATION_KINDS[number] export type RelationKind = typeof RELATION_KINDS[number]

View File

@ -122,6 +122,18 @@ describe('Parse Task Text', () => {
expect(result.date.getMonth()).toBe(nextMonday.getMonth()) expect(result.date.getMonth()).toBe(nextMonday.getMonth())
expect(result.date.getDate()).toBe(nextMonday.getDate()) expect(result.date.getDate()).toBe(nextMonday.getDate())
}) })
it('should recognize next monday and ignore casing', () => {
const result = parseTaskText('Lorem Ipsum nExt Monday')
const untilNextMonday = calculateDayInterval('nextMonday')
expect(result.text).toBe('Lorem Ipsum')
const nextMonday = new Date()
nextMonday.setDate(nextMonday.getDate() + untilNextMonday)
expect(result.date.getFullYear()).toBe(nextMonday.getFullYear())
expect(result.date.getMonth()).toBe(nextMonday.getMonth())
expect(result.date.getDate()).toBe(nextMonday.getDate())
})
it('should recognize this weekend', () => { it('should recognize this weekend', () => {
const result = parseTaskText('Lorem Ipsum this weekend') const result = parseTaskText('Lorem Ipsum this weekend')
@ -201,14 +213,47 @@ describe('Parse Task Text', () => {
expect(result.date.getMonth()).toBe(date.getMonth()) expect(result.date.getMonth()).toBe(date.getMonth())
expect(result.date.getDate()).toBe(date.getDate()) expect(result.date.getDate()).toBe(date.getDate())
}) })
it('should recognize weekdays', () => {
const result = parseTaskText('Lorem Ipsum thu')
expect(result.text).toBe('Lorem Ipsum') const cases = {
const nextThursday = new Date() 'monday': 1,
nextThursday.setDate(nextThursday.getDate() + ((4 + 7 - nextThursday.getDay()) % 7)) 'Monday': 1,
expect(`${result.date.getFullYear()}-${result.date.getMonth()}-${result.date.getDate()}`).toBe(`${nextThursday.getFullYear()}-${nextThursday.getMonth()}-${nextThursday.getDate()}`) 'mon': 1,
}) 'Mon': 1,
'tuesday': 2,
'Tuesday': 2,
'tue': 2,
'Tue': 2,
'wednesday': 3,
'Wednesday': 3,
'wed': 3,
'Wed': 3,
'thursday': 4,
'Thursday': 4,
'thu': 4,
'Thu': 4,
'friday': 5,
'Friday': 5,
'fri': 5,
'Fri': 5,
'saturday': 6,
'Saturday': 6,
'sat': 6,
'Sat': 6,
'sunday': 7,
'Sunday': 7,
'sun': 7,
'Sun': 7,
}
for (const c in cases) {
it(`should recognize ${c} as weekday`, () => {
const result = parseTaskText(`Lorem Ipsum ${c}`)
expect(result.text).toBe('Lorem Ipsum')
const nextDate = new Date()
nextDate.setDate(nextDate.getDate() + ((cases[c] + 7 - nextDate.getDay()) % 7))
expect(`${result.date.getFullYear()}-${result.date.getMonth()}-${result.date.getDate()}`).toBe(`${nextDate.getFullYear()}-${nextDate.getMonth()}-${nextDate.getDate()}`)
})
}
it('should recognize weekdays with time', () => { it('should recognize weekdays with time', () => {
const result = parseTaskText('Lorem Ipsum thu at 14:00') const result = parseTaskText('Lorem Ipsum thu at 14:00')

View File

@ -47,7 +47,7 @@ interface repeatParsedResult {
repeats: Repeats | null, repeats: Repeats | null,
} }
interface ParsedTaskText { export interface ParsedTaskText {
text: string, text: string,
date: Date | null, date: Date | null,
labels: string[], labels: string[],

View File

@ -2,6 +2,8 @@ import axios, {Method} from 'axios'
import {objectToSnakeCase} from '@/helpers/case' import {objectToSnakeCase} from '@/helpers/case'
import {getToken} from '@/helpers/auth' import {getToken} from '@/helpers/auth'
import AbstractModel from '@/models/abstractModel' import AbstractModel from '@/models/abstractModel'
import type { Right } from '@/models/constants/rights'
import type FileModel from '@/models/file'
interface Paths { interface Paths {
create : string create : string
@ -19,7 +21,7 @@ function convertObject(o: Record<string, unknown>) {
return o return o
} }
function prepareParams(params: Record<string, unknown | any[]>) { function prepareParams(params: Record<string, unknown | unknown[]>) {
if (typeof params !== 'object') { if (typeof params !== 'object') {
return params return params
} }
@ -36,7 +38,7 @@ function prepareParams(params: Record<string, unknown | any[]>) {
return objectToSnakeCase(params) return objectToSnakeCase(params)
} }
export default class AbstractService<Model extends AbstractModel> { export default class AbstractService<Model extends AbstractModel = AbstractModel> {
///////////////////////////// /////////////////////////////
// Initial variable definitions // Initial variable definitions
@ -133,8 +135,8 @@ export default class AbstractService<Model extends AbstractModel> {
/** /**
* Returns an object with all route parameters and their values. * Returns an object with all route parameters and their values.
*/ */
getRouteReplacements(route : string, parameters = {}) { getRouteReplacements(route : string, parameters : Record<string, unknown> = {}) {
const replace$$1: {} = {} const replace$$1: Record<string, unknown> = {}
let pattern = this.getRouteParameterPattern() let pattern = this.getRouteParameterPattern()
pattern = new RegExp(pattern instanceof RegExp ? pattern.source : pattern, 'g') pattern = new RegExp(pattern instanceof RegExp ? pattern.source : pattern, 'g')
@ -170,7 +172,7 @@ export default class AbstractService<Model extends AbstractModel> {
* But because the timeout is created using setTimeout, it will still trigger even if the request is * But because the timeout is created using setTimeout, it will still trigger even if the request is
* already finished, so we return a method to call in that case. * already finished, so we return a method to call in that case.
*/ */
setLoading(): Function { setLoading() {
const timeout = setTimeout(() => { const timeout = setTimeout(() => {
this.loading = true this.loading = true
}, 100) }, 100)
@ -276,7 +278,7 @@ export default class AbstractService<Model extends AbstractModel> {
* This is a more abstract implementation which only does a get request. * This is a more abstract implementation which only does a get request.
* Services which need more flexibility can use this. * Services which need more flexibility can use this.
*/ */
async getM(url : string, model = new AbstractModel({}), params = {}) { async getM(url : string, model = new AbstractModel({}) as Model, params: Record<string, unknown> = {}) {
const cancel = this.setLoading() const cancel = this.setLoading()
model = this.beforeGet(model) model = this.beforeGet(model)
@ -285,7 +287,7 @@ export default class AbstractService<Model extends AbstractModel> {
try { try {
const response = await this.http.get(finalUrl, {params: prepareParams(params)}) const response = await this.http.get(finalUrl, {params: prepareParams(params)})
const result = this.modelGetFactory(response.data) const result = this.modelGetFactory(response.data)
result.maxRight = Number(response.headers['x-max-right']) result.maxRight = Number(response.headers['x-max-right']) as Right
return result return result
} finally { } finally {
cancel() cancel()
@ -309,7 +311,7 @@ export default class AbstractService<Model extends AbstractModel> {
* @param params Optional query parameters * @param params Optional query parameters
* @param page The page to get * @param page The page to get
*/ */
async getAll(model : Model = new AbstractModel({}), params = {}, page = 1) { async getAll(model : Model = new AbstractModel({}) as Model, params = {}, page = 1) {
if (this.paths.getAll === '') { if (this.paths.getAll === '') {
throw new Error('This model is not able to get data.') throw new Error('This model is not able to get data.')
} }
@ -415,10 +417,10 @@ export default class AbstractService<Model extends AbstractModel> {
/** /**
* Uploads a file to a url. * Uploads a file to a url.
* @param url * @param url
* @param file * @param file {FileModel}
* @param fieldName The name of the field the file is uploaded to. * @param fieldName The name of the field the file is uploaded to.
*/ */
uploadFile(url : string, file, fieldName : string) { uploadFile(url : string, file: FileModel, fieldName : string) {
return this.uploadBlob(url, new Blob([file]), fieldName, file.name) return this.uploadBlob(url, new Blob([file]), fieldName, file.name)
} }
@ -434,7 +436,7 @@ export default class AbstractService<Model extends AbstractModel> {
/** /**
* Uploads a form data object. * Uploads a form data object.
*/ */
async uploadFormData(url : string, formData: Record<string, unknown>) { async uploadFormData(url : string, formData: FormData) {
const cancel = this.setLoading() const cancel = this.setLoading()
try { try {
const response = await this.http.put( const response = await this.http.put(

View File

@ -2,8 +2,9 @@ import AbstractService from './abstractService'
import AttachmentModel from '../models/attachment' import AttachmentModel from '../models/attachment'
import {formatISO} from 'date-fns' import {formatISO} from 'date-fns'
import {downloadBlob} from '@/helpers/downloadBlob' import {downloadBlob} from '@/helpers/downloadBlob'
import type FileModel from '@/models/file'
export default class AttachmentService extends AbstractService { export default class AttachmentService extends AbstractService<AttachmentModel> {
constructor() { constructor() {
super({ super({
create: '/tasks/{taskId}/attachments', create: '/tasks/{taskId}/attachments',
@ -12,7 +13,7 @@ export default class AttachmentService extends AbstractService {
}) })
} }
processModel(model) { processModel(model: AttachmentModel) {
model.created = formatISO(new Date(model.created)) model.created = formatISO(new Date(model.created))
return model return model
} }
@ -33,26 +34,25 @@ export default class AttachmentService extends AbstractService {
return data return data
} }
getBlobUrl(model) { getBlobUrl(model: AttachmentModel) {
return AbstractService.prototype.getBlobUrl.call(this, '/tasks/' + model.taskId + '/attachments/' + model.id) return AbstractService.prototype.getBlobUrl.call(this, '/tasks/' + model.taskId + '/attachments/' + model.id)
} }
async download(model) { async download(model: AttachmentModel) {
const url = await this.getBlobUrl(model) const url = await this.getBlobUrl(model)
return downloadBlob(url, model.file.name) return downloadBlob(url, model.file.name)
} }
/** /**
* Uploads a file to the server * Uploads a file to the server
* @param model
* @param files * @param files
* @returns {Promise<any|never>} * @returns {Promise<any|never>}
*/ */
create(model, files) { create(model: AttachmentModel, files: FileModel[]) {
const data = new FormData() const data = new FormData()
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
// TODO: Validation of file size // TODO: Validation of file size
data.append('files', new Blob([files[i]]), files[i].name) data.append('files', new Blob([JSON.stringify(files[i], null, 2)]), files[i].name)
} }
return this.uploadFormData( return this.uploadFormData(

View File

@ -1,5 +1,6 @@
import AbstractService from './abstractService' import AbstractService from './abstractService'
import ListModel from '../models/list' import ListModel from '../models/list'
import type FileModel from '@/models/file'
export default class BackgroundUploadService extends AbstractService { export default class BackgroundUploadService extends AbstractService {
constructor() { constructor() {
@ -18,11 +19,10 @@ export default class BackgroundUploadService extends AbstractService {
/** /**
* Uploads a file to the server * Uploads a file to the server
* @param listId
* @param file * @param file
* @returns {Promise<any|never>} * @returns {Promise<any|never>}
*/ */
create(listId: ListModel['id'], file) { create(listId: ListModel['id'], file: FileModel) {
return this.uploadFile( return this.uploadFile(
this.getReplacedRoute(this.paths.create, {listId}), this.getReplacedRoute(this.paths.create, {listId}),
file, file,

View File

@ -113,7 +113,7 @@ export default class TaskService extends AbstractService {
model.labels = model.labels.map(l => labelService.processModel(l)) model.labels = model.labels.map(l => labelService.processModel(l))
} }
return model return model as TaskModel
} }
} }

View File

@ -318,7 +318,7 @@ export default {
const oldBucket = cloneDeep(ctx.state.buckets[bucketIndex]) const oldBucket = cloneDeep(ctx.state.buckets[bucketIndex])
const updatedBucket = { const updatedBucket = {
...ctx.state.buckets[bucketIndex], ...oldBucket,
...updatedBucketData, ...updatedBucketData,
} }

View File

@ -16,7 +16,6 @@ import LabelTask from '@/models/labelTask'
import LabelModel from '@/models/label' import LabelModel from '@/models/label'
import UserService from '@/services/user' import UserService from '@/services/user'
// IDEA: maybe use a small fuzzy search here to prevent errors // IDEA: maybe use a small fuzzy search here to prevent errors
function findPropertyByValue(object, key, value) { function findPropertyByValue(object, key, value) {
return Object.values(object).find( return Object.values(object).find(
@ -286,12 +285,13 @@ export default {
return foundListId return foundListId
}, },
async createNewTask({dispatch}, { async createNewTask({dispatch, commit}, {
title, title,
bucketId, bucketId,
listId, listId,
position, position,
}) { }) {
setLoading({commit}, 'tasks')
const parsedTask = parseTaskText(title, getQuickAddMagicMode()) const parsedTask = parseTaskText(title, getQuickAddMagicMode())
const foundListId = await dispatch('findListId', { const foundListId = await dispatch('findListId', {

View File

@ -24,9 +24,6 @@ $vikunja-font: 'Quicksand', sans-serif;
$pagination-current-border: var(--primary); $pagination-current-border: var(--primary);
$navbar-item-active-color: var(--primary); $navbar-item-active-color: var(--primary);
$dropdown-content-shadow: none;
$dropdown-item-hover-background-color: var(--grey-100);
$site-background: var(--grey-100); $site-background: var(--grey-100);
$transition-duration: 150ms; $transition-duration: 150ms;

View File

@ -44,7 +44,7 @@
// imports from "bulma-css-variables/sass/components/_all"; // imports from "bulma-css-variables/sass/components/_all";
// @import "bulma-css-variables/sass/components/breadcrumb"; // not used // @import "bulma-css-variables/sass/components/breadcrumb"; // not used
@import "bulma-css-variables/sass/components/card"; @import "bulma-css-variables/sass/components/card";
@import "bulma-css-variables/sass/components/dropdown"; // @import "bulma-css-variables/sass/components/dropdown"; // moved to component
// @import "bulma-css-variables/sass/components/level"; // not used // @import "bulma-css-variables/sass/components/level"; // not used
@import "bulma-css-variables/sass/components/media"; @import "bulma-css-variables/sass/components/media";
@import "bulma-css-variables/sass/components/menu"; @import "bulma-css-variables/sass/components/menu";

View File

@ -91,34 +91,6 @@ button.table {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
// FIXME: merge with dropdown-item.vue
// for this to happen the component has to be used everywhere
.dropdown-item {
display: flex;
align-items: center;
justify-content: left !important;
.icon {
padding-right: .5rem;
}
.icon:not(.has-text-success) {
color: var(--grey-300) !important;
}
&.has-text-danger .icon {
color: var(--danger) !important;
}
&.is-disabled {
cursor: not-allowed;
&:hover {
background-color: transparent;
}
}
}
.is-max-width-desktop { .is-max-width-desktop {
width: 100%; width: 100%;
max-width: $desktop; max-width: $desktop;

View File

@ -52,11 +52,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, shallowRef, computed, watch, unref } from 'vue' import {ref, shallowRef, computed, watch, unref } from 'vue'
import { useRouter, useRoute } from 'vue-router' import {useRouter, useRoute} from 'vue-router'
import { store } from '@/store' import {store} from '@/store'
import { success } from '@/message' import {success} from '@/message'
import { useI18n } from 'vue-i18n' import {useI18n} from 'vue-i18n'
import type {MaybeRef} from '@vueuse/core' import type {MaybeRef} from '@vueuse/core'
import {default as Editor} from '@/components/input/AsyncEditor' import {default as Editor} from '@/components/input/AsyncEditor'
@ -70,7 +70,7 @@ import {objectToSnakeCase} from '@/helpers/case'
import {getSavedFilterIdFromListId} from '@/helpers/savedFilter' import {getSavedFilterIdFromListId} from '@/helpers/savedFilter'
import type ListModel from '@/models/list' import type ListModel from '@/models/list'
const { t } = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
function useSavedFilter(listId: MaybeRef<ListModel['id']>) { function useSavedFilter(listId: MaybeRef<ListModel['id']>) {
const filterService = shallowRef(new SavedFilterService()) const filterService = shallowRef(new SavedFilterService())
@ -82,24 +82,24 @@ function useSavedFilter(listId: MaybeRef<ListModel['id']>) {
filter.value.filters = value filter.value.filters = value
}, },
}) })
// loadSavedFilter // loadSavedFilter
watch(() => unref(listId), async () => { watch(() => unref(listId), async () => {
// We assume the listId in the route is the pseudolist // We assume the listId in the route is the pseudolist
const savedFilterId = getSavedFilterIdFromListId(Number(route.params.listId as string)) const savedFilterId = getSavedFilterIdFromListId(Number(route.params.listId as string))
filter.value = new SavedFilterModel({id: savedFilterId }) filter.value = new SavedFilterModel({id: savedFilterId})
const response = await filterService.value.get(filter.value) const response = await filterService.value.get(filter.value)
response.filters = objectToSnakeCase(filter.value.filters) response.filters = objectToSnakeCase(response.filters)
filter.value = response filter.value = response
}, { immediate: true }) }, {immediate: true})
async function save() { async function save() {
filter.value.filters = filters.value filter.value.filters = filters.value
const response = await filterService.value.update(filter.value) const response = await filterService.value.update(filter.value)
await store.dispatch('namespaces/loadNamespaces') await store.dispatch('namespaces/loadNamespaces')
success({message: t('filters.edit.success')}) success({message: t('filters.edit.success')})
response.filters = objectToSnakeCase(filter.value.filters) response.filters = objectToSnakeCase(response.filters)
filter.value = response filter.value = response
} }
@ -122,6 +122,7 @@ const {
} = useSavedFilter(listId) } = useSavedFilter(listId)
const router = useRouter() const router = useRouter()
async function saveSavedFilter() { async function saveSavedFilter() {
await save() await save()
router.back() router.back()

View File

@ -25,7 +25,7 @@
@start="() => dragBucket = true" @start="() => dragBucket = true"
group="buckets" group="buckets"
:disabled="!canWrite" :disabled="!canWrite"
tag="transition-group" tag="ul"
:item-key="({id}) => `bucket${id}`" :item-key="({id}) => `bucket${id}`"
:component-data="bucketDraggableComponentData" :component-data="bucketDraggableComponentData"
> >
@ -62,9 +62,8 @@
trigger-icon="ellipsis-v" trigger-icon="ellipsis-v"
@close="() => showSetLimitInput = false" @close="() => showSetLimitInput = false"
> >
<a <dropdown-item
@click.stop="showSetLimitInput = true" @click.stop="showSetLimitInput = true"
class="dropdown-item"
> >
<div class="field has-addons" v-if="showSetLimitInput"> <div class="field has-addons" v-if="showSetLimitInput">
<div class="control"> <div class="control">
@ -93,34 +92,32 @@
$t('list.kanban.limit', {limit: bucket.limit > 0 ? bucket.limit : $t('list.kanban.noLimit')}) $t('list.kanban.limit', {limit: bucket.limit > 0 ? bucket.limit : $t('list.kanban.noLimit')})
}} }}
</template> </template>
</a> </dropdown-item>
<a <dropdown-item
@click.stop="toggleDoneBucket(bucket)" @click.stop="toggleDoneBucket(bucket)"
class="dropdown-item"
v-tooltip="$t('list.kanban.doneBucketHintExtended')" v-tooltip="$t('list.kanban.doneBucketHintExtended')"
> >
<span class="icon is-small" :class="{'has-text-success': bucket.isDoneBucket}"> <span class="icon is-small" :class="{'has-text-success': bucket.isDoneBucket}">
<icon icon="check-double"/> <icon icon="check-double"/>
</span> </span>
{{ $t('list.kanban.doneBucket') }} {{ $t('list.kanban.doneBucket') }}
</a> </dropdown-item>
<a <dropdown-item
class="dropdown-item"
@click.stop="() => collapseBucket(bucket)" @click.stop="() => collapseBucket(bucket)"
> >
{{ $t('list.kanban.collapse') }} {{ $t('list.kanban.collapse') }}
</a> </dropdown-item>
<a <dropdown-item
:class="{'is-disabled': buckets.length <= 1}" :class="{'is-disabled': buckets.length <= 1}"
@click.stop="() => deleteBucketModal(bucket.id)" @click.stop="() => deleteBucketModal(bucket.id)"
class="dropdown-item has-text-danger" class="has-text-danger"
v-tooltip="buckets.length <= 1 ? $t('list.kanban.deleteLast') : ''" v-tooltip="buckets.length <= 1 ? $t('list.kanban.deleteLast') : ''"
> >
<span class="icon is-small"> <span class="icon is-small">
<icon icon="trash-alt"/> <icon icon="trash-alt"/>
</span> </span>
{{ $t('misc.delete') }} {{ $t('misc.delete') }}
</a> </dropdown-item>
</dropdown> </dropdown>
</div> </div>
@ -133,17 +130,17 @@
:group="{name: 'tasks', put: shouldAcceptDrop(bucket) && !dragBucket}" :group="{name: 'tasks', put: shouldAcceptDrop(bucket) && !dragBucket}"
:disabled="!canWrite" :disabled="!canWrite"
:data-bucket-index="bucketIndex" :data-bucket-index="bucketIndex"
tag="transition-group" tag="ul"
:item-key="(task) => `bucket${bucket.id}-task${task.id}`" :item-key="(task) => `bucket${bucket.id}-task${task.id}`"
:component-data="getTaskDraggableTaskComponentData(bucket)" :component-data="getTaskDraggableTaskComponentData(bucket)"
> >
<template #footer> <template #footer>
<div class="bucket-footer" v-if="canWrite"> <div class="bucket-footer" v-if="canWrite">
<div class="field" v-if="showNewTaskInput[bucket.id]"> <div class="field" v-if="showNewTaskInput[bucket.id]">
<div class="control" :class="{'is-loading': loading}"> <div class="control" :class="{'is-loading': loading || taskLoading}">
<input <input
class="input" class="input"
:disabled="loading || undefined" :disabled="loading || taskLoading || undefined"
@focusout="toggleShowNewTaskInput(bucket.id)" @focusout="toggleShowNewTaskInput(bucket.id)"
@keyup.enter="addTaskToBucket(bucket.id)" @keyup.enter="addTaskToBucket(bucket.id)"
@keyup.esc="toggleShowNewTaskInput(bucket.id)" @keyup.esc="toggleShowNewTaskInput(bucket.id)"
@ -172,7 +169,7 @@
<template #item="{element: task}"> <template #item="{element: task}">
<div class="task-item"> <div class="task-item">
<kanban-card class="kanban-card" :task="task"/> <kanban-card class="kanban-card" :task="task" :loading="taskUpdating[task.id] ?? false"/>
</div> </div>
</template> </template>
</draggable> </draggable>
@ -241,6 +238,7 @@ import Dropdown from '@/components/misc/dropdown.vue'
import {getCollapsedBucketState, saveCollapsedBucketState} from '@/helpers/saveCollapsedBucketState' import {getCollapsedBucketState, saveCollapsedBucketState} from '@/helpers/saveCollapsedBucketState'
import {calculateItemPosition} from '../../helpers/calculateItemPosition' import {calculateItemPosition} from '../../helpers/calculateItemPosition'
import KanbanCard from '@/components/tasks/partials/kanban-card.vue' import KanbanCard from '@/components/tasks/partials/kanban-card.vue'
import DropdownItem from '@/components/misc/dropdown-item.vue'
const DRAG_OPTIONS = { const DRAG_OPTIONS = {
// sortable options // sortable options
@ -256,6 +254,7 @@ const MIN_SCROLL_HEIGHT_PERCENT = 0.25
export default defineComponent({ export default defineComponent({
name: 'Kanban', name: 'Kanban',
components: { components: {
DropdownItem,
ListWrapper, ListWrapper,
KanbanCard, KanbanCard,
Dropdown, Dropdown,
@ -316,8 +315,7 @@ export default defineComponent({
return (bucket) => ({ return (bucket) => ({
ref: (el) => this.setTaskContainerRef(bucket.id, el), ref: (el) => this.setTaskContainerRef(bucket.id, el),
onScroll: (event) => this.handleTaskContainerScroll(bucket.id, bucket.listId, event.target), onScroll: (event) => this.handleTaskContainerScroll(bucket.id, bucket.listId, event.target),
type: 'transition', type: 'transition-group',
tag: 'div',
name: !this.drag ? 'move-card' : null, name: !this.drag ? 'move-card' : null,
class: [ class: [
'tasks', 'tasks',
@ -337,8 +335,7 @@ export default defineComponent({
}, },
bucketDraggableComponentData() { bucketDraggableComponentData() {
return { return {
type: 'transition', type: 'transition-group',
tag: 'div',
name: !this.dragBucket ? 'move-bucket' : null, name: !this.dragBucket ? 'move-bucket' : null,
class: [ class: [
'kanban-bucket-container', 'kanban-bucket-container',
@ -408,7 +405,6 @@ export default defineComponent({
// of the drop target works all the time. // of the drop target works all the time.
const bucketIndex = parseInt(e.to.dataset.bucketIndex) const bucketIndex = parseInt(e.to.dataset.bucketIndex)
const newBucket = this.buckets[bucketIndex] const newBucket = this.buckets[bucketIndex]
// HACK: // HACK:
@ -427,13 +423,30 @@ export default defineComponent({
const task = newBucket.tasks[newTaskIndex] const task = newBucket.tasks[newTaskIndex]
const taskBefore = newBucket.tasks[newTaskIndex - 1] ?? null const taskBefore = newBucket.tasks[newTaskIndex - 1] ?? null
const taskAfter = newBucket.tasks[newTaskIndex + 1] ?? null const taskAfter = newBucket.tasks[newTaskIndex + 1] ?? null
this.taskUpdating[task.id] = true
const newTask = cloneDeep(task) // cloning the task to avoid vuex store mutations const newTask = cloneDeep(task) // cloning the task to avoid vuex store mutations
newTask.bucketId = newBucket.id, newTask.bucketId = newBucket.id
newTask.kanbanPosition = calculateItemPosition(taskBefore !== null ? taskBefore.kanbanPosition : null, taskAfter !== null ? taskAfter.kanbanPosition : null) newTask.kanbanPosition = calculateItemPosition(
taskBefore !== null ? taskBefore.kanbanPosition : null,
taskAfter !== null ? taskAfter.kanbanPosition : null,
)
try { try {
await this.$store.dispatch('tasks/update', newTask) await this.$store.dispatch('tasks/update', newTask)
// Make sure the first and second task don't both get position 0 assigned
if(newTaskIndex === 0 && taskAfter !== null && taskAfter.kanbanPosition === 0) {
const taskAfterAfter = newBucket.tasks[newTaskIndex + 2] ?? null
const newTaskAfter = cloneDeep(taskAfter) // cloning the task to avoid vuex store mutations
newTaskAfter.bucketId = newBucket.id
newTaskAfter.kanbanPosition = calculateItemPosition(
0,
taskAfterAfter !== null ? taskAfterAfter.kanbanPosition : null,
)
await this.$store.dispatch('tasks/update', newTaskAfter)
}
} finally { } finally {
this.taskUpdating[task.id] = false this.taskUpdating[task.id] = false
this.oneTaskUpdating = false this.oneTaskUpdating = false
@ -450,7 +463,7 @@ export default defineComponent({
return return
} }
this.newTaskError[bucketId] = false this.newTaskError[bucketId] = false
const task = await this.$store.dispatch('tasks/createNewTask', { const task = await this.$store.dispatch('tasks/createNewTask', {
title: this.newTaskText, title: this.newTaskText,
bucketId, bucketId,
@ -714,10 +727,6 @@ $filter-container-height: '1rem - #{$switch-view-height}';
} }
} }
a.dropdown-item {
padding-right: 1rem;
}
&.is-collapsed { &.is-collapsed {
align-self: flex-start; align-self: flex-start;
transform: rotate(90deg) translateY(-100%); transform: rotate(90deg) translateY(-100%);

View File

@ -54,7 +54,7 @@
> >
<card :padding="false" :has-content="false" class="has-overflow"> <card :padding="false" :has-content="false" class="has-overflow">
<template <template
v-if="!list.isArchived && canWrite && list.id > 0" v-if="!list.isArchived && canWrite"
> >
<add-task <add-task
@taskAdded="updateTaskList" @taskAdded="updateTaskList"
@ -84,14 +84,17 @@
handle=".handle" handle=".handle"
:disabled="!canWrite" :disabled="!canWrite"
item-key="id" item-key="id"
tag="ul"
:component-data="{ :component-data="{
class: { 'dragging-disabled': !canWrite || isAlphabeticalSorting }, class: { 'dragging-disabled': !canWrite || isAlphabeticalSorting },
type: 'transition-group'
}" }"
> >
<template #item="{element: t}"> <template #item="{element: t}">
<single-task-in-list <single-task-in-list
:show-list-color="false" :show-list-color="false"
:disabled="!canWrite" :disabled="!canWrite"
:can-mark-as-done="canWrite || (list.isSavedFilter && list.isSavedFilter())"
:the-task="t" :the-task="t"
@taskUpdated="updateTasks" @taskUpdated="updateTasks"
> >
@ -215,7 +218,9 @@ export default defineComponent({
// isTaskEdit.value = false // isTaskEdit.value = false
// } // }
const taskList = useTaskList(toRef(props, 'listId')) const taskList = useTaskList(toRef(props, 'listId'), {
position: 'asc',
})
return { return {
taskEditTask, taskEditTask,

View File

@ -2,187 +2,187 @@
<ListWrapper class="list-table" :list-id="listId" viewName="table"> <ListWrapper class="list-table" :list-id="listId" viewName="table">
<template #header> <template #header>
<div class="filter-container"> <div class="filter-container">
<div class="items"> <div class="items">
<popup> <popup>
<template #trigger="{toggle}"> <template #trigger="{toggle}">
<x-button <x-button
@click.prevent.stop="toggle()" @click.prevent.stop="toggle()"
icon="th" icon="th"
variant="secondary" variant="secondary"
> >
{{ $t('list.table.columns') }} {{ $t('list.table.columns') }}
</x-button> </x-button>
</template> </template>
<template #content="{isOpen}"> <template #content="{isOpen}">
<card class="columns-filter" :class="{'is-open': isOpen}"> <card class="columns-filter" :class="{'is-open': isOpen}">
<fancycheckbox v-model="activeColumns.id">#</fancycheckbox> <fancycheckbox v-model="activeColumns.id">#</fancycheckbox>
<fancycheckbox v-model="activeColumns.done"> <fancycheckbox v-model="activeColumns.done">
{{ $t('task.attributes.done') }} {{ $t('task.attributes.done') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.title"> <fancycheckbox v-model="activeColumns.title">
{{ $t('task.attributes.title') }} {{ $t('task.attributes.title') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.priority"> <fancycheckbox v-model="activeColumns.priority">
{{ $t('task.attributes.priority') }} {{ $t('task.attributes.priority') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.labels"> <fancycheckbox v-model="activeColumns.labels">
{{ $t('task.attributes.labels') }} {{ $t('task.attributes.labels') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.assignees"> <fancycheckbox v-model="activeColumns.assignees">
{{ $t('task.attributes.assignees') }} {{ $t('task.attributes.assignees') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.dueDate"> <fancycheckbox v-model="activeColumns.dueDate">
{{ $t('task.attributes.dueDate') }} {{ $t('task.attributes.dueDate') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.startDate"> <fancycheckbox v-model="activeColumns.startDate">
{{ $t('task.attributes.startDate') }} {{ $t('task.attributes.startDate') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.endDate"> <fancycheckbox v-model="activeColumns.endDate">
{{ $t('task.attributes.endDate') }} {{ $t('task.attributes.endDate') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.percentDone"> <fancycheckbox v-model="activeColumns.percentDone">
{{ $t('task.attributes.percentDone') }} {{ $t('task.attributes.percentDone') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.created"> <fancycheckbox v-model="activeColumns.created">
{{ $t('task.attributes.created') }} {{ $t('task.attributes.created') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.updated"> <fancycheckbox v-model="activeColumns.updated">
{{ $t('task.attributes.updated') }} {{ $t('task.attributes.updated') }}
</fancycheckbox> </fancycheckbox>
<fancycheckbox v-model="activeColumns.createdBy"> <fancycheckbox v-model="activeColumns.createdBy">
{{ $t('task.attributes.createdBy') }} {{ $t('task.attributes.createdBy') }}
</fancycheckbox> </fancycheckbox>
</card> </card>
</template> </template>
</popup> </popup>
<filter-popup v-model="params" /> <filter-popup v-model="params"/>
</div> </div>
</div> </div>
</template> </template>
<template #default> <template #default>
<div :class="{'is-loading': loading}" class="loader-container"> <div :class="{'is-loading': loading}" class="loader-container">
<card :padding="false" :has-content="false"> <card :padding="false" :has-content="false">
<div class="has-horizontal-overflow"> <div class="has-horizontal-overflow">
<table class="table has-actions is-hoverable is-fullwidth mb-0"> <table class="table has-actions is-hoverable is-fullwidth mb-0">
<thead> <thead>
<tr> <tr>
<th v-if="activeColumns.id"> <th v-if="activeColumns.id">
# #
<Sort :order="sortBy.id" @click="sort('id')"/> <Sort :order="sortBy.id" @click="sort('id')"/>
</th> </th>
<th v-if="activeColumns.done"> <th v-if="activeColumns.done">
{{ $t('task.attributes.done') }} {{ $t('task.attributes.done') }}
<Sort :order="sortBy.done" @click="sort('done')"/> <Sort :order="sortBy.done" @click="sort('done')"/>
</th> </th>
<th v-if="activeColumns.title"> <th v-if="activeColumns.title">
{{ $t('task.attributes.title') }} {{ $t('task.attributes.title') }}
<Sort :order="sortBy.title" @click="sort('title')"/> <Sort :order="sortBy.title" @click="sort('title')"/>
</th> </th>
<th v-if="activeColumns.priority"> <th v-if="activeColumns.priority">
{{ $t('task.attributes.priority') }} {{ $t('task.attributes.priority') }}
<Sort :order="sortBy.priority" @click="sort('priority')"/> <Sort :order="sortBy.priority" @click="sort('priority')"/>
</th> </th>
<th v-if="activeColumns.labels"> <th v-if="activeColumns.labels">
{{ $t('task.attributes.labels') }} {{ $t('task.attributes.labels') }}
</th> </th>
<th v-if="activeColumns.assignees"> <th v-if="activeColumns.assignees">
{{ $t('task.attributes.assignees') }} {{ $t('task.attributes.assignees') }}
</th> </th>
<th v-if="activeColumns.dueDate"> <th v-if="activeColumns.dueDate">
{{ $t('task.attributes.dueDate') }} {{ $t('task.attributes.dueDate') }}
<Sort :order="sortBy.due_date" @click="sort('due_date')"/> <Sort :order="sortBy.due_date" @click="sort('due_date')"/>
</th> </th>
<th v-if="activeColumns.startDate"> <th v-if="activeColumns.startDate">
{{ $t('task.attributes.startDate') }} {{ $t('task.attributes.startDate') }}
<Sort :order="sortBy.start_date" @click="sort('start_date')"/> <Sort :order="sortBy.start_date" @click="sort('start_date')"/>
</th> </th>
<th v-if="activeColumns.endDate"> <th v-if="activeColumns.endDate">
{{ $t('task.attributes.endDate') }} {{ $t('task.attributes.endDate') }}
<Sort :order="sortBy.end_date" @click="sort('end_date')"/> <Sort :order="sortBy.end_date" @click="sort('end_date')"/>
</th> </th>
<th v-if="activeColumns.percentDone"> <th v-if="activeColumns.percentDone">
{{ $t('task.attributes.percentDone') }} {{ $t('task.attributes.percentDone') }}
<Sort :order="sortBy.percent_done" @click="sort('percent_done')"/> <Sort :order="sortBy.percent_done" @click="sort('percent_done')"/>
</th> </th>
<th v-if="activeColumns.created"> <th v-if="activeColumns.created">
{{ $t('task.attributes.created') }} {{ $t('task.attributes.created') }}
<Sort :order="sortBy.created" @click="sort('created')"/> <Sort :order="sortBy.created" @click="sort('created')"/>
</th> </th>
<th v-if="activeColumns.updated"> <th v-if="activeColumns.updated">
{{ $t('task.attributes.updated') }} {{ $t('task.attributes.updated') }}
<Sort :order="sortBy.updated" @click="sort('updated')"/> <Sort :order="sortBy.updated" @click="sort('updated')"/>
</th> </th>
<th v-if="activeColumns.createdBy"> <th v-if="activeColumns.createdBy">
{{ $t('task.attributes.createdBy') }} {{ $t('task.attributes.createdBy') }}
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr :key="t.id" v-for="t in tasks"> <tr :key="t.id" v-for="t in tasks">
<td v-if="activeColumns.id"> <td v-if="activeColumns.id">
<router-link :to="taskDetailRoutes[t.id]"> <router-link :to="taskDetailRoutes[t.id]">
<template v-if="t.identifier === ''"> <template v-if="t.identifier === ''">
#{{ t.index }} #{{ t.index }}
</template> </template>
<template v-else> <template v-else>
{{ t.identifier }} {{ t.identifier }}
</template> </template>
</router-link> </router-link>
</td> </td>
<td v-if="activeColumns.done"> <td v-if="activeColumns.done">
<Done :is-done="t.done" variant="small" /> <Done :is-done="t.done" variant="small"/>
</td> </td>
<td v-if="activeColumns.title"> <td v-if="activeColumns.title">
<router-link :to="taskDetailRoutes[t.id]">{{ t.title }}</router-link> <router-link :to="taskDetailRoutes[t.id]">{{ t.title }}</router-link>
</td> </td>
<td v-if="activeColumns.priority"> <td v-if="activeColumns.priority">
<priority-label :priority="t.priority" :done="t.done" :show-all="true"/> <priority-label :priority="t.priority" :done="t.done" :show-all="true"/>
</td> </td>
<td v-if="activeColumns.labels"> <td v-if="activeColumns.labels">
<labels :labels="t.labels"/> <labels :labels="t.labels"/>
</td> </td>
<td v-if="activeColumns.assignees"> <td v-if="activeColumns.assignees">
<user <user
:avatar-size="27" :avatar-size="27"
:is-inline="true" :is-inline="true"
:key="t.id + 'assignee' + a.id + i" :key="t.id + 'assignee' + a.id + i"
:show-username="false" :show-username="false"
:user="a" :user="a"
v-for="(a, i) in t.assignees" v-for="(a, i) in t.assignees"
/> />
</td> </td>
<date-table-cell :date="t.dueDate" v-if="activeColumns.dueDate"/> <date-table-cell :date="t.dueDate" v-if="activeColumns.dueDate"/>
<date-table-cell :date="t.startDate" v-if="activeColumns.startDate"/> <date-table-cell :date="t.startDate" v-if="activeColumns.startDate"/>
<date-table-cell :date="t.endDate" v-if="activeColumns.endDate"/> <date-table-cell :date="t.endDate" v-if="activeColumns.endDate"/>
<td v-if="activeColumns.percentDone">{{ t.percentDone * 100 }}%</td> <td v-if="activeColumns.percentDone">{{ t.percentDone * 100 }}%</td>
<date-table-cell :date="t.created" v-if="activeColumns.created"/> <date-table-cell :date="t.created" v-if="activeColumns.created"/>
<date-table-cell :date="t.updated" v-if="activeColumns.updated"/> <date-table-cell :date="t.updated" v-if="activeColumns.updated"/>
<td v-if="activeColumns.createdBy"> <td v-if="activeColumns.createdBy">
<user <user
:avatar-size="27" :avatar-size="27"
:show-username="false" :show-username="false"
:user="t.createdBy"/> :user="t.createdBy"/>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<Pagination <Pagination
:total-pages="totalPages" :total-pages="totalPages"
:current-page="currentPage" :current-page="currentPage"
/> />
</card> </card>
</div> </div>
</template> </template>
</ListWrapper> </ListWrapper>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { toRef, computed, type Ref } from 'vue' import {toRef, computed, type Ref} from 'vue'
import { useStorage } from '@vueuse/core' import {useStorage} from '@vueuse/core'
import ListWrapper from './ListWrapper.vue' import ListWrapper from './ListWrapper.vue'
import Done from '@/components/misc/Done.vue' import Done from '@/components/misc/Done.vue'
@ -196,7 +196,7 @@ import FilterPopup from '@/components/list/partials/filter-popup.vue'
import Pagination from '@/components/misc/pagination.vue' import Pagination from '@/components/misc/pagination.vue'
import Popup from '@/components/misc/popup.vue' import Popup from '@/components/misc/popup.vue'
import { useTaskList } from '@/composables/taskList' import {useTaskList} from '@/composables/taskList'
import type TaskModel from '@/models/task' import type TaskModel from '@/models/task'
const ACTIVE_COLUMNS_DEFAULT = { const ACTIVE_COLUMNS_DEFAULT = {
@ -225,24 +225,24 @@ const props = defineProps({
type Order = 'asc' | 'desc' | 'none' type Order = 'asc' | 'desc' | 'none'
interface SortBy { interface SortBy {
id : Order id: Order
done? : Order done?: Order
title? : Order title?: Order
priority? : Order priority?: Order
due_date? : Order due_date?: Order
start_date? : Order start_date?: Order
end_date? : Order end_date?: Order
percent_done? : Order percent_done?: Order
created? : Order created?: Order
updated? : Order updated?: Order
} }
const SORT_BY_DEFAULT : SortBy = { const SORT_BY_DEFAULT: SortBy = {
id: 'desc', id: 'desc',
} }
const activeColumns = useStorage('tableViewColumns', { ...ACTIVE_COLUMNS_DEFAULT }) const activeColumns = useStorage('tableViewColumns', {...ACTIVE_COLUMNS_DEFAULT})
const sortBy = useStorage<SortBy>('tableViewSortBy', { ...SORT_BY_DEFAULT }) const sortBy = useStorage<SortBy>('tableViewSortBy', {...SORT_BY_DEFAULT})
const taskList = useTaskList(toRef(props, 'listId')) const taskList = useTaskList(toRef(props, 'listId'))
@ -251,8 +251,9 @@ const {
params, params,
totalPages, totalPages,
currentPage, currentPage,
sortByParam,
} = taskList } = taskList
const tasks : Ref<TaskModel[]> = taskList.tasks const tasks: Ref<TaskModel[]> = taskList.tasks
Object.assign(params.value, { Object.assign(params.value, {
filter_by: [], filter_by: [],
@ -261,7 +262,7 @@ Object.assign(params.value, {
}) })
// FIXME: by doing this we can have multiple sort orders // FIXME: by doing this we can have multiple sort orders
function sort(property : keyof SortBy) { function sort(property: keyof SortBy) {
const order = sortBy.value[property] const order = sortBy.value[property]
if (typeof order === 'undefined' || order === 'none') { if (typeof order === 'undefined' || order === 'none') {
sortBy.value[property] = 'desc' sortBy.value[property] = 'desc'
@ -270,6 +271,7 @@ function sort(property : keyof SortBy) {
} else { } else {
delete sortBy.value[property] delete sortBy.value[property]
} }
sortByParam.value = sortBy.value
} }
// TODO: re-enable opening task detail in modal // TODO: re-enable opening task detail in modal
@ -279,7 +281,7 @@ const taskDetailRoutes = computed(() => Object.fromEntries(
id, id,
{ {
name: 'task.detail', name: 'task.detail',
params: { id }, params: {id},
// state: { backdropView: router.currentRoute.value.fullPath }, // state: { backdropView: router.currentRoute.value.fullPath },
}, },
])), ])),
@ -310,7 +312,7 @@ const taskDetailRoutes = computed(() => Object.fromEntries(
} }
.link-share-view .card { .link-share-view .card {
border: none; border: none;
box-shadow: none; box-shadow: none;
} }
</style> </style>

View File

@ -21,9 +21,9 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref, shallowReactive} from 'vue' import {ref, shallowReactive} from 'vue'
import { useRoute, useRouter } from 'vue-router' import {useRoute, useRouter} from 'vue-router'
import { useStore } from 'vuex' import {useStore} from 'vuex'
import { useI18n } from 'vue-i18n' import {useI18n} from 'vue-i18n'
import ListDuplicateService from '@/services/listDuplicateService' import ListDuplicateService from '@/services/listDuplicateService'
import CreateEdit from '@/components/misc/create-edit.vue' import CreateEdit from '@/components/misc/create-edit.vue'
@ -32,29 +32,30 @@ import Multiselect from '@/components/input/multiselect.vue'
import ListDuplicateModel from '@/models/listDuplicateModel' import ListDuplicateModel from '@/models/listDuplicateModel'
import NamespaceModel from '@/models/namespace' import NamespaceModel from '@/models/namespace'
import { success } from '@/message' import {success} from '@/message'
import { useTitle } from '@/composables/useTitle' import {useTitle} from '@/composables/useTitle'
import { useNameSpaceSearch } from '@/composables/useNamespaceSearch' import {useNameSpaceSearch} from '@/composables/useNamespaceSearch'
const {t} = useI18n({useScope: 'global'})
const { t } = useI18n({useScope: 'global'})
useTitle(() => t('list.duplicate.title')) useTitle(() => t('list.duplicate.title'))
const { const {
namespaces, namespaces,
findNamespaces, findNamespaces,
} = useNameSpaceSearch() } = useNameSpaceSearch()
const selectedNamespace = ref<NamespaceModel>() const selectedNamespace = ref<NamespaceModel>()
function selectNamespace(namespace: NamespaceModel) { function selectNamespace(namespace: NamespaceModel) {
selectedNamespace.value = namespace selectedNamespace.value = namespace
} }
const route = useRoute() const route = useRoute()
const router= useRouter() const router = useRouter()
const store = useStore()
const listDuplicateService = shallowReactive(new ListDuplicateService()) const listDuplicateService = shallowReactive(new ListDuplicateService())
async function duplicateList() { async function duplicateList() {
const listDuplicate = new ListDuplicateModel({ const listDuplicate = new ListDuplicateModel({
// FIXME: should be parameter // FIXME: should be parameter
@ -64,7 +65,6 @@ async function duplicateList() {
const duplicate = await listDuplicateService.create(listDuplicate) const duplicate = await listDuplicateService.create(listDuplicate)
const store = useStore()
store.commit('namespaces/addListToNamespace', duplicate.list) store.commit('namespaces/addListToNamespace', duplicate.list)
store.commit('lists/setList', duplicate.list) store.commit('lists/setList', duplicate.list)
success({message: t('list.duplicate.success')}) success({message: t('list.duplicate.success')})

View File

@ -775,7 +775,7 @@ $flash-background-duration: 750ms;
display: flex; display: flex;
align-items: center; align-items: center;
a.remove { .remove {
color: var(--danger); color: var(--danger);
vertical-align: middle; vertical-align: middle;
padding-left: .5rem; padding-left: .5rem;
@ -786,20 +786,22 @@ $flash-background-duration: 750ms;
:deep(.datepicker) { :deep(.datepicker) {
width: 100%; width: 100%;
a.show { .show {
color: var(--text); color: var(--text);
padding: .25rem .5rem; padding: .25rem .5rem;
transition: background-color $transition; transition: background-color $transition;
border-radius: $radius; border-radius: $radius;
display: block; display: block;
margin: .1rem 0; margin: .1rem 0;
width: 100%;
text-align: left;
&:hover { &:hover {
background: var(--white); background: var(--white);
} }
} }
&.disabled a.show:hover { &.disabled .show:hover {
background: transparent; background: transparent;
} }
} }

View File

@ -62,7 +62,7 @@ export default { name: 'user-settings-avatar' }
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import {ref, shallowReactive} from 'vue' import {computed, ref, shallowReactive} from 'vue'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import {useStore} from 'vuex' import {useStore} from 'vuex'
import {Cropper} from 'vue-advanced-cropper' import {Cropper} from 'vue-advanced-cropper'
@ -76,13 +76,13 @@ import { success } from '@/message'
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
const store = useStore() const store = useStore()
const AVATAR_PROVIDERS = { const AVATAR_PROVIDERS = computed(() => ({
default: t('misc.default'), default: t('misc.default'),
initials: t('user.settings.avatar.initials'), initials: t('user.settings.avatar.initials'),
gravatar: t('user.settings.avatar.gravatar'), gravatar: t('user.settings.avatar.gravatar'),
marble: t('user.settings.avatar.marble'), marble: t('user.settings.avatar.marble'),
upload: t('user.settings.avatar.upload'), upload: t('user.settings.avatar.upload'),
} }))
useTitle(() => `${t('user.settings.avatar.title')} - ${t('user.settings.title')}`) useTitle(() => `${t('user.settings.avatar.title')} - ${t('user.settings.title')}`)

1984
yarn.lock

File diff suppressed because it is too large Load Diff