113 lines
6.4 KiB
JavaScript
113 lines
6.4 KiB
JavaScript
// Top-of-page HTML templates split from index.html.
|
|
(function mountTopTemplates() {
|
|
const topMount = document.getElementById("topTemplatesMount");
|
|
if (!topMount) return;
|
|
topMount.innerHTML = `
|
|
<header class="header commandBar">
|
|
<div class="brandBlock">
|
|
<div class="brandMark" aria-hidden="true">
|
|
<svg viewBox="0 0 32 32" fill="none">
|
|
<rect x="3" y="3" width="26" height="26" rx="7" fill="currentColor" opacity="0.18"/>
|
|
<rect x="3" y="3" width="26" height="26" rx="7" stroke="currentColor" stroke-width="1.5"/>
|
|
<path d="M13 10.5v11l9-5.5z" fill="currentColor"/>
|
|
<circle cx="22" cy="10" r="2" fill="currentColor"/>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<div class="title">抖音挂机</div>
|
|
<div class="subtitle">专业版 v2.6.1</div>
|
|
</div>
|
|
</div>
|
|
<div class="header-actions">
|
|
<div class="actionGroup primaryActions">
|
|
<button id="btnStart" class="btn btnPrimary" data-kbd-mod="1" data-kbd="↵">
|
|
<span class="btnIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4v16l13-8z"/></svg>
|
|
</span>
|
|
开始运行
|
|
</button>
|
|
<button id="btnStop" class="btn btnDangerSoft">
|
|
<span class="btnIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="6" width="12" height="12" rx="2"/></svg>
|
|
</span>
|
|
停止
|
|
</button>
|
|
<button id="btnForceStop" class="btn btnDanger">
|
|
<span class="btnIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
|
|
</span>
|
|
强制停止
|
|
</button>
|
|
</div>
|
|
<div class="actionGroup secondaryActions">
|
|
<button id="btnRefresh" class="btn btnSoft">
|
|
<span class="btnIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-2.64-6.36"/><path d="M21 3v6h-6"/></svg>
|
|
</span>
|
|
刷新设备
|
|
</button>
|
|
<button id="btnScreenshot" class="btn btnSoft">
|
|
<span class="btnIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>
|
|
</span>
|
|
截图
|
|
</button>
|
|
<button id="btnBackKey" class="btn btnSoft">
|
|
<span class="btnIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 14-4-4 4-4"/><path d="M5 10h11a4 4 0 0 1 0 8h-1"/></svg>
|
|
</span>
|
|
返回键
|
|
</button>
|
|
<button id="btnLoad" class="btn btnGhost">
|
|
<span class="btnIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="M7 10l5 5 5-5"/><path d="M12 15V3"/></svg>
|
|
</span>
|
|
加载配置
|
|
</button>
|
|
<button id="btnSave" class="btn btnPrimary" data-kbd-mod="1" data-kbd="S">
|
|
<span class="btnIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h11l5 5v9a2 2 0 0 1-2 2z"/><path d="M17 21v-8H7v8"/><path d="M7 3v5h8"/></svg>
|
|
</span>
|
|
保存配置
|
|
</button>
|
|
<button id="btnTheme" class="btn btnGhost btnIconOnly" type="button" aria-label="切换主题" data-tooltip="切换主题" data-tooltip-pos="bottom">
|
|
<span class="btnIcon themeIconSun" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
|
|
</span>
|
|
<span class="btnIcon themeIconMoon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<section class="overview statusStrip" aria-label="运行概览">
|
|
<article class="overviewCard overviewPrimary">
|
|
<div class="overviewLabel">运行状态</div>
|
|
<div class="overviewValue">
|
|
<span id="topRunDot" class="statusDot" aria-hidden="true"></span>
|
|
<span id="topRunState">等待启动</span>
|
|
</div>
|
|
<div class="overviewMeta" id="topRunMeta">PID - / 运行时长 -</div>
|
|
</article>
|
|
<article class="overviewCard">
|
|
<div class="overviewLabel">设备连接</div>
|
|
<div class="overviewValue" id="topDeviceState">未刷新</div>
|
|
<div class="overviewMeta" id="topAdbState">ADB 状态待检测</div>
|
|
</article>
|
|
<article class="overviewCard">
|
|
<div class="overviewLabel">福袋处理</div>
|
|
<div class="overviewValue" id="topFudaiState">0 / 0</div>
|
|
<div class="overviewMeta" id="topFudaiMeta">打开详情 / 成功参与</div>
|
|
<svg id="topFudaiSparkline" class="overviewSpark" viewBox="0 0 100 24" preserveAspectRatio="none" aria-hidden="true"></svg>
|
|
</article>
|
|
<article class="overviewCard">
|
|
<div class="overviewLabel">日志缓存</div>
|
|
<div class="overviewValue" id="topLogState">-</div>
|
|
<div class="overviewMeta" id="topLogMeta">最后日志 -</div>
|
|
</article>
|
|
</section>
|
|
`;
|
|
})();
|