wip(freight): migration 0017 + model/column-list groundwork for add-freight-templates

This commit is contained in:
Chengdong Zhang
2026-09-23 17:39:45 +08:00
parent a83e857bdf
commit 5b426486ac
105 changed files with 6193 additions and 1566 deletions
+15 -9
View File
@@ -25,18 +25,20 @@ const navItems = [
</script>
<template>
<div v-if="isAuthPage" class="min-h-screen bg-bg font-sans text-text">
<div v-if="isAuthPage" class="bg-bg text-text min-h-screen font-sans">
<NuxtPage />
</div>
<div v-else class="min-h-screen bg-bg font-sans text-text md:flex">
<aside class="w-full shrink-0 border-b border-border bg-surface p-4 md:min-h-screen md:w-60 md:border-b-0 md:border-r">
<div class="mb-6 text-lg font-bold text-primary">{{ $t("common.appName") }} · Admin</div>
<div v-else class="bg-bg text-text min-h-screen font-sans md:flex">
<aside
class="border-border bg-surface w-full shrink-0 border-b p-4 md:min-h-screen md:w-60 md:border-r md:border-b-0"
>
<div class="text-primary mb-6 text-lg font-bold">{{ $t("common.appName") }} · Admin</div>
<nav class="grid gap-1" aria-label="Admin navigation">
<NuxtLink
v-for="item in navItems"
:key="item.to"
:to="item.to"
class="rounded-md px-3 py-2 text-sm font-medium text-muted transition-colors hover:bg-primary-soft hover:text-primary"
class="text-muted hover:bg-primary-soft hover:text-primary rounded-md px-3 py-2 text-sm font-medium transition-colors"
:class="route.path === item.to ? 'bg-primary-soft text-primary' : ''"
>
{{ $t(item.label) }}
@@ -44,10 +46,12 @@ const navItems = [
</nav>
</aside>
<main class="min-w-0 flex-1">
<header class="flex flex-wrap items-center justify-end gap-3 border-b border-border bg-surface px-4 py-3 md:px-6">
<header
class="border-border bg-surface flex flex-wrap items-center justify-end gap-3 border-b px-4 py-3 md:px-6"
>
<select
:value="locale"
class="rounded-md border border-border bg-surface px-3 py-2 text-sm text-text focus:border-primary focus:outline-2 focus:outline-primary/30"
class="border-border bg-surface text-text focus:border-primary focus:outline-primary/30 rounded-md border px-3 py-2 text-sm focus:outline-2"
:aria-label="$t('common.language')"
@change="setLocale(($event.target as HTMLSelectElement).value as 'en' | 'zh')"
>
@@ -55,10 +59,12 @@ const navItems = [
</select>
<VAccentSwatch />
<template v-if="session.isLoggedIn">
<span class="text-sm text-muted">{{ session.user?.display_name }}</span>
<span class="text-muted text-sm">{{ session.user?.display_name }}</span>
<VBtn size="sm" @click="session.logout()">{{ $t("common.logout") }}</VBtn>
</template>
<VBtn v-else size="sm" variant="primary" @click="navigateTo('/login')">{{ $t("common.login") }}</VBtn>
<VBtn v-else size="sm" variant="primary" @click="navigateTo('/login')">{{
$t("common.login")
}}</VBtn>
</header>
<div class="mx-auto w-full max-w-7xl px-4 md:px-6">
<NuxtPage />