mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 11:39:16 +01:00
refactor: 🔥 Clean up codebase
This commit is contained in:
parent
1b5e7a6575
commit
ee8c543cd9
24 changed files with 25 additions and 391 deletions
|
|
@ -66,9 +66,6 @@
|
|||
</SidebarContent>
|
||||
<SidebarFooter>
|
||||
<SidebarMenu class="gap-3">
|
||||
<SidebarMenuItem>
|
||||
<ThemeSwitcher />
|
||||
</SidebarMenuItem>
|
||||
<SidebarMenuItem>
|
||||
<AccountSwitcher />
|
||||
</SidebarMenuItem>
|
||||
|
|
@ -125,7 +122,6 @@ import {
|
|||
import Avatar from "../profiles/avatar.vue";
|
||||
import { Button } from "../ui/button";
|
||||
import AccountSwitcher from "./account-switcher.vue";
|
||||
import ThemeSwitcher from "./theme-switcher.vue";
|
||||
|
||||
const data = {
|
||||
navMain: [
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
<template>
|
||||
<Tabs.Root v-model="tab" class="bg-dark-700 h-full overflow-auto pb-20">
|
||||
<Tabs.List class="flex flex-row p-4 gap-4 bg-dark-800 relative ring-1 ring-white/5 overflow-x-auto">
|
||||
<Tabs.Trigger :value="page"
|
||||
v-for="page of SettingPages"
|
||||
:as-child="true">
|
||||
<ButtonBase class="capitalize hover:bg-white/5">
|
||||
{{ page }}
|
||||
</ButtonBase>
|
||||
</Tabs.Trigger>
|
||||
<Tabs.Indicator class="h-1 bg-gray-300 w-[--width] top-0 rounded-b" />
|
||||
</Tabs.List>
|
||||
<Tabs.Content :value="page" v-for="page of SettingPages">
|
||||
<slot :name="page" />
|
||||
</Tabs.Content>
|
||||
</Tabs.Root>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Tabs } from "@ark-ui/vue";
|
||||
import ButtonBase from "~/packages/ui/components/buttons/button.vue";
|
||||
import { SettingPages } from "~/settings";
|
||||
|
||||
const tab = ref<SettingPages>(
|
||||
(window.location.hash.slice(1) as SettingPages) || SettingPages.Account,
|
||||
);
|
||||
|
||||
// Update page hash when tab changes
|
||||
watch(
|
||||
tab,
|
||||
(value) => {
|
||||
window.location.hash = value;
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue