dsh-tokenbank 0.1.44 → 0.1.45
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 +18 -4
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -28,6 +28,7 @@ window.__ModuleLoader__.load({
|
|
|
28
28
|
openPortal: '打开完整门户',
|
|
29
29
|
openSite: '打开官网',
|
|
30
30
|
addFreeModels: '获取免费模型',
|
|
31
|
+
modelLinked: '已接入 {n} 个模型,去切换',
|
|
31
32
|
reload: '刷新',
|
|
32
33
|
recharge: '充值',
|
|
33
34
|
depositManage: '托管',
|
|
@@ -116,6 +117,7 @@ window.__ModuleLoader__.load({
|
|
|
116
117
|
openPortal: 'Open full portal',
|
|
117
118
|
openSite: 'Open website',
|
|
118
119
|
addFreeModels: 'Get free models',
|
|
120
|
+
modelLinked: '{n} models linked, tap to switch',
|
|
119
121
|
reload: 'Reload',
|
|
120
122
|
recharge: 'Recharge',
|
|
121
123
|
depositManage: 'Manage keys',
|
|
@@ -716,7 +718,7 @@ window.__ModuleLoader__.load({
|
|
|
716
718
|
var fresh = await api('status').catch(function () { return null })
|
|
717
719
|
if (fresh) { st[1](fresh); tbStore.set({ loggedIn: Boolean(fresh.loggedIn), portalUrl: fresh.portalUrl }) }
|
|
718
720
|
var streakText = ci.streak > 1 ? '(' + pageT('checkinStreak').replace('{n}', String(ci.streak)) + ')' : ''
|
|
719
|
-
checkinFlash[1](pageT('checkinOk') + streakText)
|
|
721
|
+
checkinFlash[1]({ text: pageT('checkinOk') + streakText })
|
|
720
722
|
window.setTimeout(function () { checkinFlash[1](null) }, 2000)
|
|
721
723
|
}
|
|
722
724
|
} catch (e9) {
|
|
@@ -776,7 +778,8 @@ window.__ModuleLoader__.load({
|
|
|
776
778
|
var models = await api('gateway-models', { accessKey: data.accessKey })
|
|
777
779
|
var list = Array.isArray(models) ? models : (models.models || models.list || [])
|
|
778
780
|
await addProviderToModels(runtimeCtx, data.baseURL || portal, { accessKey: data.accessKey, list: list, protocol: models.protocol })
|
|
779
|
-
|
|
781
|
+
checkinFlash[1]({ text: pageT('modelLinked').replace('{n}', String(list.length)), models: true })
|
|
782
|
+
window.setTimeout(function () { checkinFlash[1](null) }, 2000)
|
|
780
783
|
} catch (err) {
|
|
781
784
|
tbStore.set({ notify: { kind: 'error', title: String(err.message || err), detail: '' } })
|
|
782
785
|
}
|
|
@@ -784,8 +787,19 @@ window.__ModuleLoader__.load({
|
|
|
784
787
|
}, pageT('addFreeModels'))
|
|
785
788
|
: checkinFlash[0] ? h('button', {
|
|
786
789
|
type: 'button', tabIndex: -1,
|
|
787
|
-
style: Object.assign({}, primaryButtonStyle, { justifyContent: 'center', cursor: 'default', opacity: 0.
|
|
788
|
-
|
|
790
|
+
style: Object.assign({}, primaryButtonStyle, { justifyContent: 'center', cursor: checkinFlash[0].models ? 'pointer' : 'default', opacity: 0.9 }),
|
|
791
|
+
onClick: checkinFlash[0].models ? function () {
|
|
792
|
+
checkinFlash[1](null)
|
|
793
|
+
tbStore.set({ authOpen: false })
|
|
794
|
+
window.setTimeout(function () {
|
|
795
|
+
var triggers = document.querySelectorAll('button[aria-haspopup="menu"]')
|
|
796
|
+
for (var q = 0; q < triggers.length; q++) {
|
|
797
|
+
var lb = triggers[q].getAttribute('aria-label') || ''
|
|
798
|
+
if (/选择模型|Select model/.test(lb)) { triggers[q].click(); return }
|
|
799
|
+
}
|
|
800
|
+
}, 80)
|
|
801
|
+
} : undefined,
|
|
802
|
+
}, checkinFlash[0].text) : null,
|
|
789
803
|
)
|
|
790
804
|
: h(AuthCard, {
|
|
791
805
|
mode: snap.authMode,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tokenbank",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
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",
|