mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
Add support for PiKVM Switch and related features
This commit introduces several new components and improvements: - Added Switch module with firmware update and configuration support - Implemented new media streaming capabilities - Updated various UI elements and CSS styles - Enhanced keyboard and mouse event handling - Added new validators and configuration options - Updated Python version support to 3.13 - Improved error handling and logging
This commit is contained in:
@@ -142,7 +142,7 @@
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<li class="right" id="system-dropdown"><a class="menu-button" href="#"><img class="led-gray" id="link-led" src="/share/svg/led-link.svg"><img class="led-gray" id="stream-led" src="/share/svg/led-stream.svg"><img class="led-gray" id="hid-keyboard-led" src="/share/svg/led-hid-keyboard.svg"><img class="led-gray" id="hid-mouse-led" src="/share/svg/led-hid-mouse.svg"><span i18n="kvm_text3">System</span></a>
|
||||
<li class="right" id="system-dropdown"><a class="menu-button" href="#"><img class="led-gray" id="link-led" src="/share/svg/led-link.svg"><img class="led-gray" id="stream-led" src="/share/svg/led-video.svg"><img class="led-gray" id="hid-keyboard-led" src="/share/svg/led-hid-keyboard.svg"><img class="led-gray" id="hid-mouse-led" src="/share/svg/led-hid-mouse.svg"><span>System</span></a>
|
||||
<div class="menu" id="system-menu">
|
||||
<table class="kv">
|
||||
<tr>
|
||||
@@ -173,6 +173,17 @@
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="hidden" id="stream-message-no-vd">
|
||||
<div class="text">
|
||||
<table>
|
||||
<tr>
|
||||
<td rowspan="2"><img class="sign " src="/share/svg/warning.svg"></td>
|
||||
<td style="line-height:1.5"><b>Direct HTTP H.264 streaming is not supported</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="hidden" id="stream-message-no-h264">
|
||||
<div class="text">
|
||||
<table>
|
||||
@@ -223,10 +234,12 @@
|
||||
<td i18n="kvm_text14">Video <a target="_blank" href="https://docs.pikvm.org/webrtc">mode</a>:</td>
|
||||
<td>
|
||||
<div class="radio-box">
|
||||
<input checked type="radio" id="stream-mode-radio-mjpeg" name="stream-mode-radio" value="mjpeg">
|
||||
<label for="stream-mode-radio-mjpeg">MJPEG / HTTP</label>
|
||||
<input type="radio" id="stream-mode-radio-janus" name="stream-mode-radio" value="janus">
|
||||
<label for="stream-mode-radio-janus">H.264 / WebRTC</label>
|
||||
<label for="stream-mode-radio-janus">WebRTC</label>
|
||||
<input type="radio" id="stream-mode-radio-media" name="stream-mode-radio" value="media">
|
||||
<label for="stream-mode-radio-media">H.264</label>
|
||||
<input checked type="radio" id="stream-mode-radio-mjpeg" name="stream-mode-radio" value="mjpeg">
|
||||
<label for="stream-mode-radio-mjpeg">MJPEG</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -252,6 +265,15 @@
|
||||
</td>
|
||||
<td class="value-number" id="stream-audio-volume-value"></td>
|
||||
</tr>
|
||||
<tr class="feature-disabled" id="stream-mic">
|
||||
<td>Microphone:</td>
|
||||
<td align="right">
|
||||
<div class="switch-box">
|
||||
<input disabled type="checkbox" id="stream-mic-switch">
|
||||
<label for="stream-mic-switch"><span class="switch-inner"></span><span class="switch"></span></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="buttons buttons-row">
|
||||
@@ -280,6 +302,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
<details>
|
||||
<summary>Keyboard & mouse (HID) settings</summary>
|
||||
<summary i18n="kvm_text25">Keyboard & Mouse (HID) settings</summary>
|
||||
<div class="spoiler">
|
||||
<table class="kv">
|
||||
@@ -396,6 +419,15 @@
|
||||
</div>
|
||||
</details>
|
||||
<table class="kv">
|
||||
<tr>
|
||||
<td>Bad link mode (release keys immediately):</td>
|
||||
<td align="right">
|
||||
<div class="switch-box">
|
||||
<input type="checkbox" id="hid-keyboard-bad-link-switch">
|
||||
<label for="hid-keyboard-bad-link-switch"><span class="switch-inner"></span><span class="switch"></span></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="feature-disabled" id="hid-connect">
|
||||
<td i18n="hid-connect-switch">Connect HID to Server:</td>
|
||||
<td align="right">
|
||||
@@ -416,6 +448,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td i18n="hid-mute-switch">Mute HID input events:</td>
|
||||
<td>Mute all input HID events:</td>
|
||||
<td align="right">
|
||||
<div class="switch-box">
|
||||
<input type="checkbox" id="hid-mute-switch">
|
||||
@@ -502,15 +535,15 @@
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="hidden" id="msd-message-too-big-for-cdrom">
|
||||
<div class="hidden" id="msd-message-too-big-for-dvd">
|
||||
<div class="text">
|
||||
<table>
|
||||
<tr>
|
||||
<td rowspan="2"><img class="sign msd-message-too-big-for-cdrom" src="/share/svg/warning.svg"></td>
|
||||
<td rowspan="2"><img class="sign " src="/share/svg/warning.svg"></td>
|
||||
<td style="line-height:1.5"><b>Current image is too big for CD-ROM!</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup style="line-height:1">The device filesystem will be truncated to 2.2GiB</sup></td>
|
||||
<td><sup style="line-height:1">The maximum is 31.6GiB. Please switch to the Flash mode.</sup></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -580,7 +613,7 @@
|
||||
<td>
|
||||
<div class="radio-box">
|
||||
<input checked type="radio" id="msd-mode-radio-cdrom" name="msd-mode-radio" value="1">
|
||||
<label for="msd-mode-radio-cdrom">CD-ROM</label>
|
||||
<label for="msd-mode-radio-cdrom">CD/DVD</label>
|
||||
<input type="radio" id="msd-mode-radio-flash" name="msd-mode-radio" value="0">
|
||||
<label for="msd-mode-radio-flash">Flash</label>
|
||||
</div>
|
||||
@@ -754,16 +787,16 @@
|
||||
</table>
|
||||
<table class="kv">
|
||||
<tr>
|
||||
<td i18n="hid-pak-ask-switch">Ask paste confirmation:</td>
|
||||
<td>Slow typing:</td>
|
||||
<td align="right">
|
||||
<div class="switch-box">
|
||||
<input checked type="checkbox" id="hid-pak-ask-switch">
|
||||
<label for="hid-pak-ask-switch"><span class="switch-inner"></span><span class="switch"></span></label>
|
||||
<input type="checkbox" id="hid-pak-slow-switch">
|
||||
<label for="hid-pak-slow-switch"><span class="switch-inner"></span><span class="switch"></span></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="feature-disabled" id="hid-pak-secure">
|
||||
<td i18n="hid-pak-secure-switch">Hide input text:</td>
|
||||
<tr>
|
||||
<td>Hide input text:</td>
|
||||
<td align="right">
|
||||
<div class="switch-box">
|
||||
<input type="checkbox" id="hid-pak-secure-switch">
|
||||
@@ -771,6 +804,15 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ask paste confirmation:</td>
|
||||
<td align="right">
|
||||
<div class="switch-box">
|
||||
<input checked type="checkbox" id="hid-pak-ask-switch">
|
||||
<label for="hid-pak-ask-switch"><span class="switch-inner"></span><span class="switch"></span></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="feature-disabled" id="stream-ocr">
|
||||
<hr><br>
|
||||
@@ -809,7 +851,7 @@
|
||||
<hr>
|
||||
<div class="buttons">
|
||||
<div class="buttons-row">
|
||||
<button class="row50" data-force-hide-menu data-shortcut="CapsLock">• Caps Lock <img class="inline-lamp hid-keyboard-caps-led led-gray" src="/share/svg/led-square.svg"></button>
|
||||
<button class="row50" data-force-hide-menu data-shortcut="CapsLock">• Caps Lock <img class="inline-lamp-small hid-keyboard-caps-led led-gray" src="/share/svg/led-square.svg"></button>
|
||||
<button class="row50" data-force-hide-menu data-shortcut="MetaLeft">• Left Win</button>
|
||||
</div>
|
||||
<hr>
|
||||
@@ -884,6 +926,50 @@
|
||||
<li class="right feature-disabled" id="gpio-dropdown"><a class="menu-button" id="gpio-menu-button" href="#"><span>GPIO</span></a>
|
||||
<div class="menu" id="gpio-menu"></div>
|
||||
</li>
|
||||
<li class="right feature-disabled" id="switch-dropdown"><a class="menu-button" id="switch-menu-button" href="#"><img class="led-gray" id="switch-atx-power-led" src="/share/svg/led-atx-power.svg"><img class="led-gray" id="switch-atx-hdd-led" src="/share/svg/led-atx-hdd.svg"><span>Switch <i><sub id="switch-active-port"></sub></i></span></a>
|
||||
<div class="menu" id="switch-menu">
|
||||
<table style="border-spacing: 0px;">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="text"><b><a target="_blank" href="https://docs.pikvm.org/switch">PiKVM Switch</a> is attached<br></b><sub>Select a port or perform any available action like ATX click</sub></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="text">
|
||||
<button class="small" data-force-hide-menu data-show-window="switch-window">• Settings</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="hidden" id="switch-message-update">
|
||||
<div class="text">
|
||||
<table>
|
||||
<tr>
|
||||
<td rowspan="2"><img class="sign " src="/share/svg/info.svg"></td>
|
||||
<td style="line-height:1.5"><b>Good news! Your switch is ready to get the firmware update</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup style="line-height:1">Please <a target="_blank" href="https://docs.pikvm.org/switch/#firmware-updating">follow the instructions</a> when you decide to install it.</sup></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<table class="kv">
|
||||
<tr>
|
||||
<td>Ask ATX click confirmation:</td>
|
||||
<td align="right">
|
||||
<div class="switch-box">
|
||||
<input checked type="checkbox" id="switch-atx-ask-switch">
|
||||
<label for="switch-atx-ask-switch"><span class="switch-inner"></span><span class="switch"></span></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table class="kv" id="switch-chain"></table>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="window" id="stream-ocr-window">
|
||||
<div class="hidden" id="stream-ocr-selection"></div>
|
||||
@@ -901,6 +987,7 @@
|
||||
<button class="window-button-exit-full-tab">▼</button>
|
||||
<div class="stream-box-offline" id="stream-box"><img id="stream-image" src="/share/png/blank-stream.png">
|
||||
<video class="hidden" id="stream-video" disablePictureInPicture="true" autoplay playsinline muted></video>
|
||||
<canvas class="hidden" id="stream-canvas"></canvas>
|
||||
<div id="stream-fullscreen-active"></div>
|
||||
</div>
|
||||
<div class="keypad" id="stream-mouse-buttons" align="center">
|
||||
@@ -1168,7 +1255,7 @@
|
||||
</div>
|
||||
<div class="keypad-row">
|
||||
<div class="key wide-2 left small" data-code="CapsLock">
|
||||
<div class="label"><img class="inline-lamp hid-keyboard-caps-led led-gray" src="/share/svg/led-square.svg"><br> Caps Lock
|
||||
<div class="label"><img class="inline-lamp-small hid-keyboard-caps-led led-gray" src="/share/svg/led-square.svg"><br> Caps Lock
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
@@ -1343,7 +1430,7 @@
|
||||
</div>
|
||||
<div class="spacer-fixed"></div>
|
||||
<div class="key small" data-code="ScrollLock">
|
||||
<div class="label"><img class="inline-lamp hid-keyboard-scroll-led led-gray" src="/share/svg/led-square.svg"><br> ScrLk
|
||||
<div class="label"><img class="inline-lamp-small hid-keyboard-scroll-led led-gray" src="/share/svg/led-square.svg"><br> ScrLk
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer-fixed"></div>
|
||||
@@ -1439,7 +1526,7 @@
|
||||
<hr>
|
||||
<div class="keypad-row">
|
||||
<div class="key small" data-code="NumLock">
|
||||
<div class="label"><img class="inline-lamp hid-keyboard-num-led led-gray" src="/share/svg/led-square.svg"><br> NmLk
|
||||
<div class="label"><img class="inline-lamp-small hid-keyboard-num-led led-gray" src="/share/svg/led-square.svg"><br> NmLk
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer-fixed"></div>
|
||||
@@ -1645,7 +1732,7 @@
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
<div class="key small" data-code="ScrollLock">
|
||||
<div class="label"><img class="inline-lamp hid-keyboard-scroll-led led-gray" src="/share/svg/led-square.svg"><br> ScrLk
|
||||
<div class="label"><img class="inline-lamp-small hid-keyboard-scroll-led led-gray" src="/share/svg/led-square.svg"><br> ScrLk
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
@@ -1818,7 +1905,7 @@
|
||||
</div>
|
||||
<div class="keypad-row">
|
||||
<div class="key wide-2 left small" data-code="CapsLock">
|
||||
<div class="label"><img class="inline-lamp hid-keyboard-caps-led led-gray" src="/share/svg/led-square.svg"><br> Caps Lock
|
||||
<div class="label"><img class="inline-lamp-small hid-keyboard-caps-led led-gray" src="/share/svg/led-square.svg"><br> Caps Lock
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
@@ -2017,6 +2104,170 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="window" id="switch-window" style="width:min-content">
|
||||
<div class="window-header">
|
||||
<div class="window-grab">Switch settings</div>
|
||||
<button class="window-button-close"><b>×</b></button>
|
||||
</div>
|
||||
<div class="tabs-box">
|
||||
<input checked type="radio" name="switch-tab-button" id="switch-tab-edid-button">
|
||||
<label for="switch-tab-edid-button">EDIDs collection</label>
|
||||
<div class="tab">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<select id="switch-edid-selector" size="8"></select>
|
||||
</td>
|
||||
<td rowspan="2" style="vertical-align:top">
|
||||
<table class="kv">
|
||||
<tr>
|
||||
<td>Manufacturer:</td>
|
||||
<td class="value" id="switch-edid-info-mfc-id"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Product ID:</td>
|
||||
<td class="value" id="switch-edid-info-product-id"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serial:</td>
|
||||
<td class="value" id="switch-edid-info-serial"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Monitor name:</td>
|
||||
<td class="value" id="switch-edid-info-monitor-name"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extra serial:</td>
|
||||
<td class="value" id="switch-edid-info-monitor-serial"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Audio enabled:</td>
|
||||
<td class="value" id="switch-edid-info-audio"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Data:</td>
|
||||
<td>
|
||||
<button class="small" disabled id="switch-edid-copy-data-button">Copy</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button id="switch-edid-add-button">Add new</button>
|
||||
</td>
|
||||
<td style="float:right">
|
||||
<button disabled id="switch-edid-remove-button">Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<input type="radio" name="switch-tab-button" id="switch-tab-colors-button">
|
||||
<label for="switch-tab-colors-button">Color scheme</label>
|
||||
<div class="tab">
|
||||
<table>
|
||||
<!--tr
|
||||
td Role
|
||||
td Color
|
||||
td Brightness
|
||||
td
|
||||
td Reset
|
||||
-->
|
||||
<!--trtd
|
||||
<hr>
|
||||
td
|
||||
<hr>
|
||||
td
|
||||
<hr>
|
||||
td
|
||||
td
|
||||
<hr>
|
||||
-->
|
||||
<tr>
|
||||
<td style="white-space: nowrap">Selected port:</td>
|
||||
<td>
|
||||
<input type="color" id="switch-color-active-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="range" id="switch-color-active-brightness-slider" style="min-width:150px">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button class="small" id="switch-color-active-default-button" title="Reset default">↻</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="white-space: nowrap">Inactive port:</td>
|
||||
<td>
|
||||
<input type="color" id="switch-color-inactive-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="range" id="switch-color-inactive-brightness-slider" style="min-width:150px">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button class="small" id="switch-color-inactive-default-button" title="Reset default">↻</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="white-space: nowrap">Blinking beacon:</td>
|
||||
<td>
|
||||
<input type="color" id="switch-color-beacon-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="range" id="switch-color-beacon-brightness-slider" style="min-width:150px">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button class="small" id="switch-color-beacon-default-button" title="Reset default">↻</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="white-space: nowrap">Flashing downlink:</td>
|
||||
<td>
|
||||
<input type="color" id="switch-color-flashing-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="range" id="switch-color-flashing-brightness-slider" style="min-width:150px">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button class="small" id="switch-color-flashing-default-button" title="Reset default">↻</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="white-space: nowrap">Bootloader mode:</td>
|
||||
<td>
|
||||
<input type="color" id="switch-color-bootloader-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="range" id="switch-color-bootloader-brightness-slider" style="min-width:150px">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button class="small" id="switch-color-bootloader-default-button" title="Reset default">↻</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="window" id="about-window">
|
||||
<div class="window-header">
|
||||
<div class="window-grab" i18n="kvm_text1">About</div>
|
||||
@@ -2102,6 +2353,7 @@
|
||||
<li>Alok Anand</li>
|
||||
<li>Alucard</li>
|
||||
<li>Ananthaneshan Elampoornan</li>
|
||||
<li>Andreas Grundler</li>
|
||||
<li>Andreas Marufke</li>
|
||||
<li>Andreas Schmid</li>
|
||||
<li>Andrew Brant</li>
|
||||
@@ -2162,6 +2414,7 @@
|
||||
<li>Brian T Mulcahy</li>
|
||||
<li>Brian Vecchiarelli</li>
|
||||
<li>Brian White</li>
|
||||
<li>brodonalds</li>
|
||||
<li>Bruno Gomes</li>
|
||||
<li>Bryan Adams</li>
|
||||
<li>Bryan Montgomery</li>
|
||||
@@ -2498,6 +2751,7 @@
|
||||
<li>Mikael Wikström</li>
|
||||
<li>Mike Mason</li>
|
||||
<li>Mikhael Mariano</li>
|
||||
<li>Milan Burda</li>
|
||||
<li>Milan Múčka</li>
|
||||
<li>Miles Davis</li>
|
||||
<li>Minh Tang</li>
|
||||
@@ -2516,6 +2770,7 @@
|
||||
<li>Nick Roethemeier</li>
|
||||
<li>Nico Baumgartner</li>
|
||||
<li>Nicolai Kragh-Hansen</li>
|
||||
<li>Nicolas Christener</li>
|
||||
<li>Nigel Smith</li>
|
||||
<li>Nihal Fernando</li>
|
||||
<li>Nils Orbat</li>
|
||||
@@ -2523,6 +2778,7 @@
|
||||
<li>Nithin Philips</li>
|
||||
<li>Nod Swal</li>
|
||||
<li>Nolan Haynes</li>
|
||||
<li>Noxigen LLC</li>
|
||||
<li>nubbn</li>
|
||||
<li>nybble</li>
|
||||
<li>Oh Be</li>
|
||||
@@ -2607,6 +2863,7 @@
|
||||
<li>Scuba</li>
|
||||
<li>Sean</li>
|
||||
<li>Sean Akers</li>
|
||||
<li>Sean c Rickard</li>
|
||||
<li>SEAT</li>
|
||||
<li>Sebastian</li>
|
||||
<li>Seonwoo Lee</li>
|
||||
@@ -2675,6 +2932,7 @@
|
||||
<li>Udo Schroeter</li>
|
||||
<li>Uli Fahrer</li>
|
||||
<li>Vasily Lazarev</li>
|
||||
<li>Venmo</li>
|
||||
<li>Vidru Eduard</li>
|
||||
<li>Vicente Salvador Cubedo</li>
|
||||
<li>Viktor Aschenbrenner</li>
|
||||
|
||||
@@ -15,9 +15,9 @@ li(id="msd-dropdown" class="right feature-disabled")
|
||||
+menu_message("warning", "Current image is broken!", "msd-message-image-broken")
|
||||
| Perhaps uploading was interrupted#[br]
|
||||
hr
|
||||
div(id="msd-message-too-big-for-cdrom" class="hidden")
|
||||
+menu_message("warning", "Current image is too big for CD-ROM!", "msd-message-too-big-for-cdrom")
|
||||
| The device filesystem will be truncated to 2.2GiB
|
||||
div(id="msd-message-too-big-for-dvd" class="hidden")
|
||||
+menu_message("warning", "Current image is too big for DVD!", "msd-message-too-big-for-dvd")
|
||||
| The maximum is 31.6GiB. Please switch to the Flash mode.
|
||||
hr
|
||||
div(id="msd-message-out-of-storage" class="hidden")
|
||||
+menu_message("warning", "Current image is out of storage", "msd-message-out-of-storage")
|
||||
@@ -45,7 +45,7 @@ li(id="msd-dropdown" class="right feature-disabled")
|
||||
td
|
||||
div(class="radio-box")
|
||||
input(checked type="radio" id="msd-mode-radio-cdrom" name="msd-mode-radio" value="1")
|
||||
label(for="msd-mode-radio-cdrom") CD-ROM
|
||||
label(for="msd-mode-radio-cdrom") CD/DVD
|
||||
input(type="radio" id="msd-mode-radio-flash" name="msd-mode-radio" value="0")
|
||||
label(for="msd-mode-radio-flash") Flash
|
||||
td
|
||||
|
||||
@@ -9,7 +9,7 @@ li(id="shortcuts-dropdown" class="right")
|
||||
div(class="buttons-row")
|
||||
button(data-force-hide-menu data-shortcut="CapsLock" class="row50")
|
||||
| • Caps Lock
|
||||
img(class="inline-lamp hid-keyboard-caps-led led-gray" src=`${svg_dir}/led-square.svg`)
|
||||
img(class="inline-lamp-small hid-keyboard-caps-led led-gray" src=`${svg_dir}/led-square.svg`)
|
||||
button(data-force-hide-menu data-shortcut="MetaLeft" class="row50") • Left Win
|
||||
hr
|
||||
div(class="buttons-row")
|
||||
|
||||
23
web/kvm/navbar-switch.pug
Normal file
23
web/kvm/navbar-switch.pug
Normal file
@@ -0,0 +1,23 @@
|
||||
li(id="switch-dropdown" class="right feature-disabled")
|
||||
a(class="menu-button" id="switch-menu-button" href="#")
|
||||
+navbar_led("switch-atx-power-led", "led-atx-power")
|
||||
+navbar_led("switch-atx-hdd-led", "led-atx-hdd")
|
||||
span Switch #[i #[sub(id="switch-active-port") ]]
|
||||
div(id="switch-menu" class="menu")
|
||||
table(style="border-spacing: 0px;")
|
||||
tr
|
||||
td
|
||||
div(class="text")
|
||||
b #[a(target="_blank" href="https://docs.pikvm.org/switch") PiKVM Switch] is attached#[br]
|
||||
sub Select a port or perform any available action like ATX click
|
||||
td
|
||||
div(class="text")
|
||||
button(data-force-hide-menu data-show-window="switch-window" class="small") • Settings
|
||||
hr
|
||||
div(id="switch-message-update" class="hidden")
|
||||
+menu_message("info", "Good news! Your switch is ready to get the firmware update")
|
||||
| Please #[a(target="_blank" href="https://docs.pikvm.org/switch/#firmware-updating") follow the instructions] when you decide to install it.
|
||||
hr
|
||||
+menu_switch("switch-atx-ask-switch", "Ask ATX click confirmation", true, true)
|
||||
hr
|
||||
table(id="switch-chain" class="kv")
|
||||
@@ -1,7 +1,7 @@
|
||||
li(id="system-dropdown" class="right")
|
||||
a(class="menu-button" href="#")
|
||||
+navbar_led("link-led", "led-link")
|
||||
+navbar_led("stream-led", "led-stream")
|
||||
+navbar_led("stream-led", "led-video")
|
||||
+navbar_led("hid-keyboard-led", "led-hid-keyboard")
|
||||
+navbar_led("hid-mouse-led", "led-hid-mouse")
|
||||
span(i18n="kvm_text3") System
|
||||
@@ -19,6 +19,9 @@ li(id="system-dropdown" class="right")
|
||||
div(id="stream-message-no-webrtc" class="hidden")
|
||||
+menu_message("warning", "WebRTC is not supported by this browser", "stream-message-no-webrtc")
|
||||
hr
|
||||
div(id="stream-message-no-vd" class="hidden")
|
||||
+menu_message("warning", "Direct HTTP H.264 streaming is not supported")
|
||||
hr
|
||||
div(id="stream-message-no-h264" class="hidden")
|
||||
+menu_message("warning", "H.264 is not supported by this browser", "stream-message-no-h264")
|
||||
hr
|
||||
@@ -46,10 +49,12 @@ li(id="system-dropdown" class="right")
|
||||
td(i18n="kvm_text14") Video #[a(target="_blank" href="https://docs.pikvm.org/webrtc") mode]:
|
||||
td
|
||||
div(class="radio-box")
|
||||
input(checked type="radio" id="stream-mode-radio-mjpeg" name="stream-mode-radio" value="mjpeg")
|
||||
label(for="stream-mode-radio-mjpeg") MJPEG / HTTP
|
||||
input(type="radio" id="stream-mode-radio-janus" name="stream-mode-radio" value="janus")
|
||||
label(for="stream-mode-radio-janus") H.264 / WebRTC
|
||||
label(for="stream-mode-radio-janus") WebRTC
|
||||
input(type="radio" id="stream-mode-radio-media" name="stream-mode-radio" value="media")
|
||||
label(for="stream-mode-radio-media") H.264
|
||||
input(checked type="radio" id="stream-mode-radio-mjpeg" name="stream-mode-radio" value="mjpeg")
|
||||
label(for="stream-mode-radio-mjpeg") MJPEG
|
||||
tr(id="stream-orient" class="feature-disabled")
|
||||
td(i18n="kvm_text17") Orientation:
|
||||
td
|
||||
@@ -66,6 +71,8 @@ li(id="system-dropdown" class="right")
|
||||
td(i18n="kvm_text19") Audio volume:
|
||||
td(class="value-slider") #[input(type="range" id="stream-audio-volume-slider" class="slider")]
|
||||
td(id="stream-audio-volume-value" class="value-number")
|
||||
tr(id="stream-mic" class="feature-disabled")
|
||||
+menu_switch_notable("stream-mic-switch", "Microphone", false, false)
|
||||
hr
|
||||
div(class="buttons buttons-row")
|
||||
button(data-force-hide-menu data-show-window="stream-window" class="row33" i18n="kvm_text20") • Show stream
|
||||
@@ -128,6 +135,8 @@ li(id="system-dropdown" class="right")
|
||||
tr
|
||||
+menu_switch_notable("page-full-tab-stream-switch", "Expand for the entire tab by default", true, false,"page-full-tab-stream-switch")
|
||||
table(class="kv")
|
||||
tr
|
||||
+menu_switch_notable("hid-keyboard-bad-link-switch", "Bad link mode (release keys immediately)", true, false)
|
||||
tr(id="hid-connect" class="feature-disabled")
|
||||
+menu_switch_notable("hid-connect-switch", "Connect HID to Server", true, true, "hid-connect-switch")
|
||||
tr(id="hid-jiggler" class="feature-disabled")
|
||||
|
||||
@@ -17,6 +17,7 @@ li(id="text-dropdown" class="right")
|
||||
td
|
||||
select(id="hid-pak-keymap-selector")
|
||||
table(class="kv")
|
||||
+menu_switch_notable("hid-pak-slow-switch", "Slow typing", true, false, "hid-pak-slow-switch")
|
||||
tr
|
||||
+menu_switch_notable("hid-pak-ask-switch", "Ask paste confirmation", true, true, "hid-pak-ask-switch")
|
||||
tr(id="hid-pak-secure" class="feature-disabled")
|
||||
|
||||
@@ -51,3 +51,4 @@ ul(id="navbar")
|
||||
include navbar-text.pug
|
||||
include navbar-shortcuts.pug
|
||||
include navbar-gpio.pug
|
||||
include navbar-switch.pug
|
||||
|
||||
@@ -79,6 +79,7 @@ div(id="about-window" class="window")
|
||||
li Alok Anand
|
||||
li Alucard
|
||||
li Ananthaneshan Elampoornan
|
||||
li Andreas Grundler
|
||||
li Andreas Marufke
|
||||
li Andreas Schmid
|
||||
li Andrew Brant
|
||||
@@ -139,6 +140,7 @@ div(id="about-window" class="window")
|
||||
li Brian T Mulcahy
|
||||
li Brian Vecchiarelli
|
||||
li Brian White
|
||||
li brodonalds
|
||||
li Bruno Gomes
|
||||
li Bryan Adams
|
||||
li Bryan Montgomery
|
||||
@@ -475,6 +477,7 @@ div(id="about-window" class="window")
|
||||
li Mikael Wikström
|
||||
li Mike Mason
|
||||
li Mikhael Mariano
|
||||
li Milan Burda
|
||||
li Milan Múčka
|
||||
li Miles Davis
|
||||
li Minh Tang
|
||||
@@ -493,6 +496,7 @@ div(id="about-window" class="window")
|
||||
li Nick Roethemeier
|
||||
li Nico Baumgartner
|
||||
li Nicolai Kragh-Hansen
|
||||
li Nicolas Christener
|
||||
li Nigel Smith
|
||||
li Nihal Fernando
|
||||
li Nils Orbat
|
||||
@@ -500,6 +504,7 @@ div(id="about-window" class="window")
|
||||
li Nithin Philips
|
||||
li Nod Swal
|
||||
li Nolan Haynes
|
||||
li Noxigen LLC
|
||||
li nubbn
|
||||
li nybble
|
||||
li Oh Be
|
||||
@@ -584,6 +589,7 @@ div(id="about-window" class="window")
|
||||
li Scuba
|
||||
li Sean
|
||||
li Sean Akers
|
||||
li Sean c Rickard
|
||||
li SEAT
|
||||
li Sebastian
|
||||
li Seonwoo Lee
|
||||
@@ -652,6 +658,7 @@ div(id="about-window" class="window")
|
||||
li Udo Schroeter
|
||||
li Uli Fahrer
|
||||
li Vasily Lazarev
|
||||
li Venmo
|
||||
li Vidru Eduard
|
||||
li Vicente Salvador Cubedo
|
||||
li Viktor Aschenbrenner
|
||||
|
||||
@@ -26,7 +26,7 @@ mixin empty(spacer, classes="", width=0)
|
||||
div(class="spacer-fixed")
|
||||
|
||||
mixin lamp(cls)
|
||||
img(class=`inline-lamp ${cls} led-gray` src=`${svg_dir}/led-square.svg`)
|
||||
img(class=`inline-lamp-small ${cls} led-gray` src=`${svg_dir}/led-square.svg`)
|
||||
|
||||
div(id="keyboard-window" class="window")
|
||||
div(id="keyboard-window-header" class="window-header")
|
||||
|
||||
@@ -16,6 +16,7 @@ div(id="stream-window" class="window window-resizable")
|
||||
div(id="stream-box" class="stream-box-offline")
|
||||
img(id="stream-image" src=`${png_dir}/blank-stream.png`)
|
||||
video(id="stream-video" class="hidden" disablePictureInPicture="true" autoplay playsinline muted)
|
||||
canvas(id="stream-canvas" class="hidden")
|
||||
div(id="stream-fullscreen-active")
|
||||
|
||||
div(id="stream-mouse-buttons" class="keypad" align="center")
|
||||
|
||||
95
web/kvm/window-switch.pug
Normal file
95
web/kvm/window-switch.pug
Normal file
@@ -0,0 +1,95 @@
|
||||
mixin switch_tab(name, title, checked=false)
|
||||
- let button_id = `switch-tab-${name}-button`
|
||||
input(checked=checked type="radio" name="switch-tab-button", id=button_id)
|
||||
label(for=button_id) #{title}
|
||||
div(class="tab")
|
||||
block
|
||||
|
||||
div(id="switch-window" class="window" style="width:min-content")
|
||||
div(class="window-header")
|
||||
div(class="window-grab") Switch settings
|
||||
button(class="window-button-close") #[b ×]
|
||||
|
||||
div(class="tabs-box")
|
||||
+switch_tab("edid", "EDIDs collection", true)
|
||||
table
|
||||
tr
|
||||
td(colspan="2")
|
||||
select(id="switch-edid-selector" size="8")
|
||||
td(rowspan="2" style="vertical-align:top")
|
||||
table(class="kv")
|
||||
tr
|
||||
td Manufacturer:
|
||||
td(id="switch-edid-info-mfc-id" class="value")
|
||||
tr
|
||||
td Product ID:
|
||||
td(id="switch-edid-info-product-id" class="value")
|
||||
tr
|
||||
td Serial:
|
||||
td(id="switch-edid-info-serial" class="value")
|
||||
tr
|
||||
td Monitor name:
|
||||
td(id="switch-edid-info-monitor-name" class="value")
|
||||
tr
|
||||
td Extra serial:
|
||||
td(id="switch-edid-info-monitor-serial" class="value")
|
||||
tr
|
||||
td Audio enabled:
|
||||
td(id="switch-edid-info-audio" class="value")
|
||||
tr
|
||||
td Data:
|
||||
td #[button(disabled id="switch-edid-copy-data-button" class="small") Copy]
|
||||
tr
|
||||
td #[button(id="switch-edid-add-button") Add new]
|
||||
td(style="float:right") #[button(disabled id="switch-edid-remove-button") Remove]
|
||||
|
||||
+switch_tab("colors", "Color scheme")
|
||||
table
|
||||
//tr
|
||||
td Role
|
||||
td Color
|
||||
td Brightness
|
||||
td
|
||||
td Reset
|
||||
//tr
|
||||
td #[hr]
|
||||
td #[hr]
|
||||
td #[hr]
|
||||
td
|
||||
td #[hr]
|
||||
tr
|
||||
td(style="white-space: nowrap") Selected port:
|
||||
td #[input(type="color" id="switch-color-active-input")]
|
||||
td #[input(type="range" id="switch-color-active-brightness-slider" style="min-width:150px")]
|
||||
td
|
||||
td #[button(id="switch-color-active-default-button" class="small" title="Reset default") ↻]
|
||||
tr
|
||||
td(style="white-space: nowrap") Inactive port:
|
||||
td #[input(type="color" id="switch-color-inactive-input")]
|
||||
td #[input(type="range" id="switch-color-inactive-brightness-slider" style="min-width:150px")]
|
||||
td
|
||||
td #[button(id="switch-color-inactive-default-button" class="small" title="Reset default") ↻]
|
||||
tr
|
||||
td(style="white-space: nowrap") Blinking beacon:
|
||||
td #[input(type="color" id="switch-color-beacon-input")]
|
||||
td #[input(type="range" id="switch-color-beacon-brightness-slider" style="min-width:150px")]
|
||||
td
|
||||
td #[button(id="switch-color-beacon-default-button" class="small" title="Reset default") ↻]
|
||||
tr
|
||||
td #[hr]
|
||||
td #[hr]
|
||||
td #[hr]
|
||||
td
|
||||
td #[hr]
|
||||
tr
|
||||
td(style="white-space: nowrap") Flashing downlink:
|
||||
td #[input(type="color" id="switch-color-flashing-input")]
|
||||
td #[input(type="range" id="switch-color-flashing-brightness-slider" style="min-width:150px")]
|
||||
td
|
||||
td #[button(id="switch-color-flashing-default-button" class="small" title="Reset default") ↻]
|
||||
tr
|
||||
td(style="white-space: nowrap") Bootloader mode:
|
||||
td #[input(type="color" id="switch-color-bootloader-input")]
|
||||
td #[input(type="range" id="switch-color-bootloader-brightness-slider" style="min-width:150px")]
|
||||
td
|
||||
td #[button(id="switch-color-bootloader-default-button" class="small" title="Reset default") ↻]
|
||||
@@ -1,4 +1,5 @@
|
||||
include window-stream.pug
|
||||
include window-keyboard.pug
|
||||
include window-switch.pug
|
||||
include window-about.pug
|
||||
include window-webterm.pug
|
||||
|
||||
Reference in New Issue
Block a user