diff --git a/app/src/components/layouts/MainLayout.vue b/app/src/components/layouts/MainLayout.vue index 74c90f5c..91e4258c 100644 --- a/app/src/components/layouts/MainLayout.vue +++ b/app/src/components/layouts/MainLayout.vue @@ -2,6 +2,7 @@ import { createReusableTemplate } from '@vueuse/core' import type { VNode } from 'vue' import { computed } from 'vue' +import { useI18n } from 'vue-i18n' import { useRouter } from 'vue-router' import { @@ -13,8 +14,9 @@ import { import { useInfos } from '@/composables/useInfos' import { useRequests } from '@/composables/useRequests' import { useSettings } from '@/composables/useSettings' -import type { Skeleton, VueClass } from '@/types/commons' +import type { CustomRoute, Skeleton, VueClass } from '@/types/commons' +const { t } = useI18n() const router = useRouter() const { routerKey } = useInfos() const { reconnecting, currentRequest, dismissModal } = useRequests() @@ -25,6 +27,13 @@ const RootView = createReusableTemplate<{ classes: VueClass }>() +const quickAddItems: CustomRoute[] = [ + { text: t('users_new'), to: { name: 'user-create' } }, + { text: t('domain_add'), to: { name: 'domain-add' } }, + { text: t('group_new'), to: { name: 'group-create' } }, + { text: t('install'), to: { name: 'app-catalog' } }, +] + const skeletons = computed(() => { const skeleton = router.currentRoute.value.meta.skeleton ?? 'CardInfoSkeleton' const skeletons = Array.isArray(skeleton) ? skeleton : [skeleton] @@ -88,7 +97,25 @@ const modalComponent = computed(() => { - +
+ + + + + + +