dsh-tokenbank 0.1.58 → 0.1.60
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 -15
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -607,7 +607,7 @@ window.__ModuleLoader__.load({
|
|
|
607
607
|
)
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
-
/**
|
|
610
|
+
/** 侧栏底部长驻块:完整展示 logo/账号/余额/托管充值/获取免费模型,无卡片框。 */
|
|
611
611
|
function SidebarCard() {
|
|
612
612
|
var snap = useTbStore()
|
|
613
613
|
var st = React.useState(null)
|
|
@@ -630,14 +630,11 @@ window.__ModuleLoader__.load({
|
|
|
630
630
|
var data = st[0]
|
|
631
631
|
var loggedIn = snap.loggedIn
|
|
632
632
|
if (!runtimeCtx) return null
|
|
633
|
-
var smallBtn = Object.assign({}, buttonStyle, { height: 24, padding: '0
|
|
633
|
+
var smallBtn = Object.assign({}, buttonStyle, { height: 24, padding: '0 8px', fontSize: 12 })
|
|
634
634
|
return h('div', {
|
|
635
635
|
ref: boxRef,
|
|
636
636
|
style: {
|
|
637
|
-
margin: '4px 8px',
|
|
638
|
-
border: '1px solid var(--dsw-alias-border-l1)',
|
|
639
|
-
background: 'var(--dsw-alias-bg-layer-1, #f7f7f8)',
|
|
640
|
-
display: 'flex', flexDirection: 'column', gap: 8,
|
|
637
|
+
margin: '4px 10px 8px', display: 'flex', flexDirection: 'column', gap: 6,
|
|
641
638
|
},
|
|
642
639
|
},
|
|
643
640
|
h('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 6 } },
|
|
@@ -647,18 +644,24 @@ window.__ModuleLoader__.load({
|
|
|
647
644
|
h('path', { d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6' }),
|
|
648
645
|
h('path', { d: 'M15 3h6v6' }),
|
|
649
646
|
h('path', { d: 'M10 14L21 3' })))),
|
|
647
|
+
loggedIn ? h('div', { style: { display: 'flex', alignItems: 'baseline', justifyContent: 'space-between', gap: 6 } },
|
|
648
|
+
h('span', { style: { fontSize: 12, fontWeight: 600, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } },
|
|
649
|
+
(data && data.user && (data.user.display_name || data.user.name)) || data.email || ''),
|
|
650
|
+
h('span', { style: { fontSize: 11, color: 'var(--dsw-alias-label-secondary, #888)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, data.email || ''),
|
|
651
|
+
) : null,
|
|
650
652
|
loggedIn
|
|
651
|
-
? h(
|
|
652
|
-
h('
|
|
653
|
+
? h('div', { style: { display: 'flex', alignItems: 'center', gap: 6 } },
|
|
654
|
+
h('span', { style: { fontSize: 14, fontWeight: 700, fontVariantNumeric: 'tabular-nums', flex: 1 } },
|
|
653
655
|
data && data.account && typeof data.account.balance_nano_usd === 'number'
|
|
654
656
|
? '$' + (data.account.balance_nano_usd / 1e9).toFixed(2) : '—'),
|
|
655
|
-
h('
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
657
|
+
h('button', { type: 'button', style: Object.assign({}, smallBtn, { borderColor: 'var(--dsw-alias-border-l2, #c9ccd1)' }),
|
|
658
|
+
onClick: function () { openPanel('login') } }, pageT('depositManage')),
|
|
659
|
+
h('button', { type: 'button', style: Object.assign({}, primaryButtonStyle, { height: 24, padding: '0 8px', fontSize: 12 }),
|
|
660
|
+
onClick: function () { openPanel('login') } }, pageT('recharge')))
|
|
661
|
+
: h('div', { style: { fontSize: 12, color: 'var(--dsw-alias-label-secondary, #888)' } }, pageT('balance') + ': —'),
|
|
662
|
+
loggedIn
|
|
663
|
+
? h('button', { type: 'button', style: Object.assign({}, primaryButtonStyle, { height: 28, justifyContent: 'center', width: '100%' }),
|
|
664
|
+
onClick: function () { openPanel('login') } }, pageT('addFreeModels'))
|
|
662
665
|
: h('button', { type: 'button', style: Object.assign({}, primaryButtonStyle, { height: 28, justifyContent: 'center', width: '100%' }),
|
|
663
666
|
onClick: function () { openPanel('register') } }, pageT('register')),
|
|
664
667
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tokenbank",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.60",
|
|
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",
|