mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-13 17:50:29 +08:00
- 将包含数字的无意义 i18n 键名替换为语义化名称 (如 kvm_text1 → about_title) - 为缺失多语言支持的界面文本添加中英文翻译 - 修复不准确的翻译内容和 HTML 标签格式错误 - 更新所有 Pug 模板文件以使用新的 i18n 键名 - 新增登录页面"记住我"、USB 连接确认等功能的多语言支持 - 统一翻译键命名规范,提升代码可维护性
97 lines
2.1 KiB
Plaintext
97 lines
2.1 KiB
Plaintext
mixin navbar_led(id, icon, cls="led-gray")
|
|
img(id=id, class=cls src=`${svg_dir}/${icon}.svg`)
|
|
|
|
mixin menu_message(icon, short, classes="", i18nid)
|
|
.text
|
|
table
|
|
tr
|
|
td(rowspan="2") #[img(class=`sign ${classes}` src=`${svg_dir}/${icon}.svg`)]
|
|
td(style="line-height:1.5") #[b(i18n=i18nid) #{short}]
|
|
if block
|
|
tr
|
|
td
|
|
sup(style="line-height:1")
|
|
block
|
|
|
|
|
|
mixin menu_switch_td2_gpio(channel, confirm_off="", i18nid)
|
|
td(i18n=i18nid)
|
|
block
|
|
td(align="right")
|
|
.switch-box
|
|
input(
|
|
disabled
|
|
type="checkbox"
|
|
id=`__gpio-switch-${channel}`
|
|
class=`__gpio-switch-${channel} gpio-switch`
|
|
data-channel=channel
|
|
data-confirm-off=confirm_off
|
|
)
|
|
label(for=`__gpio-switch-${channel}`)
|
|
span.switch-inner
|
|
span.switch
|
|
|
|
|
|
mixin menu_switch_td2(id, enabled, checked, i18nid)
|
|
td(i18n=i18nid)
|
|
block
|
|
td(align="right")
|
|
.switch-box
|
|
input(checked=checked disabled=!enabled type="checkbox" id=id)
|
|
label(for=id)
|
|
span.switch-inner
|
|
span.switch
|
|
|
|
mixin menu_switch_table(id, title, enabled, checked, i18nid)
|
|
table.kv
|
|
tr
|
|
+menu_switch_td2(id, title, enabled, checked, i18nid)
|
|
block
|
|
|
|
|
|
mixin menu_radio_td2(name, items, i18nid)
|
|
td
|
|
block
|
|
td
|
|
.radio-box
|
|
each item in items
|
|
-
|
|
let id = `${name}-${item["value"]}`
|
|
let checked = (item["checked"] || false)
|
|
input(type="radio" id=id name=name value=item["value"] checked=checked)
|
|
label(for=id) !{item["title"]}
|
|
|
|
|
|
mixin menu_slider_td3(slider_id, value_id, enabled, i18nid)
|
|
-
|
|
enabled = (enabled || true)
|
|
td(i18n=i18nid)
|
|
block
|
|
td.value-slider
|
|
input(type="range" id=slider_id disabled=!enabled)
|
|
td.value-number(id=value_id)
|
|
|
|
|
|
mixin menu_spoiler(title, i18nid)
|
|
details
|
|
summary(i18n=i18nid) !{title}
|
|
div(class="spoiler")
|
|
block
|
|
|
|
|
|
ul#navbar
|
|
li.left
|
|
a(id="logo" href=root_prefix) ←
|
|
img.svg-gray(src=`${svg_dir}/logo.svg` alt="π-kvm")
|
|
|
|
include navbar-health.pug
|
|
|
|
include navbar-system.pug
|
|
include navbar-atx.pug
|
|
include navbar-msd.pug
|
|
include navbar-macro.pug
|
|
include navbar-text.pug
|
|
include navbar-shortcuts.pug
|
|
include navbar-gpio.pug
|
|
include navbar-switch.pug
|