Compare commits
1 Commits
e54e0c4cf3
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 110cd52a95 |
11
app/components/dashboard/settings/nav_header.vue
Normal file
11
app/components/dashboard/settings/nav_header.vue
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const items = [
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<
|
||||||
|
</template>
|
||||||
67
app/layouts/dash_settings.vue
Normal file
67
app/layouts/dash_settings.vue
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import type { NavigationMenuItem } from '@nuxt/ui'
|
||||||
|
|
||||||
|
const nav : NavigationMenuItem[][] = [[
|
||||||
|
{
|
||||||
|
label: 'Home',
|
||||||
|
icon: 'i-lucide-house',
|
||||||
|
to: "/dashboard"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Notifications',
|
||||||
|
icon: 'solar:chat-round-unread-outline',
|
||||||
|
badge: '4',
|
||||||
|
to: "/events"
|
||||||
|
}, {
|
||||||
|
label: 'Settings',
|
||||||
|
icon: 'i-lucide-settings',
|
||||||
|
//to: '/settings',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: "General",
|
||||||
|
icon: "solar:settings-minimalistic-broken",
|
||||||
|
to: "/settings",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Profile",
|
||||||
|
icon: "solar:user-broken",
|
||||||
|
to: "/settings/profile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Theme",
|
||||||
|
icon: "solar:pallete-2-broken",
|
||||||
|
to: "/settings/theme"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}]
|
||||||
|
];
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const title = ref("...");
|
||||||
|
|
||||||
|
watch(route, (newVal, oldVal) => {
|
||||||
|
title.value = (newVal.meta.title as string) || "Settings";
|
||||||
|
}, {immediate: true});
|
||||||
|
//const title = pageMeta.title || "Settings"
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
ui_color_cookie();
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<UDashboardGroup>
|
||||||
|
<DashboardSidebar class="bg-(--sidebar-bg)" collapsible :resizable="undefined" :items="nav"/>
|
||||||
|
|
||||||
|
<UDashboardSidebarCollapse />
|
||||||
|
|
||||||
|
<UContainer class="max-w-full overflow-auto">
|
||||||
|
<DashboardHeader :title="title"/>
|
||||||
|
<UNavigationMenu :items="nav[0][2].children" />
|
||||||
|
<!-- in my case I want the button to be the same everywhere.
|
||||||
|
if you wanna customize it per page, place it per page inside UContainer -->
|
||||||
|
<!--<UDashboardSidebarToggle variant="subtle" class="absolute z-20 top-3 left-2.5"/>-->
|
||||||
|
<slot />
|
||||||
|
</UContainer>
|
||||||
|
</UDashboardGroup>
|
||||||
|
</template>>
|
||||||
@@ -1,30 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "dashboard"
|
layout: "dash-settings",
|
||||||
|
title: "Settings"
|
||||||
})
|
})
|
||||||
const settings_submenu = ref([
|
|
||||||
{
|
|
||||||
label: "Profile",
|
|
||||||
icon: "i-lucide-user-round",
|
|
||||||
to: "/settings/profile"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Security",
|
|
||||||
icon: "i-lucide-lock",
|
|
||||||
to: "/settings/security"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Aspect",
|
|
||||||
icon: "i-lucide-palette",
|
|
||||||
to: "/settings/ui"
|
|
||||||
}
|
|
||||||
])
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DashboardHeader title="Settings" />
|
|
||||||
|
|
||||||
<UNavigationMenu :items="settings_submenu" />
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "dashboard"
|
layout: "dash-settings"
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DashboardHeader title="Profile" />
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "dashboard"
|
layout: "dash-settings"
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DashboardHeader title="Security" />
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
import type {CookieRef} from "#app";
|
import type {CookieRef} from "#app";
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "dashboard"
|
layout: "dash-settings",
|
||||||
|
title: "Customization"
|
||||||
})
|
})
|
||||||
|
|
||||||
const colors_list = ref(["Cyan","Red","Green","Blue","Purple"])
|
const colors_list = ref(["Cyan","Red","Green","Blue","Purple"])
|
||||||
@@ -26,7 +27,6 @@ watch(color, (newVal, oldVal) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DashboardHeader title="Customization" />
|
|
||||||
|
|
||||||
<UContainer class="mt-4 max-w-full justify-center">
|
<UContainer class="mt-4 max-w-full justify-center">
|
||||||
<UFormField
|
<UFormField
|
||||||
|
|||||||
Reference in New Issue
Block a user