From 7dfbfa32ebf93e8bc2ce74053766abeb5490612b Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Thu, 23 Jun 2022 03:26:54 +0200 Subject: [PATCH] Global mixins --- src/main.ts | 11 ----------- src/views/namespaces/ListNamespaces.vue | 2 ++ src/views/tasks/TaskDetailView.vue | 6 +++++- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/main.ts b/src/main.ts index e3efe3a72..b24a216d5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -67,17 +67,6 @@ app.component('x-button', Button) app.component('modal', Modal) app.component('card', Card) -// Mixins -import {getNamespaceTitle} from './helpers/getNamespaceTitle' -import {getListTitle} from './helpers/getListTitle' - -app.mixin({ - methods: { - getNamespaceTitle, - getListTitle, - }, -}) - app.config.errorHandler = (err, vm, info) => { if (import.meta.env.DEV) { console.error(err, vm, info) diff --git a/src/views/namespaces/ListNamespaces.vue b/src/views/namespaces/ListNamespaces.vue index c3e055450..c9d2e4acc 100644 --- a/src/views/namespaces/ListNamespaces.vue +++ b/src/views/namespaces/ListNamespaces.vue @@ -75,6 +75,7 @@ import {mapState} from 'vuex' import Fancycheckbox from '../../components/input/fancycheckbox.vue' import {LOADING} from '@/store/mutation-types' import ListCard from '@/components/list/partials/list-card.vue' +import {getNamespaceTitle} from '@/helpers/getNamespaceTitle' import { setTitle } from '@/helpers/setTitle' export default defineComponent({ @@ -102,6 +103,7 @@ export default defineComponent({ loading: LOADING, }), methods: { + getNamespaceTitle, saveShowArchivedState() { localStorage.setItem('showArchived', JSON.stringify(this.showArchived)) }, diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue index 5ee6e9b6e..8acf74ef9 100644 --- a/src/views/tasks/TaskDetailView.vue +++ b/src/views/tasks/TaskDetailView.vue @@ -444,8 +444,10 @@ import {CURRENT_LIST} from '@/store/mutation-types' import {uploadFile} from '@/helpers/attachments' import ChecklistSummary from '../../components/tasks/partials/checklist-summary.vue' import CreatedUpdated from '@/components/tasks/partials/createdUpdated.vue' -import { setTitle } from '@/helpers/setTitle' import type ListModel from '@/models/list' +import { setTitle } from '@/helpers/setTitle' +import {getNamespaceTitle} from '@/helpers/getNamespaceTitle' +import {getListTitle} from '@/helpers/getListTitle' function scrollIntoView(el) { if (!el) { @@ -581,6 +583,8 @@ export default defineComponent({ }, }, methods: { + getNamespaceTitle, + getListTitle, attachmentUpload(...args) { return uploadFile(this.taskId, ...args) },