Files
vmall/apps/mall/components/shell/TopBar.vue
T
james 9904696e76 feat: wave 2 migration (P3, P5, P7 openspec changes)
Implements, verifies, and archives the three remaining Wave 2 changes from
openspec/MIGRATION-PLAN.md.

- add-wallet-settlement (P3): demo recharge, guarded withdrawal freeze and
  one-time admin review, paginated own fund entries, idempotent per-shop
  weekly/monthly settlement statements with commission rate and one-time
  payout confirmation.
- add-merchant-onboarding (P5): personal/enterprise applications with one live
  application per user, guarded review with mandatory rejection reason, and
  transactional shop + owner provisioning returning one-time credentials;
  mall onboarding/status pages and an admin review console.
- add-membership-messaging (P7): platform member levels, append-only growth
  accrual on order completion with guarded one-way leveling, order/shipment/
  refund system messages with unread/read state and soft deletion, plus the
  mall header unread badge.

Backend: migrations 0019-0023, new wallet, settlement, merchant_onboarding,
membership and messaging modules, event hooks in order/fulfillment/aftersale,
and integration suites for each. Shared contract extended and all three
frontends updated; code indexes, domain docs, backend guidelines and the
migration tracker synced.

Verification: cargo test -p vmall-api green twice consecutively; mall, admin
and shop-admin builds pass; browser smoke on every new surface; openspec
validate --all --strict green (33 passed).

The three changes share the @vmall/shared contract, the mall mock adapter and
per-app locale/nav files, so they are committed together to keep every commit
buildable.
2026-09-25 15:25:29 +00:00

95 lines
3.5 KiB
Vue

<script setup lang="ts">
const session = useSessionStore();
const { t } = useI18n();
</script>
<template>
<div class="border-border text-muted h-[30px] border-b bg-[#f9f9f9] text-[12px] leading-[30px]">
<div class="max-w-mall mx-auto flex h-full items-center justify-between px-4">
<ul class="flex items-center">
<li>
<NuxtLink to="/" class="hover:text-primary px-1">{{ t("shell.officialSite") }}</NuxtLink>
</li>
<li class="text-border px-1">|</li>
<li>
<NuxtLink to="/" class="hover:text-primary px-1">{{ t("shell.mallHome") }}</NuxtLink>
</li>
<li class="text-border px-1">|</li>
<li>
<NuxtLink to="/" class="hover:text-primary px-1">{{ t("shell.contact") }}</NuxtLink>
</li>
<li class="text-border px-1">|</li>
<li>
<NuxtLink to="/" class="hover:text-primary px-1">{{ t("shell.about") }}</NuxtLink>
</li>
<li class="text-border px-1">|</li>
<li class="text-primary px-1">{{ t("shell.city") }}</li>
</ul>
<ul class="flex items-center">
<!-- The token lives in localStorage, so the server cannot know whether
anyone is signed in. Rendering this branch client-only keeps the
hydrated DOM in step with the server's logged-out markup; without
it, validating the session before hydration reports mismatches. -->
<ClientOnly>
<template v-if="session.isLoggedIn">
<li class="px-1">
{{ t("shell.welcome") }}
<NuxtLink to="/user" class="text-primary hover:text-primary-hover">{{
session.user?.display_name
}}</NuxtLink>
</li>
<li class="text-border px-1">|</li>
<li>
<NuxtLink to="/user" class="hover:text-primary px-1">{{
t("shell.userCenter")
}}</NuxtLink>
</li>
<li class="text-border px-1">|</li>
<li class="hover:text-primary cursor-pointer px-1" @click="session.logout()">
{{ t("shell.logout") }}
</li>
</template>
<template v-else>
<li>
<NuxtLink to="/login" class="text-primary hover:text-primary-hover px-1">{{
t("shell.login")
}}</NuxtLink>
</li>
<li>
<NuxtLink to="/register" class="hover:text-primary px-1">{{
t("shell.register")
}}</NuxtLink>
</li>
</template>
<template #fallback>
<li>
<NuxtLink to="/login" class="text-primary hover:text-primary-hover px-1">{{
t("shell.login")
}}</NuxtLink>
</li>
<li>
<NuxtLink to="/register" class="hover:text-primary px-1">{{
t("shell.register")
}}</NuxtLink>
</li>
</template>
</ClientOnly>
<li class="text-border px-1">|</li>
<li>
<NuxtLink to="/merchant/join" class="text-primary hover:text-primary-hover px-1">{{
t("shell.sellerJoin")
}}</NuxtLink>
</li>
<li class="text-border px-1">|</li>
<li>
<NuxtLink to="/" class="hover:text-primary px-1">{{ t("shell.mobile") }}</NuxtLink>
</li>
<li class="text-border px-1">|</li>
<li>
<NuxtLink to="/" class="hover:text-primary px-1">{{ t("shell.appDownload") }}</NuxtLink>
</li>
</ul>
</div>
</div>
</template>