fix: 前端设置存储保存分离、硬编码文案接入 i18n、C 端恢复隐私说明

Settings 存储卡片加提示说明不随保存生效;Install 文案迁入全局 locale;
ArtworkEdit 默认节点标题走 i18n;C 端本地化出库记录节点并恢复渲染隐私说明;
TraceCodePanel/Outbound 适配 outImages 去除 outImage 兼容。
This commit is contained in:
Nixevol
2026-07-09 13:14:37 +08:00
parent f712b16c1f
commit 07ebde0ec2
9 changed files with 121 additions and 92 deletions
+3 -1
View File
@@ -19,7 +19,9 @@
},
"timeline": {
"expandMedia": "View images ({n})",
"collapse": "Collapse"
"collapse": "Collapse",
"outboundTitle": "Outbound Record",
"outboundDesc": "Outbound photos for the physical item of this trace code."
},
"chain": {
"archiveNo": "Archive No.",
+3 -1
View File
@@ -19,7 +19,9 @@
},
"timeline": {
"expandMedia": "查看图片({n})",
"collapse": "收起图片"
"collapse": "收起图片",
"outboundTitle": "本件出库记录",
"outboundDesc": "该追溯码对应实物的出库实况记录。"
},
"chain": {
"archiveNo": "档案编号",
+17 -2
View File
@@ -197,9 +197,9 @@
<div v-for="(n, i) in data.timeline" :key="i" class="tl-item">
<div class="tl-dot" />
<div class="tl-body">
<div class="tl-title">{{ n.title }}</div>
<div class="tl-title">{{ nodeTitle(n) }}</div>
<div class="tl-meta muted">{{ [fmtDate(n.occurredAt), n.location].filter(Boolean).join(' · ') }}</div>
<div v-if="n.description" class="tl-desc">{{ n.description }}</div>
<div v-if="nodeDesc(n)" class="tl-desc">{{ nodeDesc(n) }}</div>
<template v-if="n.media?.length">
<button class="tl-toggle" @click="toggleNode(i)">
<span class="tl-toggle-ico" :class="{ open: expanded.has(i) }">▸</span>
@@ -325,6 +325,8 @@
<div v-else class="chain-empty muted">{{ t('chain.notOnchain') }}</div>
</section>
<p class="privacy-note muted">{{ t('privacy.note') }}</p>
<footer class="footer muted">
<span>{{ appName }}</span>
<span v-if="filingInfo">{{ filingInfo }}</span>
@@ -444,6 +446,13 @@ function safeUrl(v?: string): string {
function openViewer(items: any[], index: number) {
openMediaViewer(items.map((item) => ({ ...item, url: mediaUrl(item) })).filter((item) => item?.url), index);
}
// 系统合成的「本件出库记录」节点由后端标记 system=OUTBOUND_RECORD,标题/说明在此按语言本地化
function nodeTitle(n: { system?: string | null; title?: string | null }): string {
return n.system === 'OUTBOUND_RECORD' ? t('timeline.outboundTitle') : n.title || '';
}
function nodeDesc(n: { system?: string | null; description?: string | null }): string {
return n.system === 'OUTBOUND_RECORD' ? t('timeline.outboundDesc') : n.description || '';
}
function switchCert(step: number) {
const total = data.value?.certificates?.length || 0;
if (!total) return;
@@ -1362,6 +1371,12 @@ watch(
font-size: 13px;
padding: 8px 0;
}
.privacy-note {
margin: 16px 4px 0;
font-size: 12px;
line-height: 1.6;
text-align: center;
}
.footer {
display: flex;
flex-direction: column;