Compare commits

...

5 Commits

Author SHA1 Message Date
211fa2982a UHeader added 2025-12-08 18:29:23 +00:00
45d18746d0 UHeader added 2025-12-08 18:29:21 +00:00
7e199c1ce2 UContainer added 2025-12-08 18:29:10 +00:00
0d7f09b807 UAuthPage 2025-12-08 18:28:52 +00:00
a4d97c4ef2 added settings 2025-12-08 18:28:15 +00:00
5 changed files with 72 additions and 13 deletions

View File

@@ -5,7 +5,6 @@ const nav : NavigationMenuItem[][] = [[
{
label: 'Home',
icon: 'i-lucide-house',
active: true,
to: "/dashboard"
}, {
label: 'Inbox',
@@ -16,7 +15,11 @@ const nav : NavigationMenuItem[][] = [[
label: 'Contacts',
icon: 'i-lucide-users',
to: "/contacts"
}]];
}, {
label: 'Settings',
icon: 'i-lucide-settings',
to: '/settings'
}]];
/*[
{
label: "Feedback"
@@ -28,6 +31,11 @@ const nav : NavigationMenuItem[][] = [[
<DashboardSidebar collapsible resizable :items="nav"/>
<UDashboardSidebarCollapse />
<UContainer class="overflow-auto">
<!-- 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>

15
app/layouts/default.vue Normal file
View File

@@ -0,0 +1,15 @@
<script setup lang="ts">
</script>
<template>
<!-- the whole content must be in a UContainer -->
<!-- overflow auto allows scroll -->
<UContainer class="overflow-auto">
<slot />
</UContainer>
</template>
<style scoped>
</style>

View File

@@ -122,15 +122,16 @@ import { h } from 'vue'
</script>
<template>
<!-- overflow-auto necessary for scroll-->
<UContainer class="overflow-auto">
<UDashboardSidebarToggle variant="subtle" class="absolute z-20 top-3 left-2.5"/>
<div class="mt-1 mb-3 flex flex-col w-full relative z-0">
<UHeader title="Dashboard" toggle-side="left" >
<template #toggle>
<UDashboardSidebarToggle />
<UDashboardSidebarToggle />
</template>
</UHeader>
<div class="mt-3 mb-3 flex flex-col w-full relative z-0">
<ProseH2 class="text-center m-0.5 w-full">Hey there, user!</ProseH2>
<ProseP class="text-center text-muted m-0.5">Welcome to the UI!</ProseP>
<UBadge variant="subtle" class="inline mx-auto">It's cool, isn't it ?</UBadge>
<UBadge variant="subtle" color="success" class="inline mx-auto">It's cool, isn't it ?</UBadge>
</div>
<!--<div class="mx-auto max-w-220">-->
@@ -152,7 +153,6 @@ import { h } from 'vue'
<UFooter>
<p>footer</p>
</UFooter>
</UContainer>
</template>
<style scoped>

View File

@@ -67,7 +67,6 @@ async function sendLogin() {
</script>
<template>
<UContainer class="overflow-auto">
<div class="flex flex-col items-center justify-center gap-4 p-4">
<UPageCard class="w-full max-w-md">
<UAuthForm
@@ -81,7 +80,6 @@ async function sendLogin() {
/>
</UPageCard>
</div>
</UContainer>
</template>
<style scoped>

38
app/pages/settings.vue Normal file
View File

@@ -0,0 +1,38 @@
<script setup lang="ts">
definePageMeta({
layout: "dashboard"
})
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>
<template>
<UHeader toggle-side="left" class="justify-center text-center" title="Settings">
<template #toggle>
<UDashboardSidebarToggle />
<!-- <UDashboardSidebarCollapse /> -->
</template>
</UHeader>
<UNavigationMenu :items="settings_submenu" />
</template>
<style scoped>
</style>