From 3aa502e07d89314e885c252e1e3d4668fa64059b Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 20 Jun 2023 14:39:59 +0200 Subject: [PATCH] fix: use props destructuring everywhere --- .../home/ProjectsNavigationItem.vue | 15 ++- src/components/input/ColorPicker.vue | 20 ++-- src/components/misc/modal.vue | 20 ++-- .../project/partials/ProjectCard.vue | 15 +-- src/components/tasks/partials/attachments.vue | 16 +-- src/components/tasks/partials/defer-task.vue | 16 +-- src/components/tasks/partials/kanban-card.vue | 19 +-- .../tasks/partials/reminder-detail.vue | 35 +++--- .../tasks/partials/reminder-period.vue | 21 ++-- src/components/tasks/partials/reminders.vue | 22 ++-- .../tasks/partials/singleTaskInProject.vue | 47 +++----- src/views/filters/FilterDelete.vue | 11 +- src/views/filters/FilterEdit.vue | 10 +- src/views/project/ProjectList.vue | 15 ++- src/views/project/ProjectTable.vue | 16 +-- src/views/tasks/TaskDetailView.vue | 111 +++++++++--------- vite.config.ts | 3 + 17 files changed, 197 insertions(+), 215 deletions(-) diff --git a/src/components/home/ProjectsNavigationItem.vue b/src/components/home/ProjectsNavigationItem.vue index fe0ae0b1..caea71b5 100644 --- a/src/components/home/ProjectsNavigationItem.vue +++ b/src/components/home/ProjectsNavigationItem.vue @@ -84,14 +84,17 @@ import ColorBubble from '@/components/misc/colorBubble.vue' import ProjectsNavigation from '@/components/home/ProjectsNavigation.vue' import {canNestProjectDeeper} from '@/helpers/canNestProjectDeeper' -const props = withDefaults(defineProps<{ +const { + project, + isLoading, + canCollapse, + level = 0, +} = defineProps<{ project: IProject, isLoading?: boolean, canCollapse?: boolean, level?: number, -}>(), { - level: 0, -}) +}>() const projectStore = useProjectStore() const baseStore = useBaseStore() @@ -104,12 +107,12 @@ const childProjects = computed(() => { return [] } - return projectStore.getChildProjects(props.project.id) + return projectStore.getChildProjects(project.id) .filter(p => !p.isArchived) .sort((a, b) => a.position - b.position) }) -const canNestDeeper = computed(() => canNestProjectDeeper(props.level)) +const canNestDeeper = computed(() => canNestProjectDeeper(level)) \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index ce1e96ba..d1eaf677 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -121,6 +121,9 @@ export default defineConfig(({mode}) => { plugins: [ vue({ reactivityTransform: true, + script: { + propsDestructure: true, + }, }), legacy, svgLoader({