dsh-tokenbank 0.1.46 → 0.1.48
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 +26 -7
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -614,6 +614,7 @@ window.__ModuleLoader__.load({
|
|
|
614
614
|
var innerToast = React.useState(null)
|
|
615
615
|
var checkinFlash = React.useState(null) // 签到成功闪现文案(复用获取免费模型按钮样式,2s 回原样)
|
|
616
616
|
var checkin = React.useState({ busy: false, done: false })
|
|
617
|
+
var depTip = React.useState(false) // 托管按钮 tooltip:mouseenter 立即显示(原生 title 有 ~1s 延迟)
|
|
617
618
|
React.useEffect(function () {
|
|
618
619
|
if (!snap.authOpen) logoutArm[1](false)
|
|
619
620
|
}, [snap.authOpen])
|
|
@@ -719,7 +720,7 @@ window.__ModuleLoader__.load({
|
|
|
719
720
|
if (fresh) { st[1](fresh); tbStore.set({ loggedIn: Boolean(fresh.loggedIn), portalUrl: fresh.portalUrl }) }
|
|
720
721
|
var streakText = ci.streak > 1 ? '(' + pageT('checkinStreak').replace('{n}', String(ci.streak)) + ')' : ''
|
|
721
722
|
checkinFlash[1]({ text: pageT('checkinOk') + streakText })
|
|
722
|
-
window.setTimeout(function () { checkinFlash[1](null) },
|
|
723
|
+
window.setTimeout(function () { checkinFlash[1](null) }, 3000)
|
|
723
724
|
}
|
|
724
725
|
} catch (e9) {
|
|
725
726
|
checkin[1]({ busy: false, done: false })
|
|
@@ -727,11 +728,29 @@ window.__ModuleLoader__.load({
|
|
|
727
728
|
}
|
|
728
729
|
},
|
|
729
730
|
}, checkin[0].done ? pageT('checkinDone') : pageT('checkin')),
|
|
730
|
-
data && data.loggedIn ? h('
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
},
|
|
731
|
+
data && data.loggedIn ? h('span', {
|
|
732
|
+
style: { position: 'relative', display: 'inline-flex' },
|
|
733
|
+
onMouseEnter: function () { depTip[1](true) },
|
|
734
|
+
onMouseLeave: function () { depTip[1](false) },
|
|
735
|
+
},
|
|
736
|
+
h('button', {
|
|
737
|
+
type: 'button', 'aria-label': pageT('depositManageTip'),
|
|
738
|
+
style: Object.assign({}, buttonStyle, { height: 26, padding: '0 12px', fontSize: 12, borderColor: 'var(--dsw-alias-border-l2, #c9ccd1)' }),
|
|
739
|
+
onClick: function () { tbStore.set({ authOpen: false }); openSettingsPage() },
|
|
740
|
+
}, pageT('depositManage')),
|
|
741
|
+
depTip[0] ? h('div', {
|
|
742
|
+
style: {
|
|
743
|
+
position: 'absolute', bottom: 'calc(100% + 6px)', right: 0,
|
|
744
|
+
width: 220, padding: '8px 10px', borderRadius: 8,
|
|
745
|
+
fontSize: 11.5, lineHeight: 1.5, fontWeight: 400,
|
|
746
|
+
background: 'var(--dsw-menu-surface-fill, #fff)',
|
|
747
|
+
color: 'var(--dsw-alias-label-primary)',
|
|
748
|
+
border: '1px solid var(--dsw-alias-border-l1)',
|
|
749
|
+
boxShadow: '0 6px 20px rgba(0, 0, 0, 0.12)',
|
|
750
|
+
pointerEvents: 'none', zIndex: 30,
|
|
751
|
+
},
|
|
752
|
+
}, pageT('depositManageTip')) : null,
|
|
753
|
+
) : null,
|
|
735
754
|
(checkin[0].done || (data.account && typeof data.account.balance_nano_usd === 'number' && data.account.balance_nano_usd < 1e9))
|
|
736
755
|
? h('button', {
|
|
737
756
|
type: 'button',
|
|
@@ -793,7 +812,7 @@ window.__ModuleLoader__.load({
|
|
|
793
812
|
var list = Array.isArray(models) ? models : (models.models || models.list || [])
|
|
794
813
|
await addProviderToModels(runtimeCtx, data.baseURL || portal, { accessKey: data.accessKey, list: list, protocol: models.protocol })
|
|
795
814
|
checkinFlash[1]({ text: pageT('modelLinked').replace('{n}', String(list.length)), models: true })
|
|
796
|
-
window.setTimeout(function () { checkinFlash[1](null) },
|
|
815
|
+
window.setTimeout(function () { checkinFlash[1](null) }, 3000)
|
|
797
816
|
} catch (err) {
|
|
798
817
|
tbStore.set({ notify: { kind: 'error', title: String(err.message || err), detail: '' } })
|
|
799
818
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tokenbank",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.48",
|
|
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",
|