dsh-tokenbank 0.1.52 → 0.1.54

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.
Files changed (2) hide show
  1. package/lib/client.js +12 -6
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -28,9 +28,11 @@ window.__ModuleLoader__.load({
28
28
  openPortal: '打开完整门户',
29
29
  openSite: '打开官网',
30
30
  addFreeModels: '获取免费模型',
31
+ freeModelsTip: '免费使用主流收费模型,点击后自动获取,模型列表 TokenBank 中的模型任意使用。',
31
32
  modelLinked: '已接入 {n} 个模型,去切换',
32
33
  reload: '刷新',
33
34
  recharge: '充值',
35
+ rechargeTip: '全网最低价:$1 仅 ¥6.50,比官方与中转站省 10%~25%;支付宝直付、秒到账,余额永不过期。',
34
36
  depositManage: '托管',
35
37
  depositManageTip: '把你的 API Key 托管到 TokenBank,临时额度自动转移为永久额度保留使用。适用于周重置快到了还没用完等情况。',
36
38
  checkin: '签到',
@@ -117,6 +119,8 @@ window.__ModuleLoader__.load({
117
119
  openPortal: 'Open full portal',
118
120
  openSite: 'Open website',
119
121
  addFreeModels: 'Get free models',
122
+ freeModelsTip: 'Use paid-tier models for free — one click links them, and every TokenBank model in the list is available.',
123
+ rechargeTip: 'Best price anywhere: $1 for ¥6.50 — 10%~25% cheaper than official APIs and relays. Pay with Alipay, credited instantly, credit never expires.',
120
124
  modelLinked: '{n} models linked, tap to switch',
121
125
  reload: 'Reload',
122
126
  recharge: 'Recharge',
@@ -614,7 +618,7 @@ window.__ModuleLoader__.load({
614
618
  var innerToast = React.useState(null)
615
619
  var checkinFlash = React.useState(null) // 签到成功闪现文案(复用获取免费模型按钮样式,2s 回原样)
616
620
  var checkin = React.useState({ busy: false, done: false })
617
- var depTip = React.useState(false) // 托管按钮 tooltip:mouseenter 立即显示(原生 title 有 ~1s 延迟)
621
+ var depTip = React.useState(null) // 说明板块:hover 哪个按钮就显示哪段说明('deposit'|'recharge'|'models')
618
622
  React.useEffect(function () {
619
623
  if (!snap.authOpen) logoutArm[1](false)
620
624
  }, [snap.authOpen])
@@ -690,7 +694,7 @@ window.__ModuleLoader__.load({
690
694
  )) : null,
691
695
  ),
692
696
  data && data.loggedIn
693
- ? h('div', { style: { display: 'flex', flexDirection: 'column', gap: 10 }, onMouseLeave: function () { depTip[1](false) } },
697
+ ? h('div', { style: { display: 'flex', flexDirection: 'column', gap: 10 }, onMouseLeave: function () { depTip[1](null) } },
694
698
  h('div', { style: { display: 'flex', alignItems: 'baseline', justifyContent: 'space-between', gap: 8 } },
695
699
  h('span', { style: { fontSize: 13, fontWeight: 600 } },
696
700
  (data.user && (data.user.display_name || data.user.name)) || data.email || ''),
@@ -703,7 +707,7 @@ window.__ModuleLoader__.load({
703
707
  color: 'var(--dsw-alias-label-secondary, #888)',
704
708
  border: '1px solid var(--dsw-alias-border-l1)',
705
709
  },
706
- }, pageT('depositManageTip')) : null,
710
+ }, pageT(depTip[0] === 'recharge' ? 'rechargeTip' : depTip[0] === 'models' ? 'freeModelsTip' : 'depositManageTip')) : null,
707
711
  h('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8 } },
708
712
  h('div', { style: { fontSize: 16, fontWeight: 700, fontVariantNumeric: 'tabular-nums' } },
709
713
  data.account && typeof data.account.balance_nano_usd === 'number'
@@ -739,14 +743,15 @@ window.__ModuleLoader__.load({
739
743
  data && data.loggedIn ? h('button', {
740
744
  type: 'button', 'aria-label': pageT('depositManageTip'),
741
745
  style: Object.assign({}, buttonStyle, { height: 26, padding: '0 12px', fontSize: 12, borderColor: 'var(--dsw-alias-border-l2, #c9ccd1)' }),
742
- onMouseEnter: function () { depTip[1](true) },
743
- onClick: function () { depTip[1](false); tbStore.set({ authOpen: false }); openSettingsPage() },
746
+ onMouseEnter: function () { depTip[1]('deposit') },
747
+ onClick: function () { depTip[1](null); tbStore.set({ authOpen: false }); openSettingsPage() },
744
748
  }, pageT('depositManage')) : null,
745
749
  (checkin[0].done || (data.account && typeof data.account.balance_nano_usd === 'number' && data.account.balance_nano_usd < 1e9))
746
750
  ? h('button', {
747
751
  type: 'button',
748
752
  style: Object.assign({}, primaryButtonStyle, { height: 26, padding: '0 12px', fontSize: 12 }),
749
- onClick: function () { rechargeOpen[1](function (v) { return !v }) },
753
+ onMouseEnter: function () { depTip[1]('recharge') },
754
+ onClick: function () { depTip[1](null); rechargeOpen[1](function (v) { return !v }) },
750
755
  }, pageT('recharge'))
751
756
  : null,
752
757
  ),
@@ -797,6 +802,7 @@ window.__ModuleLoader__.load({
797
802
  } : undefined,
798
803
  }, checkinFlash[0].text) : h('button', {
799
804
  type: 'button', style: Object.assign({}, primaryButtonStyle, { justifyContent: 'center' }),
805
+ onMouseEnter: function () { depTip[1]('models') },
800
806
  onClick: async function () {
801
807
  try {
802
808
  var models = await api('gateway-models', { accessKey: data.accessKey })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-tokenbank",
3
- "version": "0.1.52",
3
+ "version": "0.1.54",
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",