mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
refactoring
This commit is contained in:
parent
365d8e9fef
commit
711816bd26
@ -40,11 +40,11 @@ export function Atx() {
|
|||||||
["atx-power-button", "power", "Are you sure you want to press the power button?"],
|
["atx-power-button", "power", "Are you sure you want to press the power button?"],
|
||||||
["atx-power-button-long", "power_long", `
|
["atx-power-button-long", "power_long", `
|
||||||
Are you sure you want to long press the power button?<br>
|
Are you sure you want to long press the power button?<br>
|
||||||
(Warning! This could cause data loss on the server.)
|
Warning! This could cause data loss on the server.
|
||||||
`],
|
`],
|
||||||
["atx-reset-button", "reset", `
|
["atx-reset-button", "reset", `
|
||||||
Are you sure you want to press the reset button?<br>
|
Are you sure you want to press the reset button?<br>
|
||||||
(Warning! This could case data loss on the server.)
|
Warning! This could case data loss on the server.
|
||||||
`],
|
`],
|
||||||
]) {
|
]) {
|
||||||
tools.setOnClick($(args[0]), () => __clickButton(args[1], args[2]));
|
tools.setOnClick($(args[0]), () => __clickButton(args[1], args[2]));
|
||||||
|
|||||||
@ -196,9 +196,7 @@ export function Hid() {
|
|||||||
var __clickPasteAsKeysButton = function() {
|
var __clickPasteAsKeysButton = function() {
|
||||||
let text = $("hid-pak-text").value.replace(/[^\x00-\x7F]/g, ""); // eslint-disable-line no-control-regex
|
let text = $("hid-pak-text").value.replace(/[^\x00-\x7F]/g, ""); // eslint-disable-line no-control-regex
|
||||||
if (text) {
|
if (text) {
|
||||||
let confirm_msg = text.length !== 1 ?
|
let confirm_msg = `You're going to paste ${text.length} character${text.length ? "s" : ""}.<br>`;
|
||||||
`You're going to paste ${text.length} characters.<br>` :
|
|
||||||
`You're going to paste ${text.length} character.<br>`;
|
|
||||||
confirm_msg += "Are you sure you want to continue?";
|
confirm_msg += "Are you sure you want to continue?";
|
||||||
|
|
||||||
wm.confirm(confirm_msg).then(function(ok) {
|
wm.confirm(confirm_msg).then(function(ok) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user