1
0

fix(migration): put "Import from other services" in settings

Resolves https://kolaente.dev/vikunja/vikunja/issues/2347
This commit is contained in:
kolaente 2024-06-18 15:19:33 +02:00
parent f222ecfa19
commit eafd134be5
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
2 changed files with 17 additions and 14 deletions

View File

@ -186,6 +186,20 @@ const router = createRouter({
name: 'user.settings.apiTokens', name: 'user.settings.apiTokens',
component: UserSettingsApiTokensComponent, component: UserSettingsApiTokensComponent,
}, },
{
path: '/user/settings/migrate',
name: 'migrate.start',
component: MigrationComponent,
},
{
path: '/user/settings/migrate/:service',
name: 'migrate.service',
component: MigrationHandlerComponent,
props: route => ({
service: route.params.service as string,
code: route.query.code as string,
}),
},
], ],
}, },
{ {
@ -402,20 +416,6 @@ const router = createRouter({
showAsModal: true, showAsModal: true,
}, },
}, },
{
path: '/migrate',
name: 'migrate.start',
component: MigrationComponent,
},
{
path: '/migrate/:service',
name: 'migrate.service',
component: MigrationHandlerComponent,
props: route => ({
service: route.params.service as string,
code: route.query.code as string,
}),
},
{ {
path: '/filters/new', path: '/filters/new',
name: 'filters.create', name: 'filters.create',

View File

@ -9,6 +9,7 @@
> >
<RouterLink <RouterLink
class="navigation-link" class="navigation-link"
:class="{'router-link-active': routeName === 'migrate.start' && route.name === 'migrate.service'}"
:to="{name: routeName}" :to="{name: routeName}"
> >
{{ title }} {{ title }}
@ -29,12 +30,14 @@ import { useI18n } from 'vue-i18n'
import { useTitle } from '@/composables/useTitle' import { useTitle } from '@/composables/useTitle'
import { useConfigStore } from '@/stores/config' import { useConfigStore } from '@/stores/config'
import { useAuthStore } from '@/stores/auth' import { useAuthStore } from '@/stores/auth'
import {useRoute} from 'vue-router'
const { t } = useI18n({useScope: 'global'}) const { t } = useI18n({useScope: 'global'})
useTitle(() => t('user.settings.title')) useTitle(() => t('user.settings.title'))
const configStore = useConfigStore() const configStore = useConfigStore()
const authStore = useAuthStore() const authStore = useAuthStore()
const route = useRoute()
const totpEnabled = computed(() => configStore.totpEnabled) const totpEnabled = computed(() => configStore.totpEnabled)
const caldavEnabled = computed(() => configStore.caldavEnabled) const caldavEnabled = computed(() => configStore.caldavEnabled)