feat: ✨ move org name and logo to db #56
@@ -5,8 +5,6 @@ import { Menu, Search, X, Home, Server, Grid3x3, Settings, SlidersHorizontal, Us
|
|||||||
import { useAuthStore } from "@/stores/auth";
|
import { useAuthStore } from "@/stores/auth";
|
||||||
import { api } from "@/api";
|
import { api } from "@/api";
|
||||||
|
|
||||||
const RELEASES_URL = "https://git.jdbnet.co.uk/jamie/ipam/releases";
|
|
||||||
|
|
||||||
const auth = useAuthStore();
|
const auth = useAuthStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -102,16 +100,11 @@ onUnmounted(() => {
|
|||||||
class="fixed inset-y-0 left-0 z-50 flex h-full w-64 shrink-0 flex-col border-r border-slate-200 bg-surface-raised transition-transform dark:border-slate-800 lg:static lg:h-screen lg:translate-x-0"
|
class="fixed inset-y-0 left-0 z-50 flex h-full w-64 shrink-0 flex-col border-r border-slate-200 bg-surface-raised transition-transform dark:border-slate-800 lg:static lg:h-screen lg:translate-x-0"
|
||||||
:class="sidebarOpen ? 'translate-x-0' : '-translate-x-full'"
|
:class="sidebarOpen ? 'translate-x-0' : '-translate-x-full'"
|
||||||
>
|
>
|
||||||
<div class="flex shrink-0 items-center gap-3 border-b border-slate-200 p-4 dark:border-slate-800">
|
<div class="flex h-14 shrink-0 items-center gap-2.5 border-b border-slate-200 px-4 dark:border-slate-800">
|
||||||
<img v-if="auth.org.logo" :src="auth.org.logo" alt="" class="h-8 rounded" />
|
<img v-if="auth.org.logo" :src="auth.org.logo" alt="" class="h-7 shrink-0 rounded" />
|
||||||
<div class="min-w-0 flex-1">
|
<div class="min-w-0 flex-1 leading-tight">
|
||||||
<div class="truncate text-sm font-semibold">{{ auth.org.name }} IPAM</div>
|
<div class="truncate text-sm font-semibold">{{ auth.org.name }} IPAM</div>
|
||||||
<a
|
<div class="text-xs text-slate-500">{{ auth.version }}</div>
|
||||||
:href="RELEASES_URL"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
class="text-xs text-slate-500 hover:text-accent hover:underline"
|
|
||||||
>{{ auth.version }}</a>
|
|
||||||
</div>
|
</div>
|
||||||
<button class="lg:hidden" @click="sidebarOpen = false"><X class="h-5 w-5" /></button>
|
<button class="lg:hidden" @click="sidebarOpen = false"><X class="h-5 w-5" /></button>
|
||||||
</div>
|
</div>
|
||||||
@@ -138,7 +131,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
<!-- Main -->
|
<!-- Main -->
|
||||||
<div class="flex min-h-0 min-w-0 flex-1 flex-col">
|
<div class="flex min-h-0 min-w-0 flex-1 flex-col">
|
||||||
<header class="flex shrink-0 items-center gap-3 border-b border-slate-200 bg-surface-raised px-4 py-3 dark:border-slate-800">
|
<header class="flex h-14 shrink-0 items-center gap-3 border-b border-slate-200 bg-surface-raised px-4 dark:border-slate-800">
|
||||||
<button class="lg:hidden" @click="sidebarOpen = true"><Menu class="h-6 w-6" /></button>
|
<button class="lg:hidden" @click="sidebarOpen = true"><Menu class="h-6 w-6" /></button>
|
||||||
<span class="font-semibold lg:hidden">{{ auth.org.name }} IPAM</span>
|
<span class="font-semibold lg:hidden">{{ auth.org.name }} IPAM</span>
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user