@fish-under-sea/magpie-dragonapi 0.1.5 → 0.2.1
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 +45 -8
- package/index.mjs +9 -8
- package/lib/pricing.mjs +132 -6
- package/lib/service.mjs +95 -18
- package/lib/site.mjs +104 -4
- package/lib/store.mjs +18 -6
- package/package.json +1 -1
- package/serve.mjs +5 -2
- package/ui/app.js +882 -165
- package/ui/index.html +42 -20
- package/ui/style.css +676 -99
- package/ui/vendor-icons/ByteDance.svg +1 -0
- package/ui/vendor-icons/Claude.Color.svg +1 -0
- package/ui/vendor-icons/DeepSeek.Color.svg +1 -0
- package/ui/vendor-icons/Flux.svg +1 -0
- package/ui/vendor-icons/Gemini.Color.svg +1 -0
- package/ui/vendor-icons/Hunyuan.Color.svg +1 -0
- package/ui/vendor-icons/Ideogram.svg +1 -0
- package/ui/vendor-icons/Jimeng.Color.svg +1 -0
- package/ui/vendor-icons/Midjourney.svg +1 -0
- package/ui/vendor-icons/Minimax.Color.svg +1 -0
- package/ui/vendor-icons/Moonshot.svg +1 -0
- package/ui/vendor-icons/OpenAI.svg +1 -0
- package/ui/vendor-icons/Qwen.Color.svg +1 -0
- package/ui/vendor-icons/XAI.svg +1 -0
- package/ui/vendor-icons/XiaomiMiMo.svg +1 -0
- package/ui/vendor-icons/Zhipu.Color.svg +1 -0
package/ui/index.html
CHANGED
|
@@ -57,31 +57,50 @@
|
|
|
57
57
|
|
|
58
58
|
<!-- 1. 模型广场:纯展示。这里刻意没有任何勾选框、开关或「已选」状态。 -->
|
|
59
59
|
<section class="panel" id="panel-catalog" role="tabpanel" aria-labelledby="tab-catalog" data-panel="catalog">
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
|
|
60
|
+
<!-- 工具条横跨整页(包含左侧筛选栏上方),筛选项在它下面,和 neartoken 一致 -->
|
|
61
|
+
<div class="market-top">
|
|
62
|
+
<label class="sr-only" for="catalog-search">搜索模型</label>
|
|
63
|
+
<input id="catalog-search" class="market-search" type="search" autocomplete="off" spellcheck="false"
|
|
64
|
+
placeholder="搜索模型名、厂商、端点或说明…">
|
|
65
|
+
<div class="market-tools">
|
|
66
|
+
<div class="market-seg" id="unit-seg" role="group" aria-label="价格单位">
|
|
67
|
+
<button type="button" data-unit="M" aria-pressed="true" title="每百万 token">/1M</button>
|
|
68
|
+
<button type="button" data-unit="K" aria-pressed="false" title="每千 token">/1K</button>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="menu" id="sort-menu">
|
|
71
|
+
<button class="market-tool menu-trigger" id="sort-trigger" type="button"
|
|
72
|
+
aria-haspopup="listbox" aria-expanded="false" aria-controls="sort-pop" title="排序">
|
|
73
|
+
<span id="sort-label">最新版本</span>
|
|
74
|
+
<span class="menu-caret" aria-hidden="true">▾</span>
|
|
75
|
+
</button>
|
|
76
|
+
<div class="menu-pop" id="sort-pop" role="listbox" aria-label="排序" hidden>
|
|
77
|
+
<button type="button" role="option" data-sort="latest" aria-selected="true">最新版本</button>
|
|
78
|
+
<button type="button" role="option" data-sort="name" aria-selected="false">名称</button>
|
|
79
|
+
<button type="button" role="option" data-sort="price-asc" aria-selected="false">价格:从低到高</button>
|
|
80
|
+
<button type="button" role="option" data-sort="price-desc" aria-selected="false">价格:从高到低</button>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="market-seg" id="view-seg" role="group" aria-label="视图">
|
|
84
|
+
<button type="button" data-view="grid" aria-pressed="true" title="双列卡片">▦</button>
|
|
85
|
+
<button type="button" data-view="list" aria-pressed="false" title="单列列表">▤</button>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
64
90
|
<div class="market-body">
|
|
65
91
|
<aside class="market-aside" aria-label="筛选">
|
|
66
92
|
<div class="ma-head">
|
|
67
93
|
<h3>筛选</h3>
|
|
68
94
|
<button class="link" id="catalog-reset" type="button">重置</button>
|
|
69
95
|
</div>
|
|
70
|
-
<p class="ma-note"
|
|
96
|
+
<p class="ma-note">分组决定倍率,也决定你需要哪把钥匙。</p>
|
|
71
97
|
|
|
72
|
-
<h4 id="aside-group-head">分组</h4>
|
|
98
|
+
<h4 id="aside-group-head"><span>分组</span><span class="h4-count" id="group-total"></span></h4>
|
|
73
99
|
<div class="market-chips" id="group-chips" role="group" aria-labelledby="aside-group-head"></div>
|
|
74
100
|
</aside>
|
|
75
101
|
|
|
76
102
|
<div class="market-main">
|
|
77
|
-
<div class="
|
|
78
|
-
<div class="field grow">
|
|
79
|
-
<label class="sr-only" for="catalog-search">搜索模型</label>
|
|
80
|
-
<input id="catalog-search" type="search" autocomplete="off" spellcheck="false"
|
|
81
|
-
placeholder="搜索模型名、厂商、端点或说明…">
|
|
82
|
-
</div>
|
|
83
|
-
<div class="market-chips chips-row" id="kind-chips" role="group" aria-label="按类型筛选"></div>
|
|
84
|
-
</div>
|
|
103
|
+
<div class="group-banner" id="group-banner" hidden></div>
|
|
85
104
|
|
|
86
105
|
<div class="market-count" id="catalog-meta"></div>
|
|
87
106
|
<div class="model-grid" id="catalog-body">
|
|
@@ -98,10 +117,10 @@
|
|
|
98
117
|
<h2>余额与用量</h2>
|
|
99
118
|
<p class="page-sub">每个账号的余额、按日周月汇总,以及逐条调用流水。金额按站点币种显示。</p>
|
|
100
119
|
</header>
|
|
101
|
-
<div class="grid-2">
|
|
120
|
+
<div class="grid-2 wallet-grid">
|
|
102
121
|
<div class="card">
|
|
103
122
|
<header class="card-head">
|
|
104
|
-
<h3
|
|
123
|
+
<h3>账户概览</h3>
|
|
105
124
|
<span class="card-sub" id="account-sub"></span>
|
|
106
125
|
</header>
|
|
107
126
|
<div id="account-body"><p class="loading">正在读取…</p></div>
|
|
@@ -109,7 +128,7 @@
|
|
|
109
128
|
|
|
110
129
|
<div class="card">
|
|
111
130
|
<header class="card-head">
|
|
112
|
-
<h3
|
|
131
|
+
<h3>数据概览</h3>
|
|
113
132
|
<div class="segmented" role="group" aria-label="统计区间">
|
|
114
133
|
<button type="button" data-range="day" aria-pressed="true">日</button>
|
|
115
134
|
<button type="button" data-range="week" aria-pressed="false">周</button>
|
|
@@ -258,11 +277,14 @@
|
|
|
258
277
|
<div class="drawer-backdrop" data-drawer-close="1"></div>
|
|
259
278
|
<div class="drawer-panel" role="document">
|
|
260
279
|
<header class="drawer-head">
|
|
261
|
-
<
|
|
280
|
+
<span class="dh-icon" id="drawer-icon" aria-hidden="true"></span>
|
|
281
|
+
<div class="dh-main">
|
|
262
282
|
<h2 id="drawer-title">模型详情</h2>
|
|
263
283
|
<p class="drawer-sub" id="drawer-sub"></p>
|
|
264
284
|
</div>
|
|
265
|
-
<
|
|
285
|
+
<div class="actions">
|
|
286
|
+
<button class="btn ghost" id="drawer-close" type="button" data-drawer-close="1">关闭</button>
|
|
287
|
+
</div>
|
|
266
288
|
</header>
|
|
267
289
|
<div class="drawer-body" id="drawer-body"></div>
|
|
268
290
|
</div>
|
|
@@ -270,4 +292,4 @@
|
|
|
270
292
|
|
|
271
293
|
<script type="module" src="app.js"></script>
|
|
272
294
|
</body>
|
|
273
|
-
</html>
|
|
295
|
+
</html>
|