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
+25 -10
View File
@@ -26,29 +26,45 @@ const menuGroups = computed(() => [
]);
function isActive(to: string): boolean {
return to === "/user" ? route.path === "/user" : route.path === to || route.path.startsWith(`${to}/`);
return to === "/user"
? route.path === "/user"
: route.path === to || route.path.startsWith(`${to}/`);
}
</script>
<template>
<div class="min-h-screen bg-bg py-8 pb-16 font-sans text-text">
<div class="mx-auto grid w-full max-w-mall gap-5 px-4 lg:grid-cols-[234px_minmax(0,1fr)] lg:items-start">
<div class="bg-bg text-text min-h-screen py-8 pb-16 font-sans">
<div
class="max-w-mall mx-auto grid w-full gap-5 px-4 lg:grid-cols-[234px_minmax(0,1fr)] lg:items-start"
>
<VCard :padded="false" class="min-h-[560px] pb-5">
<div class="flex items-center gap-3 border-b border-border px-4 py-5">
<img class="h-[54px] w-[54px] rounded-full object-cover" src="/mock/avatar.svg" :alt="t('user.title')" />
<div class="border-border flex items-center gap-3 border-b px-4 py-5">
<img
class="h-[54px] w-[54px] rounded-full object-cover"
src="/mock/avatar.svg"
:alt="t('user.title')"
/>
<div class="min-w-0">
<!-- Session lives in localStorage, so the name is unknown at SSR time. -->
<ClientOnly><strong class="block truncate text-sm text-text">{{ session.user?.display_name }}</strong></ClientOnly>
<NuxtLink class="mt-2 inline-block text-xs text-muted no-underline hover:text-primary" to="/user">{{ t("user.editProfile") }}</NuxtLink>
<ClientOnly
><strong class="text-text block truncate text-sm">{{
session.user?.display_name
}}</strong></ClientOnly
>
<NuxtLink
class="text-muted hover:text-primary mt-2 inline-block text-xs no-underline"
to="/user"
>{{ t("user.editProfile") }}</NuxtLink
>
</div>
</div>
<nav v-for="group in menuGroups" :key="group.title" class="pt-[18px]">
<h2 class="mb-2 px-5 text-[13px] font-semibold text-muted">{{ group.title }}</h2>
<h2 class="text-muted mb-2 px-5 text-[13px] font-semibold">{{ group.title }}</h2>
<NuxtLink
v-for="item in group.items"
:key="item.to"
:to="item.to"
class="block border-l-[3px] border-transparent px-5 py-2.5 text-[13px] text-text no-underline hover:bg-primary-soft hover:text-primary"
class="text-text hover:bg-primary-soft hover:text-primary block border-l-[3px] border-transparent px-5 py-2.5 text-[13px] no-underline"
:class="isActive(item.to) ? 'border-primary bg-primary-soft text-primary' : ''"
>
{{ item.label }}
@@ -61,4 +77,3 @@ function isActive(to: string): boolean {
</div>
</div>
</template>