Changed to new Layout System

This commit is contained in:
2024-02-23 22:34:39 +01:00
parent 0d86e4c4f9
commit 3924fd79d2
10 changed files with 260 additions and 204 deletions

View File

@@ -66,7 +66,7 @@ const filteredCategories = computed(() => {
<template>
<UDashboardSlideover v-model="isHelpSlideoverOpen">
<template #title>
<!-- <template #title>
<UButton
v-if="shortcuts"
color="gray"
@@ -102,6 +102,6 @@ const filteredCategories = computed(() => {
</div>
<div v-else class="flex flex-col gap-y-3">
<UButton v-for="(link, index) in links" :key="index" color="white" v-bind="link" />
</div>
</div>-->
</UDashboardSlideover>
</template>

View File

@@ -1,46 +0,0 @@
<script setup lang="ts">
const teams = [{
label: 'Nuxt',
/*avatar: {
src: 'https://avatars.githubusercontent.com/u/23360933?s=200&v=4'
},*/
click: () => {
team.value = teams[0]
}
}, {
label: 'NuxtLabs',
/*avatar: {
src: 'https://avatars.githubusercontent.com/u/62017400?s=200&v=4'
},*/
click: () => {
team.value = teams[1]
}
}]
const actions = [{
label: 'Create team',
icon: 'i-heroicons-plus-circle'
}, {
label: 'Manage teams',
icon: 'i-heroicons-cog-8-tooth'
}]
const team = ref(teams[0])
</script>
<template>
<UDropdown
v-slot="{ open }"
mode="hover"
:items="[teams]"
class="w-full"
:ui="{ width: 'w-full' }"
:popper="{ strategy: 'absolute' }"
>
<UButton color="gray" variant="ghost" :class="[open && 'bg-gray-50 dark:bg-gray-800']" class="w-full">
<UAvatar v-if="team.avatar" :src="team.avatar.src" size="2xs" />
<span class="truncate text-gray-900 dark:text-white font-semibold">{{ team.label }}</span>
</UButton>
</UDropdown>
</template>

View File

@@ -0,0 +1,25 @@
<script setup>
const dataStore = useDataStore()
const tenants = ref(dataStore.getOwnProfile ? dataStore.getOwnProfile.tenants : [])
const tenant = ref(dataStore.currentTenant)
</script>
<template>
<USelectMenu
:options="tenants"
value-attribute="id"
option-attribute="name"
class="w-40"
@change="dataStore.changeTenant"
v-model="dataStore.currentTenant"
>
<UButton color="gray" variant="ghost" :class="[open && 'bg-gray-50 dark:bg-gray-800']" class="w-full">
<UAvatar :alt="tenants.find(i => i.id === dataStore.currentTenant).name" size="md" />
<span class="truncate text-gray-900 dark:text-white font-semibold">{{ tenants.find(i => i.id === dataStore.currentTenant).name }}</span>
</UButton>
</USelectMenu>
</template>

View File

@@ -13,25 +13,25 @@ const items = computed(() => [
label: '',
disabled: true
}], [{
label: 'Settings',
label: 'Einstellungen',
icon: 'i-heroicons-cog-8-tooth',
to: '/settings'
}, {
label: 'Command menu',
label: 'Suche',
icon: 'i-heroicons-command-line',
shortcuts: [metaSymbol.value, 'K'],
click: () => {
isDashboardSearchModalOpen.value = true
}
}, {
label: 'Help & Support',
label: 'Hilfe & Support',
icon: 'i-heroicons-question-mark-circle',
shortcuts: ['?'],
click: () => isHelpSlideoverOpen.value = true
}], [{
label: 'Documentation',
label: 'Webseite',
icon: 'i-heroicons-book-open',
to: 'https://ui.nuxt.com/pro/guide',
to: 'https://spaces.software',
target: '_blank'
},/* {
label: 'GitHub repository',