mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
use strict
This commit is contained in:
parent
9737b926b8
commit
ad83678eb3
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
export function checkBrowser() {
|
export function checkBrowser() {
|
||||||
if (
|
if (
|
||||||
!window.navigator
|
!window.navigator
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $} from "../tools.js";
|
import {tools, $} from "../tools.js";
|
||||||
import {checkBrowser} from "../bb.js";
|
import {checkBrowser} from "../bb.js";
|
||||||
import {wm, initWindowManager} from "../wm.js";
|
import {wm, initWindowManager} from "../wm.js";
|
||||||
@ -78,7 +81,7 @@ function __loadKvmdInfo() {
|
|||||||
|
|
||||||
if (info.meta && info.meta.server && info.meta.server.host) {
|
if (info.meta && info.meta.server && info.meta.server.host) {
|
||||||
$("kvmd-meta-server-host").innerHTML = info.meta.server.host;
|
$("kvmd-meta-server-host").innerHTML = info.meta.server.host;
|
||||||
document.title = "Pi-KVM Index: " + info.meta.server.host;
|
document.title = `Pi-KVM Index: ${info.meta.server.host}`;
|
||||||
} else {
|
} else {
|
||||||
$("kvmd-meta-server-host").innerHTML = "";
|
$("kvmd-meta-server-host").innerHTML = "";
|
||||||
document.title = "Pi-KVM Index";
|
document.title = "Pi-KVM Index";
|
||||||
|
|||||||
@ -20,12 +20,15 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {$} from "../tools.js";
|
import {$} from "../tools.js";
|
||||||
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
let host = window.location.hostname;
|
let host = window.location.hostname;
|
||||||
let site = window.location.protocol + "//" + window.location.host;
|
let site = `${window.location.protocol}//${window.location.host}`;
|
||||||
$("ipmi-text").innerHTML = `
|
$("ipmi-text").innerHTML = `
|
||||||
<span class="code-comment"># Power on the server if it's off:<br>
|
<span class="code-comment"># Power on the server if it's off:<br>
|
||||||
$</span> ipmitool -I lanplus -U admin -P admin -H ${host} power on<br>
|
$</span> ipmitool -I lanplus -U admin -P admin -H ${host} power on<br>
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $$$} from "./tools.js";
|
import {tools, $$$} from "./tools.js";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $} from "../tools.js";
|
import {tools, $} from "../tools.js";
|
||||||
import {wm} from "../wm.js";
|
import {wm} from "../wm.js";
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $, $$$} from "../tools.js";
|
import {tools, $, $$$} from "../tools.js";
|
||||||
import {wm} from "../wm.js";
|
import {wm} from "../wm.js";
|
||||||
|
|
||||||
@ -132,27 +135,27 @@ export function Hid() {
|
|||||||
"\n": ["Enter"],
|
"\n": ["Enter"],
|
||||||
"\t": ["Tab"],
|
"\t": ["Tab"],
|
||||||
" ": ["Space"],
|
" ": ["Space"],
|
||||||
"`": ["Backquote"], "~": ["ShiftLeft", "Backquote"],
|
"`": ["Backquote"], "~": ["ShiftLeft", "Backquote"],
|
||||||
"\\": ["Backslash"], "|": ["ShiftLeft", "Backslash"],
|
"\\": ["Backslash"], "|": ["ShiftLeft", "Backslash"],
|
||||||
"[": ["BracketLeft"], "{": ["ShiftLeft", "BracketLeft"],
|
"[": ["BracketLeft"], "{": ["ShiftLeft", "BracketLeft"],
|
||||||
"]": ["BracketLeft"], "}": ["ShiftLeft", "BracketRight"],
|
"]": ["BracketLeft"], "}": ["ShiftLeft", "BracketRight"],
|
||||||
",": ["Comma"], "<": ["ShiftLeft", "Comma"],
|
",": ["Comma"], "<": ["ShiftLeft", "Comma"],
|
||||||
".": ["Period"], ">": ["ShiftLeft", "Period"],
|
".": ["Period"], ">": ["ShiftLeft", "Period"],
|
||||||
"1": ["Digit1"], "!": ["ShiftLeft", "Digit1"],
|
"1": ["Digit1"], "!": ["ShiftLeft", "Digit1"],
|
||||||
"2": ["Digit2"], "@": ["ShiftLeft", "Digit2"],
|
"2": ["Digit2"], "@": ["ShiftLeft", "Digit2"],
|
||||||
"3": ["Digit3"], "#": ["ShiftLeft", "Digit3"],
|
"3": ["Digit3"], "#": ["ShiftLeft", "Digit3"],
|
||||||
"4": ["Digit4"], "$": ["ShiftLeft", "Digit4"],
|
"4": ["Digit4"], "$": ["ShiftLeft", "Digit4"],
|
||||||
"5": ["Digit5"], "%": ["ShiftLeft", "Digit5"],
|
"5": ["Digit5"], "%": ["ShiftLeft", "Digit5"],
|
||||||
"6": ["Digit6"], "^": ["ShiftLeft", "Digit6"],
|
"6": ["Digit6"], "^": ["ShiftLeft", "Digit6"],
|
||||||
"7": ["Digit7"], "&": ["ShiftLeft", "Digit7"],
|
"7": ["Digit7"], "&": ["ShiftLeft", "Digit7"],
|
||||||
"8": ["Digit8"], "*": ["ShiftLeft", "Digit8"],
|
"8": ["Digit8"], "*": ["ShiftLeft", "Digit8"],
|
||||||
"9": ["Digit9"], "(": ["ShiftLeft", "Digit9"],
|
"9": ["Digit9"], "(": ["ShiftLeft", "Digit9"],
|
||||||
"0": ["Digit0"], ")": ["ShiftLeft", "Digit0"],
|
"0": ["Digit0"], ")": ["ShiftLeft", "Digit0"],
|
||||||
"-": ["Minus"], "_": ["ShiftLeft", "Minus"],
|
"-": ["Minus"], "_": ["ShiftLeft", "Minus"],
|
||||||
"'": ["Quote"], "\"": ["ShiftLeft", "Quote"],
|
"'": ["Quote"], "\"": ["ShiftLeft", "Quote"],
|
||||||
";": ["Semicolon"], ":": ["ShiftLeft", "Semicolon"],
|
";": ["Semicolon"], ":": ["ShiftLeft", "Semicolon"],
|
||||||
"/": ["Slash"], "?": ["ShiftLeft", "Slash"],
|
"/": ["Slash"], "?": ["ShiftLeft", "Slash"],
|
||||||
"=": ["Equal"], "+": ["ShiftLeft", "Equal"],
|
"=": ["Equal"], "+": ["ShiftLeft", "Equal"],
|
||||||
};
|
};
|
||||||
|
|
||||||
for (let ch = "a".charCodeAt(0); ch <= "z".charCodeAt(0); ++ch) {
|
for (let ch = "a".charCodeAt(0); ch <= "z".charCodeAt(0); ++ch) {
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $} from "../tools.js";
|
import {tools, $} from "../tools.js";
|
||||||
import {checkBrowser} from "../bb.js";
|
import {checkBrowser} from "../bb.js";
|
||||||
import {wm, initWindowManager} from "../wm.js";
|
import {wm, initWindowManager} from "../wm.js";
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $} from "../tools.js";
|
import {tools, $} from "../tools.js";
|
||||||
import {Keypad} from "../keypad.js";
|
import {Keypad} from "../keypad.js";
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $} from "../tools.js";
|
import {tools, $} from "../tools.js";
|
||||||
import {wm} from "../wm.js";
|
import {wm} from "../wm.js";
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $} from "../tools.js";
|
import {tools, $} from "../tools.js";
|
||||||
import {wm} from "../wm.js";
|
import {wm} from "../wm.js";
|
||||||
|
|
||||||
@ -62,8 +65,8 @@ export function Session() {
|
|||||||
${text}
|
${text}
|
||||||
`;
|
`;
|
||||||
if (state.meta.server && state.meta.server.host) {
|
if (state.meta.server && state.meta.server.host) {
|
||||||
$("kvmd-meta-server-host").innerHTML = "Server: " + state.meta.server.host;
|
$("kvmd-meta-server-host").innerHTML = `Server: ${state.meta.server.host}`;
|
||||||
document.title = "Pi-KVM Session: " + state.meta.server.host;
|
document.title = `Pi-KVM Session: ${state.meta.server.host}`;
|
||||||
} else {
|
} else {
|
||||||
$("kvmd-meta-server-host").innerHTML = "";
|
$("kvmd-meta-server-host").innerHTML = "";
|
||||||
document.title = "Pi-KVM Session";
|
document.title = "Pi-KVM Session";
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $} from "../tools.js";
|
import {tools, $} from "../tools.js";
|
||||||
import {wm} from "../wm.js";
|
import {wm} from "../wm.js";
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $} from "../tools.js";
|
import {tools, $} from "../tools.js";
|
||||||
import {checkBrowser} from "../bb.js";
|
import {checkBrowser} from "../bb.js";
|
||||||
import {wm, initWindowManager} from "../wm.js";
|
import {wm, initWindowManager} from "../wm.js";
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
export var tools = new function() {
|
export var tools = new function() {
|
||||||
let __debug = (new URL(window.location.href)).searchParams.get("debug");
|
let __debug = (new URL(window.location.href)).searchParams.get("debug");
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
import {tools, $, $$, $$$} from "./tools.js";
|
import {tools, $, $$, $$$} from "./tools.js";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user