feat(frontend): migrate admin UI to role-site model and clean legacy pages

This commit is contained in:
Chris
2026-04-03 00:18:39 +08:00
parent bcf4a43769
commit c9d05531f8
22 changed files with 789 additions and 1489 deletions

View File

@@ -2,22 +2,16 @@
<div class="min-h-screen bg-gray-50">
<header v-if="showNav" class="bg-white border-b border-gray-200 sticky top-0 z-50 shadow-sm">
<div class="max-w-7xl mx-auto px-6 flex items-center justify-between h-14">
<!-- Logo 之後換圖 -->
<div class="flex-shrink-0 w-36">
<span class="text-sm font-semibold text-gray-700 tracking-wide">member.ose.tw</span>
</div>
<!-- Tab 導覽 -->
<nav class="flex items-stretch h-full overflow-x-auto gap-0 flex-1 min-w-0">
<NavTab v-for="tab in userTabs" :key="tab.to" :to="tab.to">{{ tab.label }}</NavTab>
<span class="self-center mx-3 text-gray-200 select-none text-lg">|</span>
<NavTab v-for="tab in adminTabs" :key="tab.to" :to="tab.to">{{ tab.label }}</NavTab>
</nav>
<!-- 右側登出 -->
<div class="flex-shrink-0 ml-4">
<button
@click="logout"
@@ -26,7 +20,6 @@
登出
</button>
</div>
</div>
</header>
@@ -52,20 +45,18 @@ const showNav = computed(() => {
const userTabs = [
{ to: '/me', label: '我的資料' },
{ to: '/me/permissions', label: '我的權限' }
{ to: '/me/permissions', label: '我的角色' }
]
const adminTabs = [
{ to: '/admin/systems', label: '系統' },
{ to: '/admin/modules', label: '模組' },
{ to: '/admin/companies', label: '公司' },
{ to: '/admin/sites', label: '站台' },
{ to: '/admin/systems', label: '系統' },
{ to: '/admin/roles', label: '角色' },
{ to: '/admin/members', label: '會員' },
{ to: '/admin/permission-groups', label: '群組' },
{ to: '/admin/api-clients', label: 'API Clients' }
]
// 行內 NavTab 元件:避免另開檔案
const NavTab = defineComponent({
props: { to: String },
setup(props, { slots }) {