72 lines
3.4 KiB
HTML
72 lines
3.4 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>插件管理</title>
|
|
<link rel="stylesheet" href="../styles.css">
|
|
</head>
|
|
<body>
|
|
<main class="shell">
|
|
<header class="topbar">
|
|
<div>
|
|
<p class="eyebrow">SUB2API EXTENSIONS</p>
|
|
<h1>插件管理</h1>
|
|
<p class="muted">独立业务插件控制面</p>
|
|
</div>
|
|
<div class="top-actions">
|
|
<span id="operator" class="operator"></span>
|
|
<button id="logout" class="button button-quiet" hidden>退出</button>
|
|
</div>
|
|
</header>
|
|
|
|
<section id="login-panel" class="panel auth-panel">
|
|
<h2>管理员登录</h2>
|
|
<p class="muted">使用 Sub2API Core 管理员账号登录。普通账号没有访问权限。</p>
|
|
<form id="login-form" class="form-grid">
|
|
<label>邮箱<input name="email" type="email" autocomplete="username" required></label>
|
|
<label>密码<input name="password" type="password" autocomplete="current-password" required></label>
|
|
<button class="button" type="submit">登录</button>
|
|
</form>
|
|
<form id="twofa-form" class="form-grid" hidden>
|
|
<label>验证码<input name="totp_code" inputmode="numeric" maxlength="6" pattern="[0-9]{6}" required></label>
|
|
<button class="button" type="submit">验证并继续</button>
|
|
</form>
|
|
<p id="login-error" class="error" role="alert"></p>
|
|
</section>
|
|
|
|
<section id="app-panel" hidden>
|
|
<div class="toolbar">
|
|
<div>
|
|
<h2>已登记插件</h2>
|
|
<p class="muted">安装包会先验签、校验哈希和 Core 兼容性,再进入停用状态。</p>
|
|
</div>
|
|
<div class="toolbar-actions">
|
|
<label class="file-button">安装插件<input id="package-file" type="file" accept=".zip,.s2plugin,application/zip"></label>
|
|
<button id="refresh" class="button button-secondary" type="button">刷新</button>
|
|
</div>
|
|
</div>
|
|
<p id="notice" class="notice" role="status"></p>
|
|
<div id="plugins" class="plugin-list"></div>
|
|
<section class="panel audit-panel">
|
|
<div class="section-heading"><h2>操作审计</h2><button id="audit-refresh" class="button button-quiet" type="button">刷新</button></div>
|
|
<div id="audit" class="audit-list"></div>
|
|
</section>
|
|
</section>
|
|
</main>
|
|
<dialog id="config-dialog" class="config-dialog">
|
|
<form id="config-form" method="dialog" class="config-form">
|
|
<div class="section-heading"><h2>插件配置</h2><button id="config-close" class="button button-quiet" type="button">关闭</button></div>
|
|
<p id="config-plugin" class="muted mono"></p>
|
|
<label>服务地址<input name="service_url" type="url" placeholder="http://127.0.0.1:18090" required></label>
|
|
<label>菜单地址<input name="public_url" type="url" placeholder="https://CORE_ORIGIN/extensions/PLUGIN_ID/"></label>
|
|
<p class="muted">密钥只在服务端加密保存,页面不会回显原值。</p>
|
|
<div class="dialog-actions"><button id="config-cancel" class="button button-secondary" type="button">取消</button><button class="button" type="submit">保存配置</button></div>
|
|
<p id="config-error" class="error" role="alert"></p>
|
|
</form>
|
|
</dialog>
|
|
<script>window.__PLUGIN_BASE_PATH__ = __PLUGIN_BASE_PATH_JSON__;</script>
|
|
<script src="../app.js" defer></script>
|
|
</body>
|
|
</html>
|