refactor: ♻️ Finish rewrite and delete old settings backend

This commit is contained in:
Jesse Wierzbinski 2025-05-01 01:45:46 +02:00
parent 3ce71dd4df
commit 34ce25cc1d
No known key found for this signature in database
50 changed files with 472 additions and 1538 deletions

View file

@ -1,5 +1,11 @@
<script setup lang="ts">
import { ChevronsUpDown, DownloadCloud, Pen, UserPlus } from "lucide-vue-next";
import {
ChevronsUpDown,
Cog,
DownloadCloud,
Pen,
UserPlus,
} from "lucide-vue-next";
import TinyCard from "~/components/profiles/tiny-card.vue";
import { Button } from "~/components/ui/button";
import {
@ -37,6 +43,10 @@ const { $pwa } = useNuxtApp();
{{ m.salty_aloof_turkey_nudge() }}
</span>
</Button>
<Button v-if="identity" size="lg" variant="secondary" @click="useEvent('preferences:open')">
<Cog />
Preferences
</Button>
<Button v-if="$pwa?.needRefresh" variant="destructive" size="lg"
class="w-full group-data-[collapsible=icon]:px-4" @click="$pwa?.updateServiceWorker(true)">
<DownloadCloud />

View file

@ -14,12 +14,6 @@
"
/>
</SidebarGroup>
<SidebarGroup v-if="identity" class="mt-auto">
<SidebarGroupLabel>{{
m.close_short_kitten_coax()
}}</SidebarGroupLabel>
<NavGroup :items="sidebarConfig.navMain" />
</SidebarGroup>
</SidebarContent>
<FooterActions />
<SidebarRail />
@ -38,6 +32,5 @@ import {
import * as m from "~/paraglide/messages.js";
import FooterActions from "./footer/footer-actions.vue";
import InstanceHeader from "./instance/instance-header.vue";
import NavGroup from "./navigation/nav-group.vue";
import NavItems from "./navigation/nav-items.vue";
</script>

View file

@ -1,44 +1,9 @@
import {
BedSingle,
Bell,
Globe,
House,
MapIcon,
Settings2,
} from "lucide-vue-next";
import { BedSingle, Bell, Globe, House, MapIcon } from "lucide-vue-next";
import * as m from "~/paraglide/messages.js";
import type { SidebarConfig } from "~/types/sidebar";
export const sidebarConfig: SidebarConfig = {
navMain: [
{
title: m.patchy_seemly_hound_grace(),
url: "/preferences",
icon: Settings2,
items: [
{
title: m.factual_arable_jurgen_endure(),
url: "/preferences/account",
},
{
title: m.tough_clean_wolf_gleam(),
url: "/preferences/appearance",
},
{
title: m.legal_best_tadpole_rise(),
url: "/preferences/behaviour",
},
{
title: m.novel_trite_sloth_adapt(),
url: "/preferences/emojis",
},
{
title: m.safe_green_mink_cook(),
url: "/preferences/roles",
},
],
},
],
navMain: [],
other: [
{
title: m.bland_chunky_sparrow_propel(),