Initial work on SettingLayout #174
This commit is contained in:
@@ -2,13 +2,15 @@
|
|||||||
import Heading from '@/components/Heading.vue';
|
import Heading from '@/components/Heading.vue';
|
||||||
import { Button } from '@/components/ui/crm-button';
|
import { Button } from '@/components/ui/crm-button';
|
||||||
import { Separator } from '@/components/ui/separator';
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { toUrl, urlIsActive } from '@/lib/utils';
|
import { cn, toUrl, urlIsActive } from '@/lib/utils';
|
||||||
import { edit as editAppearance } from '@/routes/appearance';
|
import { edit as editAppearance } from '@/routes/appearance';
|
||||||
import { edit as editPassword } from '@/routes/password';
|
import { edit as editPassword } from '@/routes/password';
|
||||||
import { edit as editProfile } from '@/routes/profile';
|
import { edit as editProfile } from '@/routes/profile';
|
||||||
import { show } from '@/routes/two-factor';
|
import { show } from '@/routes/two-factor';
|
||||||
import { type NavItem } from '@/types';
|
import { type NavItem } from '@/types';
|
||||||
import { Link } from '@inertiajs/vue3';
|
import { Link } from '@inertiajs/vue3';
|
||||||
|
import AppLayout from '@/layouts/AppLayout.vue'
|
||||||
|
import AppHeader from '@/components/AppHeader.vue'
|
||||||
|
|
||||||
const sidebarNavItems: NavItem[] = [
|
const sidebarNavItems: NavItem[] = [
|
||||||
{
|
{
|
||||||
@@ -33,19 +35,23 @@ const currentPath = typeof window !== undefined ? window.location.pathname : '';
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="px-4 py-6">
|
|
||||||
<Heading title="Settings" description="Manage your profile and account settings" />
|
<Head title="Einstellungen" />
|
||||||
|
|
||||||
|
<AppLayout title="Einstellungen">
|
||||||
|
|
||||||
|
<div class="mb-12 gap-4">
|
||||||
|
<Heading title="Einstellungen" description="Manage your profile and account settings" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row flex-wrap gap-4 bg-background shadow rounded-lg p-6">
|
||||||
|
|
||||||
<div class="flex flex-col lg:flex-row lg:space-x-12">
|
<div class="flex flex-col lg:flex-row lg:space-x-12">
|
||||||
<aside class="w-full max-w-xl lg:w-48">
|
<aside class="w-full max-w-xl lg:w-48">
|
||||||
<nav class="flex flex-col space-y-1 space-x-0">
|
<nav class="flex flex-col space-y-1 space-x-0">
|
||||||
<Button
|
<Button v-for="item in sidebarNavItems" :key="toUrl(item.href)" variant="ghost"
|
||||||
v-for="item in sidebarNavItems"
|
|
||||||
:key="toUrl(item.href)"
|
|
||||||
variant="ghost"
|
|
||||||
:class="['w-full justify-start', { 'bg-muted': urlIsActive(item.href, currentPath) }]"
|
:class="['w-full justify-start', { 'bg-muted': urlIsActive(item.href, currentPath) }]"
|
||||||
as-child
|
as-child>
|
||||||
>
|
|
||||||
<Link :href="item.href" prefetch>
|
<Link :href="item.href" prefetch>
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</Link>
|
</Link>
|
||||||
@@ -62,4 +68,6 @@ const currentPath = typeof window !== undefined ? window.location.pathname : '';
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</AppLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import Heading from '@/components/Heading.vue';
|
||||||
import PlaceholderPattern from '../components/PlaceholderPattern.vue';
|
import PlaceholderPattern from '../components/PlaceholderPattern.vue';
|
||||||
import AppLayout from '@/layouts/AppLayout.vue';
|
import AppLayout from '@/layouts/AppLayout.vue';
|
||||||
</script>
|
</script>
|
||||||
@@ -7,8 +8,7 @@ import AppLayout from '@/layouts/AppLayout.vue';
|
|||||||
|
|
||||||
<AppLayout title="Erfolge">
|
<AppLayout title="Erfolge">
|
||||||
<div>
|
<div>
|
||||||
<h1 class="text-xl">Kategorie</h1>
|
<Heading title="Kategorie" description="3 von 10 freigeschaltet" />
|
||||||
<h2 class="text-sm text-neutral-400 mb-4">3 von 10 freigeschaltet</h2>
|
|
||||||
|
|
||||||
<div class="flex flex-row flex-wrap gap-4">
|
<div class="flex flex-row flex-wrap gap-4">
|
||||||
<div v-for="n in 10" class="relative flex flex-col items-center">
|
<div v-for="n in 10" class="relative flex flex-col items-center">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const user = page.props.auth.user;
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<AppLayout title="Profile settings">
|
<!-- <AppLayout title="Profile settings"> -->
|
||||||
|
|
||||||
<SettingsLayout>
|
<SettingsLayout>
|
||||||
<div class="flex flex-col space-y-6">
|
<div class="flex flex-col space-y-6">
|
||||||
@@ -81,5 +81,5 @@ const user = page.props.auth.user;
|
|||||||
|
|
||||||
<DeleteUser />
|
<DeleteUser />
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
</AppLayout>
|
<!-- </AppLayout> -->
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user