diff --git a/cypress/integration/list/list.spec.js b/cypress/integration/list/list.spec.js index ce7f6f55..00f5b4f5 100644 --- a/cypress/integration/list/list.spec.js +++ b/cypress/integration/list/list.spec.js @@ -72,7 +72,7 @@ describe('Lists', () => { .should('contain', newListName) .should('not.contain', lists[0].title) cy.visit('/') - cy.get('.card-content .tasks') + cy.get('.card-content') .should('contain', newListName) .should('not.contain', lists[0].title) }) diff --git a/src/components/date/dateRanges.ts b/src/components/date/dateRanges.ts new file mode 100644 index 00000000..648f001b --- /dev/null +++ b/src/components/date/dateRanges.ts @@ -0,0 +1,21 @@ +export const DATE_RANGES = { + // Format: + // Key is the title, as a translation string, the first entry of the value array + // is the "from" date, the second one is the "to" date. + 'today': ['now/d', 'now/d+1d'], + + 'lastWeek': ['now/w-1w', 'now/w-2w'], + 'thisWeek': ['now/w', 'now/w+1w'], + 'restOfThisWeek': ['now', 'now/w+1w'], + 'nextWeek': ['now/w+1w', 'now/w+2w'], + 'next7Days': ['now', 'now+7d'], + + 'lastMonth': ['now/M-1M', 'now/M-2M'], + 'thisMonth': ['now/M', 'now/M+1M'], + 'restOfThisMonth': ['now', 'now/M+1M'], + 'nextMonth': ['now/M+1M', 'now/M+2M'], + 'next30Days': ['now', 'now+30d'], + + 'thisYear': ['now/y', 'now/y+1y'], + 'restOfThisYear': ['now', 'now/y+1y'], +} diff --git a/src/components/date/datemathHelp.vue b/src/components/date/datemathHelp.vue new file mode 100644 index 00000000..f645fdb3 --- /dev/null +++ b/src/components/date/datemathHelp.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/components/date/datepickerWithRange.vue b/src/components/date/datepickerWithRange.vue new file mode 100644 index 00000000..61c21ef5 --- /dev/null +++ b/src/components/date/datepickerWithRange.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/src/components/list/partials/filter-popup.vue b/src/components/list/partials/filter-popup.vue index d4caf9b4..8e156106 100644 --- a/src/components/list/partials/filter-popup.vue +++ b/src/components/list/partials/filter-popup.vue @@ -6,7 +6,7 @@ > {{ $t('filters.clear') }} - + - diff --git a/src/components/misc/popup.vue b/src/components/misc/popup.vue index fcfa420e..e4143930 100644 --- a/src/components/misc/popup.vue +++ b/src/components/misc/popup.vue @@ -1,6 +1,6 @@ @@ -16,6 +16,13 @@ const toggle = () => { open.value = !open.value } +const props = defineProps({ + hasOverflow: { + type: Boolean, + default: false, + }, +}) + function hidePopup(e) { if (!open.value) { return diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 5d061735..e7803add 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -12,7 +12,6 @@ > - + @@ -83,13 +87,14 @@ const userInfo = computed(() => store.state.auth.info) const hasTasks = computed(() => store.state.hasTasks) const defaultListId = computed(() => store.state.auth.defaultListId) const defaultNamespaceId = computed(() => store.state.namespaces.namespaces?.[0]?.id || 0) -const hasLists = computed (() => store.state.namespaces.namespaces?.[0]?.lists.length > 0) +const hasLists = computed(() => store.state.namespaces.namespaces?.[0]?.lists.length > 0) const loading = computed(() => store.state.loading && store.state.loadingModule === 'tasks') const deletionScheduledAt = computed(() => parseDateOrNull(store.state.auth.info?.deletionScheduledAt)) // This is to reload the tasks list after adding a new task through the global task add. // FIXME: Should use vuex (somehow?) const showTasksKey = ref(0) + function updateTaskList() { showTasksKey.value++ } diff --git a/src/views/tasks/ShowTasks.vue b/src/views/tasks/ShowTasks.vue index 7252f7a6..71e16476 100644 --- a/src/views/tasks/ShowTasks.vue +++ b/src/views/tasks/ShowTasks.vue @@ -1,287 +1,236 @@ - \ No newline at end of file diff --git a/src/views/tasks/ShowTasksInRange.vue b/src/views/tasks/ShowTasksInRange.vue deleted file mode 100644 index 02498cc1..00000000 --- a/src/views/tasks/ShowTasksInRange.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 8e9715f9..008ef9f3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,8 @@ /// -import { defineConfig } from 'vite' +import {defineConfig} from 'vite' import vue from '@vitejs/plugin-vue' import legacyFn from '@vitejs/plugin-legacy' + const {VitePWA} = require('vite-plugin-pwa') const path = require('path') const {visualizer} = require('rollup-plugin-visualizer') @@ -49,6 +50,7 @@ export default defineConfig({ }, }, }, + reactivityTransform: true, }), legacy, svgLoader({