dsh-tokenbank 0.1.68 → 0.1.70
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/lib/client.js +55 -7
- package/locale/en.json +10 -4
- package/locale/zh.json +10 -4
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -109,8 +109,14 @@ window.__ModuleLoader__.load({
|
|
|
109
109
|
probeRejected: '{n} 个 Key 探活失败已被剔除',
|
|
110
110
|
keyRequired: '请先粘贴至少一个 Key',
|
|
111
111
|
connectedAs: 'TokenBank 已连接:{email}',
|
|
112
|
-
depositHint:
|
|
112
|
+
depositHint: "一键托管:把你的 API Key 凭证托管到 TokenBank,临时额度自动转移为永久额度保留使用。适用于:",
|
|
113
|
+
depositCase1: "1. 周重置快到期了还没用完,重置后白白浪费,不如卖给平台换取永久余额,类似银行的存款业务",
|
|
114
|
+
depositCase2: "2. 跨模型厂商调用,转换为 TokenBank 余额后,更换 TokenBank 提供的模型厂商继续使用",
|
|
115
|
+
depositCase3: "3. 托管的 API Key 优先被平台调用,被调用后获得一定的托管利息存进余额,类似银行的贷款业务",
|
|
116
|
+
depositCase4: "4. 自己使用时如果 TokenBank 余额不足会取出自己的 API Key 继续使用",
|
|
117
|
+
depositCase5: "5. TokenBank 会自动路由,解决您用量不足需要频繁切换模型的问题",
|
|
113
118
|
learnMore: '了解 TokenBank →',
|
|
119
|
+
dismissHint: '不再显示',
|
|
114
120
|
notConnected: 'TokenBank 未登录',
|
|
115
121
|
modelLink: '已有 Key?手动接入',
|
|
116
122
|
modelLinkHint: '粘贴 TokenBank 访问密钥(tb-…)',
|
|
@@ -198,8 +204,14 @@ window.__ModuleLoader__.load({
|
|
|
198
204
|
depositDone: 'Deposited',
|
|
199
205
|
keyRequired: 'Paste at least one key first',
|
|
200
206
|
connectedAs: 'TokenBank connected: {email}',
|
|
201
|
-
depositHint:
|
|
207
|
+
depositHint: "One-click deposit: host your API key credentials on TokenBank to convert temporary quota into permanent balance. Useful when:",
|
|
208
|
+
depositCase1: "1. The weekly reset is close and quota remains unused — sell it to the platform for permanent balance (like a bank deposit)",
|
|
209
|
+
depositCase2: "2. Cross-provider calls — convert to TokenBank balance and switch to the model providers TokenBank offers",
|
|
210
|
+
depositCase3: "3. Deposited API keys are called by the platform first, earning deposit interest into your balance (like a bank loan)",
|
|
211
|
+
depositCase4: "4. When your TokenBank balance runs short, your own API key is withdrawn and used directly",
|
|
212
|
+
depositCase5: "5. TokenBank routes automatically, so you no longer need to switch models frequently due to insufficient usage",
|
|
202
213
|
learnMore: 'About TokenBank →',
|
|
214
|
+
dismissHint: "Don't show again",
|
|
203
215
|
notConnected: 'TokenBank not signed in',
|
|
204
216
|
modelLink: 'Have a key? Link manually',
|
|
205
217
|
modelLinkHint: 'Paste your TokenBank access key (tb-…)',
|
|
@@ -1267,12 +1279,48 @@ window.__ModuleLoader__.load({
|
|
|
1267
1279
|
function DepositHint() {
|
|
1268
1280
|
var snap = useTbStore()
|
|
1269
1281
|
var portal = (tbStore.get().portalUrl) || 'https://bank.skillpie.cn'
|
|
1282
|
+
var hintClosed = React.useState(false)
|
|
1283
|
+
// 初始值取当前登录态:挂载时已登录不算「登录跃迁」,避免误清关闭标记
|
|
1284
|
+
var prevLogin = React.useRef(Boolean(snap.loggedIn))
|
|
1285
|
+
React.useEffect(function () {
|
|
1286
|
+
if (!snap.loggedIn) { prevLogin.current = false; return }
|
|
1287
|
+
if (!prevLogin.current) {
|
|
1288
|
+
// 真正的「未登录 → 登录」跃迁:重新展示提示
|
|
1289
|
+
prevLogin.current = true
|
|
1290
|
+
try { window.sessionStorage.removeItem('tb-deposit-hint-closed') } catch (e) {}
|
|
1291
|
+
hintClosed[1](false)
|
|
1292
|
+
}
|
|
1293
|
+
}, [snap.loggedIn])
|
|
1294
|
+
React.useEffect(function () {
|
|
1295
|
+
try { if (window.sessionStorage.getItem('tb-deposit-hint-closed') === '1') hintClosed[1](true) } catch (e) {}
|
|
1296
|
+
}, [])
|
|
1297
|
+
if (hintClosed[0]) return null
|
|
1270
1298
|
return h('div', { style: { display: 'flex', flexDirection: 'column', gap: 4, marginTop: 8, padding: '8px 12px', borderRadius: 10, background: 'var(--dsw-alias-interactive-bg-subtle, transparent)', border: '0.5px solid var(--dsw-alias-border-l3)' } },
|
|
1271
|
-
h('
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1299
|
+
h('div', { style: { display: 'flex', flexDirection: 'column', gap: 2, fontSize: 12, lineHeight: '18px', color: 'var(--dsw-alias-label-secondary)' } },
|
|
1300
|
+
h('span', null, pageT('depositHint')),
|
|
1301
|
+
h('span', null, pageT('depositCase1')),
|
|
1302
|
+
h('span', null, pageT('depositCase2')),
|
|
1303
|
+
h('span', null, pageT('depositCase3')),
|
|
1304
|
+
h('span', null, pageT('depositCase4')),
|
|
1305
|
+
h('span', null, pageT('depositCase5')),
|
|
1306
|
+
),
|
|
1307
|
+
h('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between' } },
|
|
1308
|
+
h('a', {
|
|
1309
|
+
href: portal, target: '_blank', rel: 'noreferrer',
|
|
1310
|
+
style: { fontSize: 12, color: 'var(--dsw-alias-label-link, var(--dsw-alias-label-primary))', textDecoration: 'none' },
|
|
1311
|
+
}, pageT('learnMore')),
|
|
1312
|
+
h('button', {
|
|
1313
|
+
type: 'button', title: pageT('dismissHint'), 'aria-label': pageT('dismissHint'),
|
|
1314
|
+
style: { border: 'none', background: 'transparent', cursor: 'pointer', padding: 2, display: 'inline-flex', alignItems: 'center', color: 'var(--dsw-alias-label-tertiary, #a0a3a8)' },
|
|
1315
|
+
onClick: function () {
|
|
1316
|
+
hintClosed[1](true)
|
|
1317
|
+
try { window.sessionStorage.setItem('tb-deposit-hint-closed', '1') } catch (e) {}
|
|
1318
|
+
},
|
|
1319
|
+
},
|
|
1320
|
+
h('svg', { viewBox: '0 0 24 24', width: 14, height: 14, fill: 'none', stroke: 'currentColor', 'stroke-width': 2, 'stroke-linecap': 'round' },
|
|
1321
|
+
h('path', { d: 'M18 6 6 18' }), h('path', { d: 'm6 6 12 12' })),
|
|
1322
|
+
),
|
|
1323
|
+
),
|
|
1276
1324
|
)
|
|
1277
1325
|
}
|
|
1278
1326
|
|
package/locale/en.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"probeInconclusive": "Upstream probe inconclusive; deposited anyway",
|
|
8
8
|
"probeRejected": "{n} key(s) failed the live probe and were dropped",
|
|
9
9
|
"notifyOk": "OK",
|
|
10
|
-
"depositHint": "One-click deposit: host your API key on TokenBank to convert
|
|
10
|
+
"depositHint": "One-click deposit: host your API key credentials on TokenBank to convert temporary quota into permanent balance. Useful when:",
|
|
11
11
|
"learnMore": "About TokenBank →",
|
|
12
12
|
"freeModelsEntry": "TokenBank free models",
|
|
13
13
|
"addFreeModels": "Get free models",
|
|
@@ -24,10 +24,16 @@
|
|
|
24
24
|
"rechargeOpenPay": "Open payment page",
|
|
25
25
|
"rechargeCancel": "Cancel",
|
|
26
26
|
"goSwitch": "Switch now",
|
|
27
|
-
"depositManageTip": "
|
|
27
|
+
"depositManageTip": "One-click deposit: host your API key credentials on TokenBank to convert temporary quota into permanent balance. Useful when: 1. The weekly reset is close and quota remains unused — sell it to the platform for permanent balance (like a bank deposit) 2. Cross-provider calls — convert to TokenBank balance and switch to the model providers TokenBank offers 3. Deposited API keys are called by the platform first, earning deposit interest into your balance (like a bank loan) 4. When your TokenBank balance runs short, your own API key is withdrawn and used directly 5. TokenBank routes automatically, so you no longer need to switch models frequently due to insufficient usage",
|
|
28
28
|
"checkin": "Check in",
|
|
29
29
|
"checkinDone": "Checked in",
|
|
30
30
|
"checkinOk": "Check-in success",
|
|
31
31
|
"checkinStreak": "{n}-day streak",
|
|
32
|
-
"meta.detail": "docs/DETAIL.md"
|
|
33
|
-
|
|
32
|
+
"meta.detail": "docs/DETAIL.md",
|
|
33
|
+
"depositCase1": "1. The weekly reset is close and quota remains unused — sell it to the platform for permanent balance (like a bank deposit)",
|
|
34
|
+
"depositCase2": "2. Cross-provider calls — convert to TokenBank balance and switch to the model providers TokenBank offers",
|
|
35
|
+
"depositCase3": "3. Deposited API keys are called by the platform first, earning deposit interest into your balance (like a bank loan)",
|
|
36
|
+
"depositCase4": "4. When your TokenBank balance runs short, your own API key is withdrawn and used directly",
|
|
37
|
+
"depositCase5": "5. TokenBank routes automatically, so you no longer need to switch models frequently due to insufficient usage",
|
|
38
|
+
"dismissHint": "Don't show again"
|
|
39
|
+
}
|
package/locale/zh.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"probeInconclusive": "上游探活未出结论,已放行托管",
|
|
8
8
|
"probeRejected": "{n} 个 Key 探活失败已被剔除",
|
|
9
9
|
"notifyOk": "知道了",
|
|
10
|
-
"depositHint": "
|
|
10
|
+
"depositHint": "一键托管:把你的 API Key 凭证托管到 TokenBank,临时额度自动转移为永久额度保留使用。适用于:",
|
|
11
11
|
"learnMore": "了解 TokenBank →",
|
|
12
12
|
"freeModelsEntry": "TokenBank 免费模型",
|
|
13
13
|
"addFreeModels": "获取免费模型",
|
|
@@ -24,10 +24,16 @@
|
|
|
24
24
|
"rechargeOpenPay": "打开支付页",
|
|
25
25
|
"rechargeCancel": "取消",
|
|
26
26
|
"goSwitch": "去切换",
|
|
27
|
-
"depositManageTip": "
|
|
27
|
+
"depositManageTip": "一键托管:把你的 API Key 凭证托管到 TokenBank,临时额度自动转移为永久额度保留使用。适用于: 1. 周重置快到期了还没用完,重置后白白浪费,不如卖给平台换取永久余额,类似银行的存款业务 2. 跨模型厂商调用,转换为 TokenBank 余额后,更换 TokenBank 提供的模型厂商继续使用 3. 托管的 API Key 优先被平台调用,被调用后获得一定的托管利息存进余额,类似银行的贷款业务 4. 自己使用时如果 TokenBank 余额不足会取出自己的 API Key 继续使用 5. TokenBank 会自动路由,解决您用量不足需要频繁切换模型的问题",
|
|
28
28
|
"checkin": "签到",
|
|
29
29
|
"checkinDone": "已签到",
|
|
30
30
|
"checkinOk": "签到成功",
|
|
31
31
|
"checkinStreak": "已连签 {n} 天",
|
|
32
|
-
"meta.detail": "docs/DETAIL.zh.md"
|
|
33
|
-
|
|
32
|
+
"meta.detail": "docs/DETAIL.zh.md",
|
|
33
|
+
"depositCase1": "1. 周重置快到期了还没用完,重置后白白浪费,不如卖给平台换取永久余额,类似银行的存款业务",
|
|
34
|
+
"depositCase2": "2. 跨模型厂商调用,转换为 TokenBank 余额后,更换 TokenBank 提供的模型厂商继续使用",
|
|
35
|
+
"depositCase3": "3. 托管的 API Key 优先被平台调用,被调用后获得一定的托管利息存进余额,类似银行的贷款业务",
|
|
36
|
+
"depositCase4": "4. 自己使用时如果 TokenBank 余额不足会取出自己的 API Key 继续使用",
|
|
37
|
+
"depositCase5": "5. TokenBank 会自动路由,解决您用量不足需要频繁切换模型的问题",
|
|
38
|
+
"dismissHint": "不再显示"
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tokenbank",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.70",
|
|
4
4
|
"description": "DSH 免费模型:一键注册 TokenBank 领免费 APIKey 送 $5 体验金,免费 GLM 模型直接进模型列表;自带余额查询、API Key 密钥托管(临时额度转永久)、每日签到、充值入口(支付宝),获取免费模型无需自建中转。致敬 dsh-our-free-model。官网 https://bank.skillpie.cn",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|