diff --git a/src/main.ts b/src/main.ts index 9af014041..e3efe3a72 100644 --- a/src/main.ts +++ b/src/main.ts @@ -70,13 +70,11 @@ app.component('card', Card) // Mixins import {getNamespaceTitle} from './helpers/getNamespaceTitle' import {getListTitle} from './helpers/getListTitle' -import {setTitle} from './helpers/setTitle' app.mixin({ methods: { getNamespaceTitle, getListTitle, - setTitle, }, }) diff --git a/src/views/labels/ListLabels.vue b/src/views/labels/ListLabels.vue index 227d140a5..0743b9350 100644 --- a/src/views/labels/ListLabels.vue +++ b/src/views/labels/ListLabels.vue @@ -118,6 +118,7 @@ import {LOADING, LOADING_MODULE} from '@/store/mutation-types' import AsyncEditor from '@/components/input/AsyncEditor' import ColorPicker from '@/components/input/colorPicker.vue' +import { setTitle } from '@/helpers/setTitle' export default defineComponent({ name: 'ListLabels', @@ -138,7 +139,7 @@ export default defineComponent({ this.$store.dispatch('labels/loadAllLabels') }, mounted() { - this.setTitle(this.$t('label.title')) + setTitle(this.$t('label.title')) }, computed: mapState({ userInfo: state => state.auth.info, diff --git a/src/views/labels/NewLabel.vue b/src/views/labels/NewLabel.vue index 423e13916..0798b3598 100644 --- a/src/views/labels/NewLabel.vue +++ b/src/views/labels/NewLabel.vue @@ -41,6 +41,7 @@ import CreateEdit from '@/components/misc/create-edit.vue' import ColorPicker from '../../components/input/colorPicker.vue' import {mapState} from 'vuex' import {LOADING, LOADING_MODULE} from '@/store/mutation-types' +import { setTitle } from '@/helpers/setTitle' export default defineComponent({ name: 'NewLabel', @@ -55,7 +56,7 @@ export default defineComponent({ ColorPicker, }, mounted() { - this.setTitle(this.$t('label.create.title')) + setTitle(this.$t('label.create.title')) }, computed: mapState({ loading: state => state[LOADING] && state[LOADING_MODULE] === 'labels', diff --git a/src/views/list/settings/background.vue b/src/views/list/settings/background.vue index cad2428d6..a2105985e 100644 --- a/src/views/list/settings/background.vue +++ b/src/views/list/settings/background.vue @@ -83,6 +83,7 @@ import ListService from '@/services/list' import {CURRENT_LIST} from '@/store/mutation-types' import CreateEdit from '@/components/misc/create-edit.vue' import debounce from 'lodash.debounce' +import { setTitle } from '@/helpers/setTitle' const SEARCH_DEBOUNCE = 300 @@ -114,7 +115,7 @@ export default defineComponent({ hasBackground: state => state.background !== null, }), created() { - this.setTitle(this.$t('list.background.title')) + setTitle(this.$t('list.background.title')) // Show the default collection of backgrounds this.newBackgroundSearch() }, diff --git a/src/views/list/settings/edit.vue b/src/views/list/settings/edit.vue index d516702c9..0edcf746c 100644 --- a/src/views/list/settings/edit.vue +++ b/src/views/list/settings/edit.vue @@ -75,6 +75,7 @@ import ListService from '@/services/list' import ColorPicker from '@/components/input/colorPicker.vue' import {CURRENT_LIST} from '@/store/mutation-types' import CreateEdit from '@/components/misc/create-edit.vue' +import { setTitle } from '@/helpers/setTitle' export default defineComponent({ name: 'list-setting-edit', @@ -106,7 +107,7 @@ export default defineComponent({ async save() { await this.$store.dispatch('lists/updateList', this.list) await this.$store.dispatch(CURRENT_LIST, {list: this.list}) - this.setTitle(this.$t('list.edit.title', {list: this.list.title})) + setTitle(this.$t('list.edit.title', {list: this.list.title})) this.$message.success({message: this.$t('list.edit.success')}) this.$router.back() }, diff --git a/src/views/migrator/MigrateService.vue b/src/views/migrator/MigrateService.vue index 6cbc9feea..771e91236 100644 --- a/src/views/migrator/MigrateService.vue +++ b/src/views/migrator/MigrateService.vue @@ -72,6 +72,7 @@ import AbstractMigrationService from '@/services/migrator/abstractMigration' import AbstractMigrationFileService from '@/services/migrator/abstractMigrationFile' import Logo from '@/assets/logo.svg?component' import Message from '@/components/misc/message.vue' +import { setTitle } from '@/helpers/setTitle' import {MIGRATORS} from './migrators' @@ -114,7 +115,7 @@ export default defineComponent({ }, mounted() { - this.setTitle(this.$t('migrate.titleService', {name: this.migrator.name})) + setTitle(this.$t('migrate.titleService', {name: this.migrator.name})) }, methods: { diff --git a/src/views/namespaces/ListNamespaces.vue b/src/views/namespaces/ListNamespaces.vue index 5314c6969..c3e055450 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 { setTitle } from '@/helpers/setTitle' export default defineComponent({ name: 'ListNamespaces', @@ -88,7 +89,7 @@ export default defineComponent({ } }, mounted() { - this.setTitle(this.$t('namespace.title')) + setTitle(this.$t('namespace.title')) }, computed: mapState({ namespaces(state) { diff --git a/src/views/namespaces/NewNamespace.vue b/src/views/namespaces/NewNamespace.vue index 19ffb16ce..02ed7b03e 100644 --- a/src/views/namespaces/NewNamespace.vue +++ b/src/views/namespaces/NewNamespace.vue @@ -48,6 +48,7 @@ import NamespaceModel from '../../models/namespace' import NamespaceService from '../../services/namespace' import CreateEdit from '@/components/misc/create-edit.vue' import ColorPicker from '../../components/input/colorPicker.vue' +import { setTitle } from '@/helpers/setTitle' export default defineComponent({ name: 'NewNamespace', @@ -64,7 +65,7 @@ export default defineComponent({ CreateEdit, }, mounted() { - this.setTitle(this.$t('namespace.create.title')) + setTitle(this.$t('namespace.create.title')) }, methods: { async newNamespace() { diff --git a/src/views/namespaces/settings/archive.vue b/src/views/namespaces/settings/archive.vue index 23fc6de97..7903ef612 100644 --- a/src/views/namespaces/settings/archive.vue +++ b/src/views/namespaces/settings/archive.vue @@ -17,6 +17,7 @@ import {defineComponent} from 'vue' import NamespaceService from '@/services/namespace' +import { setTitle } from '@/helpers/setTitle' export default defineComponent({ name: 'namespace-setting-archive', @@ -33,7 +34,7 @@ export default defineComponent({ this.title = this.namespace.isArchived ? this.$t('namespace.archive.titleUnarchive', {namespace: this.namespace.title}) : this.$t('namespace.archive.titleArchive', {namespace: this.namespace.title}) - this.setTitle(this.title) + setTitle(this.title) }, methods: { diff --git a/src/views/namespaces/settings/delete.vue b/src/views/namespaces/settings/delete.vue index b27d2533e..b778e66a7 100644 --- a/src/views/namespaces/settings/delete.vue +++ b/src/views/namespaces/settings/delete.vue @@ -14,6 +14,7 @@