@fish-under-sea/magpie-dragonapi 0.2.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -18
- package/index.mjs +7 -7
- package/lib/dashboard.mjs +69 -0
- package/lib/pricing.mjs +35 -4
- package/lib/service.mjs +177 -30
- package/lib/site.mjs +304 -38
- package/lib/usage.mjs +12 -0
- package/package.json +3 -3
- package/page/icon.png +0 -0
- package/page/index.html +2 -2
- package/page/star.png +0 -0
- package/ui/app.js +2124 -431
- package/ui/demo.js +256 -0
- package/ui/icon.png +0 -0
- package/ui/index.html +221 -95
- package/ui/model-agg.js +458 -0
- package/ui/style.css +1633 -65
- package/page/icon.svg +0 -12
package/ui/index.html
CHANGED
|
@@ -15,13 +15,7 @@
|
|
|
15
15
|
<header class="topbar">
|
|
16
16
|
<div class="brand">
|
|
17
17
|
<span class="brand-mark" aria-hidden="true">
|
|
18
|
-
<
|
|
19
|
-
<path d="M12 2.6 20.4 6v6.1c0 4.4-3.5 7.6-8.4 9.3-4.9-1.7-8.4-4.9-8.4-9.3V6L12 2.6Z"
|
|
20
|
-
fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"/>
|
|
21
|
-
<path d="M12 7.2 16 9v3.4c0 2.4-1.8 4.2-4 5.1-2.2-.9-4-2.7-4-5.1V9l4-1.8Z"
|
|
22
|
-
fill="currentColor" opacity=".26"/>
|
|
23
|
-
<circle cx="12" cy="11.3" r="1.15" fill="currentColor"/>
|
|
24
|
-
</svg>
|
|
18
|
+
<img src="icon.png" alt="" width="28" height="28" loading="eager">
|
|
25
19
|
</span>
|
|
26
20
|
<div class="brand-text">
|
|
27
21
|
<h1>DragonAPI</h1>
|
|
@@ -34,21 +28,21 @@
|
|
|
34
28
|
<span class="dot" id="conn-dot" aria-hidden="true"></span>
|
|
35
29
|
<span id="conn-text">连接中…</span>
|
|
36
30
|
</span>
|
|
37
|
-
<
|
|
38
|
-
<button class="btn ghost" id="refresh-btn" type="button" title="强制重新拉取全部数据">刷新</button>
|
|
39
|
-
<button class="btn" id="pat-shortcut" type="button">访问令牌</button>
|
|
31
|
+
<button class="pill pill-btn" id="refresh-btn" type="button" title="强制重新拉取全部数据">刷新</button>
|
|
40
32
|
</div>
|
|
41
33
|
</header>
|
|
42
34
|
|
|
43
35
|
<nav class="tabs" role="tablist" aria-label="功能分页">
|
|
44
|
-
<button class="tab" role="tab" type="button" id="tab-catalog" data-tab="catalog"
|
|
45
|
-
aria-controls="panel-catalog" aria-selected="true" tabindex="0">模型广场</button>
|
|
46
36
|
<button class="tab" role="tab" type="button" id="tab-wallet" data-tab="wallet"
|
|
47
|
-
aria-controls="panel-wallet" aria-selected="
|
|
48
|
-
<button class="tab" role="tab" type="button" id="tab-
|
|
49
|
-
aria-controls="panel-
|
|
37
|
+
aria-controls="panel-wallet" aria-selected="true" tabindex="0">账户概览</button>
|
|
38
|
+
<button class="tab" role="tab" type="button" id="tab-dashboard" data-tab="dashboard"
|
|
39
|
+
aria-controls="panel-dashboard" aria-selected="false" tabindex="-1">数据看板</button>
|
|
40
|
+
<button class="tab" role="tab" type="button" id="tab-catalog" data-tab="catalog"
|
|
41
|
+
aria-controls="panel-catalog" aria-selected="false" tabindex="-1">模型广场</button>
|
|
42
|
+
<button class="tab" role="tab" type="button" id="tab-logs" data-tab="logs"
|
|
43
|
+
aria-controls="panel-logs" aria-selected="false" tabindex="-1">使用日志</button>
|
|
50
44
|
<button class="tab" role="tab" type="button" id="tab-pat" data-tab="pat"
|
|
51
|
-
aria-controls="panel-pat" aria-selected="false" tabindex="
|
|
45
|
+
aria-controls="panel-pat" aria-selected="false" tabindex="-1">访问令牌</button>
|
|
52
46
|
</nav>
|
|
53
47
|
|
|
54
48
|
<div class="banners" id="banners" aria-live="polite"></div>
|
|
@@ -65,16 +59,16 @@
|
|
|
65
59
|
<div class="market-tools">
|
|
66
60
|
<div class="market-seg" id="unit-seg" role="group" aria-label="价格单位">
|
|
67
61
|
<button type="button" data-unit="M" aria-pressed="true" title="每百万 token">/1M</button>
|
|
68
|
-
<button type="button" data-unit="
|
|
62
|
+
<button type="button" data-unit="272K" aria-pressed="false" title="每 272K token(分档模型取 ≤272K 那一档)">/272K</button>
|
|
69
63
|
</div>
|
|
70
64
|
<div class="menu" id="sort-menu">
|
|
71
65
|
<button class="market-tool menu-trigger" id="sort-trigger" type="button"
|
|
72
66
|
aria-haspopup="listbox" aria-expanded="false" aria-controls="sort-pop" title="排序">
|
|
73
|
-
<span id="sort-label"
|
|
67
|
+
<span id="sort-label">默认排序</span>
|
|
74
68
|
<span class="menu-caret" aria-hidden="true">▾</span>
|
|
75
69
|
</button>
|
|
76
70
|
<div class="menu-pop" id="sort-pop" role="listbox" aria-label="排序" hidden>
|
|
77
|
-
<button type="button" role="option" data-sort="latest" aria-selected="true"
|
|
71
|
+
<button type="button" role="option" data-sort="latest" aria-selected="true">默认排序</button>
|
|
78
72
|
<button type="button" role="option" data-sort="name" aria-selected="false">名称</button>
|
|
79
73
|
<button type="button" role="option" data-sort="price-asc" aria-selected="false">价格:从低到高</button>
|
|
80
74
|
<button type="button" role="option" data-sort="price-desc" aria-selected="false">价格:从高到低</button>
|
|
@@ -85,6 +79,10 @@
|
|
|
85
79
|
<button type="button" data-view="list" aria-pressed="false" title="单列列表">▤</button>
|
|
86
80
|
</div>
|
|
87
81
|
</div>
|
|
82
|
+
|
|
83
|
+
<!-- 统计行放工具条内、胶囊下方:不再压在内容区顶部,
|
|
84
|
+
筛选栏与内容区从同一水平线开始,左右顶部对齐 -->
|
|
85
|
+
<div class="market-count" id="catalog-meta"></div>
|
|
88
86
|
</div>
|
|
89
87
|
|
|
90
88
|
<div class="market-body">
|
|
@@ -102,116 +100,244 @@
|
|
|
102
100
|
<div class="market-main">
|
|
103
101
|
<div class="group-banner" id="group-banner" hidden></div>
|
|
104
102
|
|
|
105
|
-
<div class="market-count" id="catalog-meta"></div>
|
|
106
103
|
<div class="model-grid" id="catalog-body">
|
|
107
104
|
<p class="loading">正在读取模型目录…</p>
|
|
108
105
|
</div>
|
|
109
|
-
<p class="foot-note">只读展示:价格由站点 <code>/api/pricing</code> 解析而来,解析不出来就标「价格未知」,不猜。</p>
|
|
110
106
|
</div>
|
|
111
107
|
</div>
|
|
112
108
|
</section>
|
|
113
109
|
|
|
114
|
-
<!--
|
|
110
|
+
<!-- 使用日志:仿 NearToken 的「使用日志」——筛选条 + 统计条 + 明细表 -->
|
|
111
|
+
<section class="panel" id="panel-logs" role="tabpanel" aria-labelledby="tab-logs" data-panel="logs" hidden>
|
|
112
|
+
<div class="card logs-card">
|
|
113
|
+
<div class="logs-head-box">
|
|
114
|
+
<div class="logs-toolbar">
|
|
115
|
+
<div class="logs-filters">
|
|
116
|
+
<div class="menu logs-range-menu">
|
|
117
|
+
<button class="logs-range menu-trigger" id="logs-range-btn" type="button"
|
|
118
|
+
aria-haspopup="listbox" aria-expanded="false" aria-controls="logs-range-pop">
|
|
119
|
+
<svg class="logs-range-ico" viewBox="0 0 24 24" width="14" height="14" fill="none"
|
|
120
|
+
stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
121
|
+
<rect x="3" y="5" width="18" height="16" rx="2"/><path d="M8 3v4M16 3v4M3 10h18"/>
|
|
122
|
+
</svg>
|
|
123
|
+
<span id="logs-range-text">—</span>
|
|
124
|
+
</button>
|
|
125
|
+
<div class="menu-pop" id="logs-range-pop" role="listbox" aria-label="时间范围" hidden>
|
|
126
|
+
<button type="button" role="option" data-log-range="day" aria-selected="true">今天</button>
|
|
127
|
+
<button type="button" role="option" data-log-range="week" aria-selected="false">近 7 天</button>
|
|
128
|
+
<button type="button" role="option" data-log-range="month" aria-selected="false">近 30 天</button>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<label class="sr-only" for="logs-model">模型名称</label>
|
|
132
|
+
<input id="logs-model" class="logs-input" type="search" placeholder="模型名称" autocomplete="off">
|
|
133
|
+
<label class="sr-only" for="logs-group">分组</label>
|
|
134
|
+
<select id="logs-group" class="logs-select" data-empty-label="全部分组"></select>
|
|
135
|
+
<label class="sr-only" for="logs-kind">类型</label>
|
|
136
|
+
<select id="logs-kind" class="logs-select" data-empty-label="全部类型"></select>
|
|
137
|
+
</div>
|
|
138
|
+
<button class="logs-expand" id="logs-more" type="button" aria-expanded="false">
|
|
139
|
+
<span>展开</span><span class="logs-caret" aria-hidden="true">▾</span>
|
|
140
|
+
</button>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="logs-filters logs-filters-adv" id="logs-more-row" hidden>
|
|
143
|
+
<label class="sr-only" for="logs-token">令牌名称</label>
|
|
144
|
+
<input id="logs-token" class="logs-input" type="search" placeholder="令牌名称" autocomplete="off">
|
|
145
|
+
<label class="sr-only" for="logs-request">请求 ID</label>
|
|
146
|
+
<input id="logs-request" class="logs-input" type="search" placeholder="请求 ID" autocomplete="off">
|
|
147
|
+
<label class="sr-only" for="logs-uprequest">上游请求 ID</label>
|
|
148
|
+
<input id="logs-uprequest" class="logs-input" type="search" placeholder="上游请求 ID" autocomplete="off">
|
|
149
|
+
</div>
|
|
150
|
+
<div class="logs-chips-bar">
|
|
151
|
+
<div class="logs-chips" id="logs-chips"></div>
|
|
152
|
+
<div class="logs-tools" id="logs-tools"></div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="logs-body" id="logs-body"><p class="loading">正在读取日志…</p></div>
|
|
156
|
+
<div class="logs-pager" id="logs-pager"></div>
|
|
157
|
+
</div>
|
|
158
|
+
</section>
|
|
159
|
+
|
|
160
|
+
<!-- 数据看板:照站点 /dashboard/models 的统计卡片 + 消耗分布 + 调用分析 -->
|
|
161
|
+
<section class="panel" id="panel-dashboard" role="tabpanel" aria-labelledby="tab-dashboard" data-panel="dashboard" hidden>
|
|
162
|
+
<div class="dash-head">
|
|
163
|
+
<h3 class="dash-title">模型调用分析</h3>
|
|
164
|
+
<div class="dash-head-right">
|
|
165
|
+
<div class="segmented" id="dash-days" role="group" aria-label="时间范围">
|
|
166
|
+
<button type="button" data-dash-days="1" aria-pressed="true">1 天</button>
|
|
167
|
+
<button type="button" data-dash-days="7" aria-pressed="false">7 天</button>
|
|
168
|
+
<button type="button" data-dash-days="14" aria-pressed="false">14 天</button>
|
|
169
|
+
<button type="button" data-dash-days="29" aria-pressed="false">29 天</button>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="market-seg" id="dash-gran" role="group" aria-label="时间粒度">
|
|
172
|
+
<button type="button" data-dash-gran="hour" aria-pressed="true" title="按小时">时</button>
|
|
173
|
+
<button type="button" data-dash-gran="day" aria-pressed="false" title="按天">日</button>
|
|
174
|
+
<button type="button" data-dash-gran="week" aria-pressed="false" title="按周">周</button>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
<div class="dash-cards" id="dash-cards"></div>
|
|
179
|
+
|
|
180
|
+
<div class="card dash-card">
|
|
181
|
+
<header class="card-head">
|
|
182
|
+
<h3>消耗分布 <span class="card-sub" id="dash-usage-sub"></span></h3>
|
|
183
|
+
<div class="market-seg" id="dash-usage-kind" role="group" aria-label="图表类型">
|
|
184
|
+
<button type="button" data-usage-kind="bar" aria-pressed="false">柱状图</button>
|
|
185
|
+
<button type="button" data-usage-kind="area" aria-pressed="true">面积图</button>
|
|
186
|
+
</div>
|
|
187
|
+
</header>
|
|
188
|
+
<div class="dash-chart" id="dash-usage-chart"></div>
|
|
189
|
+
<div class="dash-legend" id="dash-usage-legend"></div>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<div class="card dash-card">
|
|
193
|
+
<header class="card-head">
|
|
194
|
+
<h3>模型调用分析 <span class="card-sub" id="dash-calls-sub"></span></h3>
|
|
195
|
+
<div class="market-seg" id="dash-calls-view" role="group" aria-label="调用分析视图">
|
|
196
|
+
<button type="button" data-calls-view="trend" aria-pressed="true">调用趋势</button>
|
|
197
|
+
<button type="button" data-calls-view="proportion" aria-pressed="false">调用次数分布</button>
|
|
198
|
+
<button type="button" data-calls-view="top" aria-pressed="false">调用次数排行</button>
|
|
199
|
+
</div>
|
|
200
|
+
</header>
|
|
201
|
+
<div class="dash-chart" id="dash-calls-chart"></div>
|
|
202
|
+
</div>
|
|
203
|
+
</section>
|
|
204
|
+
|
|
205
|
+
<!-- 3. 余额与订阅:宽卡,左余额右订阅;整页不滚动 -->
|
|
115
206
|
<section class="panel" id="panel-wallet" role="tabpanel" aria-labelledby="tab-wallet" data-panel="wallet" hidden>
|
|
116
|
-
<
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<h3>账户概览</h3>
|
|
207
|
+
<div class="card wallet-wide">
|
|
208
|
+
<div class="wallet-col wallet-balance">
|
|
209
|
+
<header class="card-head wallet-head">
|
|
210
|
+
<h3 class="wallet-title">
|
|
211
|
+
<a class="wallet-link" href="https://newapi.dragon3api.com/wallet"
|
|
212
|
+
target="_blank" rel="noopener noreferrer" title="在 DragonAPI 站点打开钱包">钱包 <span class="wallet-arrow" aria-hidden="true">↗</span></a>
|
|
213
|
+
</h3>
|
|
124
214
|
<span class="card-sub" id="account-sub"></span>
|
|
125
215
|
</header>
|
|
126
216
|
<div id="account-body"><p class="loading">正在读取…</p></div>
|
|
127
217
|
</div>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
<button type="button" data-range="day" aria-pressed="true">日</button>
|
|
134
|
-
<button type="button" data-range="week" aria-pressed="false">周</button>
|
|
135
|
-
<button type="button" data-range="month" aria-pressed="false">月</button>
|
|
136
|
-
</div>
|
|
137
|
-
</header>
|
|
138
|
-
<div id="usage-body"><p class="loading">正在读取…</p></div>
|
|
218
|
+
<div class="wallet-col wallet-plan">
|
|
219
|
+
<!-- 订阅最多一条:余额在左,订阅在右 -->
|
|
220
|
+
<div id="subscriptions-body" class="wallet-sub" aria-live="polite">
|
|
221
|
+
<p class="loading">正在读取订阅…</p>
|
|
222
|
+
</div>
|
|
139
223
|
</div>
|
|
140
224
|
</div>
|
|
141
225
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
226
|
+
<!-- 推荐计划:放在 API 密钥上面(原站钱包页同位)——
|
|
227
|
+
待确认 / 总收入 / 邀请三列 + 链接胶囊 + 复制 + 转移到余额 -->
|
|
228
|
+
<div class="card aff-card">
|
|
229
|
+
<div class="rf" id="aff-body"><p class="loading">正在读取推荐计划</p></div>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<!-- 已有钥匙:仿原站「API 密钥」页——标题行(+ 创建按钮)+ 筛选行 + 表格,整宽 -->
|
|
233
|
+
<div class="card keys-page">
|
|
234
|
+
<div class="keys-titlebar">
|
|
235
|
+
<h3>API 密钥</h3>
|
|
236
|
+
<div class="keys-title-actions">
|
|
237
|
+
<button class="btn ghost keys-addr" id="keys-api-addr" type="button" title="复制 API 地址">
|
|
238
|
+
API 地址 <span class="keys-caret" aria-hidden="true">▾</span>
|
|
239
|
+
</button>
|
|
240
|
+
<button class="btn primary" id="key-create-open" type="button">+ 创建 API 密钥</button>
|
|
149
241
|
</div>
|
|
150
|
-
</
|
|
151
|
-
<div
|
|
242
|
+
</div>
|
|
243
|
+
<div class="keys-filterbar">
|
|
244
|
+
<label class="sr-only" for="keys-filter-name">按名称筛选</label>
|
|
245
|
+
<input id="keys-filter-name" class="keys-input" type="search" placeholder="按名称筛选…" autocomplete="off">
|
|
246
|
+
<label class="sr-only" for="keys-filter-key">按 API 密钥筛选</label>
|
|
247
|
+
<input id="keys-filter-key" class="keys-input" type="search" placeholder="按 API 密钥筛选…" autocomplete="off">
|
|
248
|
+
<label class="sr-only" for="keys-filter-status">按状态筛选</label>
|
|
249
|
+
<select id="keys-filter-status" class="keys-select" data-empty-label="全部状态">
|
|
250
|
+
<option value="">所有状态</option>
|
|
251
|
+
<option value="1">已启用</option>
|
|
252
|
+
<option value="2">已禁用</option>
|
|
253
|
+
</select>
|
|
254
|
+
<div class="menu keys-view-menu">
|
|
255
|
+
<button class="btn ghost menu-trigger" id="keys-view-btn" type="button"
|
|
256
|
+
aria-haspopup="listbox" aria-expanded="false" aria-controls="keys-view-pop">
|
|
257
|
+
查看 <span class="menu-caret" aria-hidden="true">▾</span>
|
|
258
|
+
</button>
|
|
259
|
+
<div class="menu-pop" id="keys-view-pop" role="listbox" aria-label="切换列" hidden></div>
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
<div id="keys-body"><p class="loading">正在读取…</p></div>
|
|
152
263
|
</div>
|
|
264
|
+
|
|
265
|
+
<div id="secret-slot"></div>
|
|
153
266
|
</section>
|
|
154
267
|
|
|
155
|
-
<!--
|
|
156
|
-
<
|
|
157
|
-
<
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<
|
|
164
|
-
|
|
268
|
+
<!-- 新建钥匙弹窗:仿原站「创建 API 密钥」对话框(三段式 + 无限配额开关) -->
|
|
269
|
+
<div class="modal-backdrop" id="key-modal" hidden>
|
|
270
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="key-modal-title">
|
|
271
|
+
<header class="modal-head">
|
|
272
|
+
<div>
|
|
273
|
+
<h2 id="key-modal-title">创建 API 密钥</h2>
|
|
274
|
+
<p class="modal-sub">通过提供必要信息添加新的 API 密钥。</p>
|
|
275
|
+
</div>
|
|
276
|
+
<button class="modal-x" id="key-modal-close" type="button" aria-label="关闭">×</button>
|
|
277
|
+
</header>
|
|
278
|
+
<form id="key-form" class="form modal-form" novalidate>
|
|
279
|
+
<section class="modal-sec">
|
|
280
|
+
<header class="modal-sec-head">
|
|
281
|
+
<span class="modal-sec-ico" aria-hidden="true">⚿</span>
|
|
282
|
+
<div>
|
|
283
|
+
<h3>基本信息</h3>
|
|
284
|
+
<p>设置令牌的基本信息</p>
|
|
285
|
+
</div>
|
|
286
|
+
</header>
|
|
287
|
+
<div class="field">
|
|
288
|
+
<label for="key-name">名称</label>
|
|
289
|
+
<input id="key-name" name="name" type="text" maxlength="64" autocomplete="off"
|
|
290
|
+
placeholder="输入名称" required>
|
|
291
|
+
</div>
|
|
165
292
|
<div class="field">
|
|
166
293
|
<label for="key-group">分组</label>
|
|
167
294
|
<select id="key-group" name="group" required></select>
|
|
168
295
|
</div>
|
|
169
296
|
<div class="field">
|
|
170
|
-
<label for="key-
|
|
171
|
-
<
|
|
172
|
-
|
|
297
|
+
<label for="key-expire">过期时间</label>
|
|
298
|
+
<select id="key-expire" name="expire">
|
|
299
|
+
<option value="0">永不过期</option>
|
|
300
|
+
<option value="3600">1 小时</option>
|
|
301
|
+
<option value="86400">1 天</option>
|
|
302
|
+
<option value="2592000">1 个月</option>
|
|
303
|
+
</select>
|
|
173
304
|
</div>
|
|
174
|
-
|
|
175
|
-
|
|
305
|
+
</section>
|
|
306
|
+
|
|
307
|
+
<section class="modal-sec">
|
|
308
|
+
<header class="modal-sec-head">
|
|
309
|
+
<span class="modal-sec-ico" aria-hidden="true">◎</span>
|
|
310
|
+
<div>
|
|
311
|
+
<h3>额度设置</h3>
|
|
312
|
+
<p>设置令牌可用额度和数量</p>
|
|
313
|
+
</div>
|
|
314
|
+
</header>
|
|
315
|
+
<div class="field quota-row">
|
|
316
|
+
<div class="grow">
|
|
317
|
+
<label class="check-label" for="key-unlimited">无限配额</label>
|
|
318
|
+
<p class="hint">为此 API 密钥启用无限配额</p>
|
|
319
|
+
</div>
|
|
320
|
+
<label class="switch">
|
|
176
321
|
<input type="checkbox" id="key-unlimited" checked>
|
|
177
|
-
<
|
|
322
|
+
<i aria-hidden="true"></i>
|
|
178
323
|
</label>
|
|
179
324
|
</div>
|
|
180
325
|
<div class="field">
|
|
181
|
-
<label for="key-quota"
|
|
326
|
+
<label for="key-quota">额度(站点币种)</label>
|
|
182
327
|
<input id="key-quota" name="quota" type="number" min="0" step="0.01" inputmode="decimal"
|
|
183
328
|
placeholder="例如 10" disabled>
|
|
184
|
-
<p class="hint">按站点币种填写;取消「无限额度」后才生效。</p>
|
|
185
329
|
</div>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
<div class="card">
|
|
193
|
-
<header class="card-head"><h3>怎么绑进 magpie</h3></header>
|
|
194
|
-
<div id="bind-info-body"><p class="loading">正在读取绑定说明…</p></div>
|
|
195
|
-
</div>
|
|
330
|
+
</section>
|
|
331
|
+
</form>
|
|
332
|
+
<footer class="modal-foot">
|
|
333
|
+
<button class="btn ghost" id="key-modal-cancel" type="button">关闭</button>
|
|
334
|
+
<button class="btn primary" id="key-submit" type="button">保存更改</button>
|
|
335
|
+
</footer>
|
|
196
336
|
</div>
|
|
197
|
-
|
|
198
|
-
<div id="secret-slot"></div>
|
|
199
|
-
|
|
200
|
-
<div class="card">
|
|
201
|
-
<header class="card-head">
|
|
202
|
-
<h3>已有钥匙</h3>
|
|
203
|
-
<span class="card-sub" id="keys-count"></span>
|
|
204
|
-
</header>
|
|
205
|
-
<div id="keys-body"><p class="loading">正在读取…</p></div>
|
|
206
|
-
</div>
|
|
207
|
-
</section>
|
|
337
|
+
</div>
|
|
208
338
|
|
|
209
339
|
<!-- 4. 访问令牌(PAT) -->
|
|
210
340
|
<section class="panel" id="panel-pat" role="tabpanel" aria-labelledby="tab-pat" data-panel="pat" hidden>
|
|
211
|
-
<header class="page-head">
|
|
212
|
-
<h2>访问令牌</h2>
|
|
213
|
-
<p class="page-sub">PAT 用来读账户、建密钥、看余额。它只能由你在浏览器里创建,插件无法代登录。</p>
|
|
214
|
-
</header>
|
|
215
341
|
<div class="grid-2">
|
|
216
342
|
<div class="card">
|
|
217
343
|
<header class="card-head">
|
|
@@ -248,7 +374,7 @@
|
|
|
248
374
|
<tr><td class="mono">api_key:write</td><td>新建 / 删除钥匙</td></tr>
|
|
249
375
|
<tr><td class="mono">api_key:reveal</td><td>查看完整钥匙(<code>reveal</code>)</td></tr>
|
|
250
376
|
<tr><td class="mono">usage:read</td><td>看用量与流水</td></tr>
|
|
251
|
-
<tr><td class="mono">wallet:read</td><td
|
|
377
|
+
<tr><td class="mono">wallet:read</td><td>读取订阅、套餐与邀请</td></tr>
|
|
252
378
|
</tbody>
|
|
253
379
|
</table>
|
|
254
380
|
</div>
|
|
@@ -292,4 +418,4 @@
|
|
|
292
418
|
|
|
293
419
|
<script type="module" src="app.js"></script>
|
|
294
420
|
</body>
|
|
295
|
-
</html>
|
|
421
|
+
</html>
|