forked from bai/curriculum-project-hub
chore(filelib-web): 文件库权限名称汉化(VIEW/EDIT/MANAGE → 只读/可编辑/可管理)
统一走新增共享常量 labels.ts ROLE_LABEL(与 OverviewPanel 既有文案一致); 覆盖授权表格与弹窗下拉、详情头 tag、树节点角标;API 传参仍用英文枚举。
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { api } from "./api.js";
|
||||
import { expanded, currentNode, breadcrumb, toggleExpanded, treeVersion } from "./browser.js";
|
||||
import { toastErr } from "./stores.js";
|
||||
import { ROLE_LABEL } from "./labels.js";
|
||||
import type { BreadcrumbEntry, NodeChild, NodeDetail } from "./types.js";
|
||||
|
||||
let { node, depth }: { node: NodeChild; depth: number } = $props();
|
||||
@@ -64,7 +65,7 @@
|
||||
</span>
|
||||
<span class="truncate">{node.name}</span>
|
||||
{#if node.role !== "MANAGE"}
|
||||
<span class="ml-auto pr-1 font-mono text-[10px] text-ink-3">{node.role}</span>
|
||||
<span class="ml-auto pr-1 text-[10px] text-ink-3">{ROLE_LABEL[node.role]}</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user