dsh-tokenbank 0.1.3 → 0.1.5

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/README.md CHANGED
@@ -20,6 +20,16 @@ DeepSeek Harness(DSH)插件:一键用上 [TokenBank](https://bank.skillpie.cn)
20
20
  - **低余额提醒**:会话里模型因余额不足报错时,弹窗引导去充值。
21
21
  - **安全**:门户会话与身份持久化在 DSH 凭据记录 `dsh-tokenbank/identity`;可选记住密码用于静默重登;插件 HTTP API 仅限宿主同源访问。
22
22
 
23
+ ## 截图
24
+
25
+ | 账户弹窗 | 一键托管(设置 → 模型) |
26
+ |---|---|
27
+ | ![账户弹窗](docs/screenshots/account-popup.webp) | ![一键托管](docs/screenshots/settings-deposit.webp) |
28
+
29
+ | 门户·账户总览 | 门户·交易行情 |
30
+ |---|---|
31
+ | ![账户总览](docs/screenshots/portal-overview.webp) | ![交易行情](docs/screenshots/portal-market.webp) |
32
+
23
33
  ## 安装
24
34
 
25
35
  ```sh
package/lib/client.js CHANGED
@@ -54,6 +54,7 @@ window.__ModuleLoader__.load({
54
54
  displayName: '昵称(可选)',
55
55
  code: '邮箱验证码',
56
56
  sendCode: '发送验证码',
57
+ codeInvalid: '验证码无效或已过期,请重新发送',
57
58
  codeSent: '已发送,请查收邮箱',
58
59
  captcha: '图形验证码',
59
60
  captchaCode: '输入图中字符',
@@ -141,6 +142,7 @@ window.__ModuleLoader__.load({
141
142
  displayName: 'Display name (optional)',
142
143
  code: 'Email code',
143
144
  sendCode: 'Send code',
145
+ codeInvalid: 'Code invalid or expired — please resend',
144
146
  codeSent: 'Sent — check your inbox',
145
147
  captcha: 'Captcha',
146
148
  captchaCode: 'Type the characters',
@@ -1068,14 +1070,13 @@ window.__ModuleLoader__.load({
1068
1070
 
1069
1071
  React.useEffect(function () {
1070
1072
  if (mode === 'login') refreshCaptcha()
1073
+ sent[1](false)
1071
1074
  }, [mode, refreshCaptcha])
1072
1075
 
1073
1076
  var submit = React.useCallback(async function () {
1074
1077
  busy[1](true); error[1]('')
1075
1078
  try {
1076
1079
  if (mode === 'register') {
1077
- await api('send-code', { email: email[0] })
1078
- sent[1](true)
1079
1080
  await api('register', {
1080
1081
  email: email[0], code: code[0], password: password[0],
1081
1082
  displayName: displayName[0], savePassword: savePassword[0],
@@ -1089,7 +1090,9 @@ window.__ModuleLoader__.load({
1089
1090
  }
1090
1091
  await onAuthed()
1091
1092
  } catch (err) {
1092
- error[1](String(err.message || err))
1093
+ var msg = String(err.message || err)
1094
+ if (mode === 'register' && /validation/i.test(msg)) msg = t('codeInvalid')
1095
+ error[1](msg)
1093
1096
  if (mode === 'login') refreshCaptcha()
1094
1097
  } finally {
1095
1098
  busy[1](false)
@@ -1133,12 +1136,11 @@ window.__ModuleLoader__.load({
1133
1136
  h(Field, { label: t('password') },
1134
1137
  h('input', { style: inputStyle, type: 'password', value: password[0], onChange: function (e) { password[1](e.target.value) } })),
1135
1138
  mode === 'register'
1136
- ? h('div', { style: { display: 'flex', gap: 8, alignItems: 'flex-end' } },
1137
- h('div', { style: { flex: 1 } },
1138
- h(Field, { label: t('code') },
1139
- h('input', { style: inputStyle, value: code[0], onChange: function (e) { code[1](e.target.value) } }))),
1139
+ ? h('div', null,
1140
+ h(Field, { label: t('code') },
1141
+ h('input', { style: inputStyle, value: code[0], onChange: function (e) { code[1](e.target.value) } })),
1140
1142
  h('button', {
1141
- type: 'button', style: buttonStyle, disabled: busy[0] || sent[0],
1143
+ type: 'button', style: Object.assign({}, buttonStyle, { marginTop: 4, width: '100%' }), disabled: busy[0] || sent[0],
1142
1144
  onClick: async function () {
1143
1145
  busy[1](true); error[1]('')
1144
1146
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-tokenbank",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
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",
@@ -18,12 +18,13 @@
18
18
  "./icon": "./icon.svg"
19
19
  },
20
20
  "files": [
21
+ "README.md",
22
+ "cordis.patch.yml",
21
23
  "docs",
24
+ "icon.svg",
22
25
  "lib",
23
26
  "locale/*.json",
24
- "cordis.patch.yml",
25
- "icon.svg",
26
- "README.md"
27
+ "screenshots.json"
27
28
  ],
28
29
  "engines": {
29
30
  "node": ">=22.13",
@@ -0,0 +1,8 @@
1
+ [
2
+ "docs/screenshots/account-popup.webp",
3
+ "docs/screenshots/settings-deposit.webp",
4
+ "docs/screenshots/portal-overview.webp",
5
+ "docs/screenshots/portal-market.webp",
6
+ "docs/screenshots/portal-ledger.webp",
7
+ "docs/screenshots/portal-bank.webp"
8
+ ]