504 lines
14 KiB
HTML
504 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>EAPManageUI - 语言设置 (UI 重构基准)</title>
|
|
<style>
|
|
/* =========================================================================
|
|
:root 全量 Design Tokens 声明 (严格遵循 Material 3 / 系统设置设计规范)
|
|
HTML 内禁止散落硬编码色值,一律引用 var(--*)
|
|
========================================================================= */
|
|
:root {
|
|
/* ── 核心主题色 ── */
|
|
--color-primary: #3949AB;
|
|
--color-on-primary: #FFFFFF;
|
|
--color-primary-container: #EEF2FF;
|
|
--color-on-primary-container: #1A237E;
|
|
--color-primary-hover: rgba(57, 73, 171, 0.04);
|
|
--color-primary-glow: rgba(57, 73, 171, 0.12);
|
|
|
|
/* ── 表面与背景 ── */
|
|
--color-surface: #FFFFFF;
|
|
--color-surface-variant: #F8FAFC;
|
|
--color-background: #F1F5F9;
|
|
|
|
/* ── 文本语义色 ── */
|
|
--text-primary: #0F172A;
|
|
--text-secondary: #64748B;
|
|
--text-tertiary: #94A3B8;
|
|
--text-disabled: #CBD5E1;
|
|
|
|
/* ── 边框与分割线 ── */
|
|
--divider: #E2E8F0;
|
|
--outline: #CBD5E1;
|
|
--outline-focused: #3949AB;
|
|
|
|
/* ── 圆角阶梯 ── */
|
|
--corner-sm: 8px;
|
|
--corner-md: 12px;
|
|
--corner-lg: 16px;
|
|
--corner-pill: 999px;
|
|
|
|
/* ── 阴影阶梯 ── */
|
|
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
|
|
--shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
|
|
--shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
|
|
|
|
/* ── 间距规范 ── */
|
|
--spacing-xs: 4px;
|
|
--spacing-sm: 8px;
|
|
--spacing-md: 16px;
|
|
--spacing-lg: 24px;
|
|
--spacing-xl: 32px;
|
|
|
|
/* ── 字号与行高阶梯 ── */
|
|
--font-title: 20px;
|
|
--font-subtitle: 16px;
|
|
--font-body: 15px;
|
|
--font-caption: 13px;
|
|
--font-badge: 12px;
|
|
|
|
/* ── 尺寸与栅格 ── */
|
|
--content-max-width: 1160px;
|
|
--content-gutter: clamp(16px, 2.5vw, 32px);
|
|
--appbar-height: 60px;
|
|
--row-height: 54px;
|
|
--touch-min: 48px;
|
|
--sidebar-width: 360px;
|
|
}
|
|
|
|
/* =========================================================================
|
|
基础排版与重置
|
|
========================================================================= */
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html {
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
|
font-size: var(--font-body);
|
|
color: var(--text-primary);
|
|
background: var(--color-background);
|
|
min-height: 100vh;
|
|
padding: var(--content-gutter);
|
|
font-variant-numeric: tabular-nums;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* =========================================================================
|
|
平板视口容器模拟 (高分辨率大屏动态自适应体系)
|
|
========================================================================= */
|
|
.screen-container {
|
|
width: 100%;
|
|
max-width: var(--content-max-width);
|
|
margin: 0 auto;
|
|
background: var(--color-surface);
|
|
border-radius: var(--corner-lg);
|
|
border: 1px solid var(--divider);
|
|
box-shadow: var(--shadow-lg);
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 640px;
|
|
}
|
|
|
|
/* =========================================================================
|
|
AppBar 顶部栏统一规范 (40dp 纯净透明触控槽 + Hover 微圆底)
|
|
========================================================================= */
|
|
.appbar {
|
|
height: var(--appbar-height);
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 20px;
|
|
background: var(--color-surface);
|
|
border-bottom: 1px solid var(--divider);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.appbar-nav {
|
|
width: 40px;
|
|
height: 40px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
background: transparent;
|
|
border: none;
|
|
transition: all 0.15s ease;
|
|
}
|
|
|
|
.appbar-nav:hover {
|
|
background: rgba(15, 23, 42, 0.06);
|
|
transform: scale(0.96);
|
|
}
|
|
|
|
.appbar-nav svg {
|
|
width: 22px;
|
|
height: 22px;
|
|
fill: var(--text-primary);
|
|
}
|
|
|
|
.appbar-title {
|
|
font-size: var(--font-title);
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin-left: 10px;
|
|
letter-spacing: -0.2px;
|
|
}
|
|
|
|
/* =========================================================================
|
|
Master-Detail 双栏主体排版 (统一 360px 1fr 比例)
|
|
========================================================================= */
|
|
.page-body {
|
|
flex: 1;
|
|
padding: clamp(20px, 2.5vw, 30px);
|
|
background: var(--color-background);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.master-detail-layout {
|
|
width: 100%;
|
|
display: grid;
|
|
grid-template-columns: 360px 1fr;
|
|
gap: clamp(16px, 2vw, 24px);
|
|
align-items: stretch;
|
|
}
|
|
|
|
/* ── 左侧面板:语言状态与概览 (Master/Summary Panel) ── */
|
|
.summary-sidebar {
|
|
background: var(--color-surface);
|
|
border-radius: var(--corner-lg);
|
|
border: 1px solid var(--divider);
|
|
box-shadow: var(--shadow-sm);
|
|
padding: var(--spacing-lg);
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.sidebar-icon-wrap {
|
|
width: 52px;
|
|
height: 52px;
|
|
border-radius: var(--corner-md);
|
|
background: var(--color-primary-container);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: var(--spacing-md);
|
|
}
|
|
|
|
.sidebar-icon-wrap svg {
|
|
width: 28px;
|
|
height: 28px;
|
|
fill: var(--color-primary);
|
|
}
|
|
|
|
.sidebar-title {
|
|
font-size: var(--font-subtitle);
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin-bottom: var(--spacing-xs);
|
|
}
|
|
|
|
.sidebar-desc {
|
|
font-size: var(--font-caption);
|
|
line-height: 1.5;
|
|
color: var(--text-secondary);
|
|
margin-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
.curr-status-card {
|
|
margin-top: auto;
|
|
background: var(--color-surface-variant);
|
|
border: 1px solid var(--divider);
|
|
border-radius: var(--corner-md);
|
|
padding: var(--spacing-md);
|
|
}
|
|
|
|
.curr-status-label {
|
|
font-size: var(--font-badge);
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: var(--spacing-xs);
|
|
}
|
|
|
|
.curr-status-value {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: var(--color-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.curr-status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: #10B981;
|
|
}
|
|
|
|
/* ── 右侧面板:语言选择列表 (Detail/Selection Panel) ── */
|
|
.selection-card {
|
|
flex: 1;
|
|
background: var(--color-surface);
|
|
border-radius: var(--corner-lg);
|
|
border: 1px solid var(--divider);
|
|
box-shadow: var(--shadow-sm);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.lang-list {
|
|
width: 100%;
|
|
}
|
|
|
|
.lang-row {
|
|
height: var(--row-height);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 var(--spacing-lg);
|
|
cursor: pointer;
|
|
border-bottom: 1px solid var(--divider);
|
|
background: transparent;
|
|
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
position: relative;
|
|
user-select: none;
|
|
}
|
|
|
|
.lang-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.lang-row:hover {
|
|
background: var(--color-primary-hover);
|
|
}
|
|
|
|
.lang-row.is-selected {
|
|
background: var(--color-primary-container);
|
|
}
|
|
|
|
.lang-name-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.lang-active-indicator {
|
|
width: 4px;
|
|
height: 20px;
|
|
border-radius: 2px;
|
|
background: var(--color-primary);
|
|
opacity: 0;
|
|
transform: scaleY(0.4);
|
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.lang-row.is-selected .lang-active-indicator {
|
|
opacity: 1;
|
|
transform: scaleY(1);
|
|
}
|
|
|
|
.lang-name {
|
|
font-size: var(--font-body);
|
|
font-weight: 450;
|
|
color: var(--text-primary);
|
|
letter-spacing: 0.1px;
|
|
}
|
|
|
|
.lang-row.is-selected .lang-name {
|
|
color: var(--color-on-primary-container);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ── Radio 单选按钮控件 ── */
|
|
.radio-box {
|
|
width: 22px;
|
|
height: 22px;
|
|
border-radius: 50%;
|
|
border: 2px solid var(--outline);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--color-surface);
|
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.lang-row.is-selected .radio-box {
|
|
border-color: var(--color-primary);
|
|
}
|
|
|
|
.radio-dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
background: var(--color-primary);
|
|
opacity: 0;
|
|
transform: scale(0.3);
|
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.lang-row.is-selected .radio-dot {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
|
|
/* =========================================================================
|
|
响应式断点 (平板竖屏 / 窄屏收敛)
|
|
========================================================================= */
|
|
@media (max-width: 768px) {
|
|
.master-detail-layout {
|
|
flex-direction: column;
|
|
}
|
|
.summary-sidebar {
|
|
flex: none;
|
|
width: 100%;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="screen-container">
|
|
<!-- 顶部导航栏 AppBar -->
|
|
<header class="appbar">
|
|
<div class="appbar-nav" title="返回">
|
|
<svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>
|
|
</div>
|
|
<h1 class="appbar-title">语言设置</h1>
|
|
</header>
|
|
|
|
<!-- 主体双栏内容区 -->
|
|
<main class="page-body">
|
|
<div class="master-detail-layout">
|
|
|
|
<!-- 左侧状态概览面板 -->
|
|
<aside class="summary-sidebar">
|
|
<div class="sidebar-icon-wrap">
|
|
<svg viewBox="0 0 24 24"><path d="M12.87 15.07l-2.54-2.51.03-.08c1.74-1.94 2.98-4.17 3.71-6.49H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"/></svg>
|
|
</div>
|
|
<h2 class="sidebar-title">系统显示语言</h2>
|
|
<p class="sidebar-desc">选择后即时应用到系统所有界面与交互提示。</p>
|
|
|
|
<div class="curr-status-card">
|
|
<div class="curr-status-label">当前选定语言</div>
|
|
<div class="curr-status-value">
|
|
<span class="curr-status-dot"></span>
|
|
<span id="currLangLabel">中文</span>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- 右侧全量 9 个语言单选列表 (字段与原图 100% 一致) -->
|
|
<section class="selection-card">
|
|
<div class="lang-list" id="langList">
|
|
|
|
<div class="lang-row" onclick="selectLang(this, 'English')">
|
|
<div class="lang-name-group">
|
|
<div class="lang-active-indicator"></div>
|
|
<span class="lang-name">English</span>
|
|
</div>
|
|
<div class="radio-box"><div class="radio-dot"></div></div>
|
|
</div>
|
|
|
|
<div class="lang-row" onclick="selectLang(this, 'Français')">
|
|
<div class="lang-name-group">
|
|
<div class="lang-active-indicator"></div>
|
|
<span class="lang-name">Français</span>
|
|
</div>
|
|
<div class="radio-box"><div class="radio-dot"></div></div>
|
|
</div>
|
|
|
|
<div class="lang-row is-selected" onclick="selectLang(this, '中文')">
|
|
<div class="lang-name-group">
|
|
<div class="lang-active-indicator"></div>
|
|
<span class="lang-name">中文</span>
|
|
</div>
|
|
<div class="radio-box"><div class="radio-dot"></div></div>
|
|
</div>
|
|
|
|
<div class="lang-row" onclick="selectLang(this, '日本語')">
|
|
<div class="lang-name-group">
|
|
<div class="lang-active-indicator"></div>
|
|
<span class="lang-name">日本語</span>
|
|
</div>
|
|
<div class="radio-box"><div class="radio-dot"></div></div>
|
|
</div>
|
|
|
|
<div class="lang-row" onclick="selectLang(this, '한국어')">
|
|
<div class="lang-name-group">
|
|
<div class="lang-active-indicator"></div>
|
|
<span class="lang-name">한국어</span>
|
|
</div>
|
|
<div class="radio-box"><div class="radio-dot"></div></div>
|
|
</div>
|
|
|
|
<div class="lang-row" onclick="selectLang(this, 'Español')">
|
|
<div class="lang-name-group">
|
|
<div class="lang-active-indicator"></div>
|
|
<span class="lang-name">Español</span>
|
|
</div>
|
|
<div class="radio-box"><div class="radio-dot"></div></div>
|
|
</div>
|
|
|
|
<div class="lang-row" onclick="selectLang(this, 'Italiano')">
|
|
<div class="lang-name-group">
|
|
<div class="lang-active-indicator"></div>
|
|
<span class="lang-name">Italiano</span>
|
|
</div>
|
|
<div class="radio-box"><div class="radio-dot"></div></div>
|
|
</div>
|
|
|
|
<div class="lang-row" onclick="selectLang(this, 'Ελληνικά')">
|
|
<div class="lang-name-group">
|
|
<div class="lang-active-indicator"></div>
|
|
<span class="lang-name">Ελληνικά</span>
|
|
</div>
|
|
<div class="radio-box"><div class="radio-dot"></div></div>
|
|
</div>
|
|
|
|
<div class="lang-row" onclick="selectLang(this, 'Português')">
|
|
<div class="lang-name-group">
|
|
<div class="lang-active-indicator"></div>
|
|
<span class="lang-name">Português</span>
|
|
</div>
|
|
<div class="radio-box"><div class="radio-dot"></div></div>
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<script>
|
|
function selectLang(rowEl, langName) {
|
|
document.querySelectorAll('.lang-row').forEach(row => {
|
|
row.classList.remove('is-selected');
|
|
});
|
|
rowEl.classList.add('is-selected');
|
|
const labelEl = document.getElementById('currLangLabel');
|
|
if (labelEl) {
|
|
labelEl.innerText = langName;
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|