One-KVM/web/kvm/navbar.pug
mofeng-git 2c056ca3e3 feat: merge upstream master - version 4.94
Merge upstream PiKVM master branch updates:

- Bump version from 4.93 to 4.94
- HID: improved jiggler pattern for better compatibility
- Streamer: major refactoring for improved performance and maintainability
- Prometheus: tidying GPIO channel name formatting
- Web: added __gpio-label class for custom styling
- HID: customizable /api/hid/print delay configuration
- ATX: independent power/reset regions for better control
- OLED: added --fill option for display testing
- Web: improved keyboard handling in modal dialogs
- Web: enhanced login error messages
- Switch: added heartbeat functionality
- Web: mouse touch code simplification and refactoring
- Configs: use systemd-networkd-wait-online --any by default
- PKGBUILD: use cp -r to install systemd units properly
- Various bug fixes and performance improvements
2025-08-21 11:26:59 +08:00

97 lines
2.0 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="")
td
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
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
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 !{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