add quick launch
Browse files- static/index.html +17 -5
static/index.html
CHANGED
|
@@ -83,6 +83,7 @@
|
|
| 83 |
.mode-seg .seg-btn.active[data-mode="hubble"] { border-top: 2px solid var(--primary3); }
|
| 84 |
.mode-seg .seg-btn.active[data-mode="hubble_sync"] { border-top: 2px solid var(--primary3); }
|
| 85 |
.mode-seg .seg-btn.active[data-mode="hubble_launch"] { border-top: 2px solid var(--primary3); }
|
|
|
|
| 86 |
.mode-seg .seg-btn:hover:not(.active):not(:disabled) { color: #212529; }
|
| 87 |
.mode-seg .seg-btn:disabled { cursor: not-allowed; opacity: .6; }
|
| 88 |
.mode-hint {
|
|
@@ -251,6 +252,9 @@
|
|
| 251 |
<button class="seg-btn" data-mode="hubble_launch" onclick="selectMode('hubble_launch')">
|
| 252 |
⑤ 启动页面
|
| 253 |
</button>
|
|
|
|
|
|
|
|
|
|
| 254 |
</div>
|
| 255 |
<div class="mode-hint" id="mode-hint">
|
| 256 |
恢复港版 mobile 包的登录页配置 (Google / 邮箱等入口). 不影响账号, 不动 did.
|
|
@@ -373,7 +377,15 @@
|
|
| 373 |
btnLabel: "🚀 仅启动页面",
|
| 374 |
btnLabelDone: "✓ 再启动一次",
|
| 375 |
btnColor: "btn-teal",
|
| 376 |
-
hint: "仅暖机 + 等待插件 + 启动认证页. 适合同步后重试白屏. 约需
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 377 |
ringColor: "hubble",
|
| 378 |
},
|
| 379 |
};
|
|
@@ -435,17 +447,17 @@
|
|
| 435 |
fg.classList.add("run");
|
| 436 |
label.classList.add("run");
|
| 437 |
if (modeCls) { fg.classList.add(modeCls); label.classList.add(modeCls); }
|
| 438 |
-
const runLabel = {restore: "进行中", sync: "同步中", hubble: "同步中", hubble_sync: "同步中", hubble_launch: "启动中"}[currentMode] || "进行中";
|
| 439 |
label.innerHTML = `<span class="spinner"></span>${runLabel}`;
|
| 440 |
} else if (state === "ok") {
|
| 441 |
fg.classList.add("ok");
|
| 442 |
label.classList.add("ok");
|
| 443 |
-
const okLabel = {restore: "✓ 修复成功", sync: "✓ 同步成功", hubble: "✓ 同步成功", hubble_sync: "✓ 同步成功", hubble_launch: "✓ 启动成功"}[currentMode] || "✓ 完成";
|
| 444 |
label.textContent = okLabel;
|
| 445 |
} else if (state === "err") {
|
| 446 |
fg.classList.add("err");
|
| 447 |
label.classList.add("err");
|
| 448 |
-
const errLabel = {restore: "✗ 修复失败", sync: "✗ 同步失败", hubble: "✗ 同步失败", hubble_sync: "✗ 同步失败", hubble_launch: "✗ 启动失败"}[currentMode] || "✗ 失败";
|
| 449 |
label.textContent = errLabel;
|
| 450 |
} else {
|
| 451 |
label.textContent = "就绪";
|
|
@@ -522,7 +534,7 @@
|
|
| 522 |
const btn = document.getElementById("btn-start");
|
| 523 |
btn.disabled = true;
|
| 524 |
btn.className = "btn btn-warn";
|
| 525 |
-
btn.textContent = {restore: "修复中…", sync: "同步中…", hubble: "同步中…", hubble_sync: "同步中…", hubble_launch: "启动中…"}[currentMode] || "执行中…";
|
| 526 |
running = true;
|
| 527 |
|
| 528 |
for (const id of ["ssh-cmd", "ssh-pwd"])
|
|
|
|
| 83 |
.mode-seg .seg-btn.active[data-mode="hubble"] { border-top: 2px solid var(--primary3); }
|
| 84 |
.mode-seg .seg-btn.active[data-mode="hubble_sync"] { border-top: 2px solid var(--primary3); }
|
| 85 |
.mode-seg .seg-btn.active[data-mode="hubble_launch"] { border-top: 2px solid var(--primary3); }
|
| 86 |
+
.mode-seg .seg-btn.active[data-mode="hubble_quick"] { border-top: 2px solid var(--primary3); }
|
| 87 |
.mode-seg .seg-btn:hover:not(.active):not(:disabled) { color: #212529; }
|
| 88 |
.mode-seg .seg-btn:disabled { cursor: not-allowed; opacity: .6; }
|
| 89 |
.mode-hint {
|
|
|
|
| 252 |
<button class="seg-btn" data-mode="hubble_launch" onclick="selectMode('hubble_launch')">
|
| 253 |
⑤ 启动页面
|
| 254 |
</button>
|
| 255 |
+
<button class="seg-btn" data-mode="hubble_quick" onclick="selectMode('hubble_quick')">
|
| 256 |
+
⑥ 快速启动
|
| 257 |
+
</button>
|
| 258 |
</div>
|
| 259 |
<div class="mode-hint" id="mode-hint">
|
| 260 |
恢复港版 mobile 包的登录页配置 (Google / 邮箱等入口). 不影响账号, 不动 did.
|
|
|
|
| 377 |
btnLabel: "🚀 仅启动页面",
|
| 378 |
btnLabelDone: "✓ 再启动一次",
|
| 379 |
btnColor: "btn-teal",
|
| 380 |
+
hint: "仅暖机 + 等待插件 + 启动认证页. 适合同步后重试白屏. 约需 2 分钟.",
|
| 381 |
+
ringColor: "hubble",
|
| 382 |
+
},
|
| 383 |
+
hubble_quick: {
|
| 384 |
+
endpoint: "/api/v2/hubble_quick",
|
| 385 |
+
btnLabel: "⚡ 快速启动",
|
| 386 |
+
btnLabelDone: "⚡ 再来一次",
|
| 387 |
+
btnColor: "btn-teal",
|
| 388 |
+
hint: "只发启动命令, 不暖机不等待. ~15 秒极速, 但不保证成功.",
|
| 389 |
ringColor: "hubble",
|
| 390 |
},
|
| 391 |
};
|
|
|
|
| 447 |
fg.classList.add("run");
|
| 448 |
label.classList.add("run");
|
| 449 |
if (modeCls) { fg.classList.add(modeCls); label.classList.add(modeCls); }
|
| 450 |
+
const runLabel = {restore: "进行中", sync: "同步中", hubble: "同步中", hubble_sync: "同步中", hubble_launch: "启动中", hubble_quick: "启动中"}[currentMode] || "进行中";
|
| 451 |
label.innerHTML = `<span class="spinner"></span>${runLabel}`;
|
| 452 |
} else if (state === "ok") {
|
| 453 |
fg.classList.add("ok");
|
| 454 |
label.classList.add("ok");
|
| 455 |
+
const okLabel = {restore: "✓ 修复成功", sync: "✓ 同步成功", hubble: "✓ 同步成功", hubble_sync: "✓ 同步成功", hubble_launch: "✓ 启动成功", hubble_quick: "⚡ 已发送"}[currentMode] || "✓ 完成";
|
| 456 |
label.textContent = okLabel;
|
| 457 |
} else if (state === "err") {
|
| 458 |
fg.classList.add("err");
|
| 459 |
label.classList.add("err");
|
| 460 |
+
const errLabel = {restore: "✗ 修复失败", sync: "✗ 同步失败", hubble: "✗ 同步失败", hubble_sync: "✗ 同步失败", hubble_launch: "✗ 启动失败", hubble_quick: "✗ 失败"}[currentMode] || "✗ 失败";
|
| 461 |
label.textContent = errLabel;
|
| 462 |
} else {
|
| 463 |
label.textContent = "就绪";
|
|
|
|
| 534 |
const btn = document.getElementById("btn-start");
|
| 535 |
btn.disabled = true;
|
| 536 |
btn.className = "btn btn-warn";
|
| 537 |
+
btn.textContent = {restore: "修复中…", sync: "同步中…", hubble: "同步中…", hubble_sync: "同步中…", hubble_launch: "启动中…", hubble_quick: "发送中…"}[currentMode] || "执行中…";
|
| 538 |
running = true;
|
| 539 |
|
| 540 |
for (const id of ["ssh-cmd", "ssh-pwd"])
|