dsh-plugin-greeting-bubble 1.4.0 → 1.4.2

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
@@ -31,8 +31,8 @@
31
31
  - 页面加载约 0.35 秒后,右下角(距右 20px、距底 84px,即输入框发送按钮上方)淡入气泡:👋 早上好/中午好/下午好/晚上好,腾盛 ×(按当前时间变化)
32
32
  - **第二行显示账号余额**:`余额 ¥12.34`,来自当前登录的 DeepSeek 账号;每 60 秒刷新一次。
33
33
  - **余额低于 3 元**时,这一行变橙并显示「余额不足」提醒。
34
- - **点余额这一行展开详情**:账户名/联系方式、**连接状态(断开时可一键重连)**、**今日使用估算**、充值余额、最近更新时间,以及「用量」「充值」快捷入口;再点一次收起。
35
- - 今日使用 = 基准余额 − 当前余额;优先用**昨天最后一次读到的余额**(≈ 0 点余额),没有昨天数据则用**今天第一次读到的余额**;充值会使基准同步抬高,不计入消费;详情里会显示基准时间。
34
+ - **点余额这一行展开详情**:账户名/联系方式、**连接状态(断开时可一键重连)**、**今日消费金额估算**、充值余额、最近更新时间,以及「用量」「充值」快捷入口;再点一次收起。
35
+ - 今日消费金额只显示金额(`≈ ¥x.xx`);口径是基准余额 − 当前余额,优先用**昨天最后一次读到的余额**(≈ 0 点余额),没有昨天数据则用**今天第一次读到的余额**;充值会使基准同步抬高,不计入消费。
36
36
  - **安装插件之前、或 DSH 未运行期间**的消费无法统计,所以这是“自基准时间起”的估算,不是平台账单。
37
37
  - 详情里可以**隐藏金额(隐私模式)**:金额变为 `••••` 并记住,适合截图/录屏。
38
38
  - 未登录、账号服务不可用或请求失败时显示 `余额 --`,不影响气泡的其他功能。
package/client.js CHANGED
@@ -367,6 +367,11 @@ window.__ModuleLoader__.load({
367
367
  overflow-wrap: anywhere;
368
368
  color: var(--dsw-alias-label-secondary);
369
369
  }
370
+ .dsh-greeting-row-value[data-nowrap] {
371
+ white-space: nowrap;
372
+ overflow: hidden;
373
+ text-overflow: ellipsis;
374
+ }
370
375
  .dsh-greeting-actions {
371
376
  display: flex;
372
377
  flex-wrap: wrap;
@@ -552,9 +557,7 @@ window.__ModuleLoader__.load({
552
557
  : label('unavailable', '--');
553
558
  const spentText = spent === null
554
559
  ? label('unavailable', '--')
555
- : '≈ ' + currencySymbol('CNY') + formatAmount(spent.spent) + ' '
556
- + label('estimate', '(估算)')
557
- + (typeof spent.startAt === 'number' ? ' · ' + label('baseline', '基准') + ' ' + formatTime(spent.startAt) : '');
560
+ : '≈ ' + currencySymbol('CNY') + formatAmount(spent.spent);
558
561
 
559
562
  /** Refresh now and reset the backoff. */
560
563
  function handleRefresh() {
@@ -736,8 +739,8 @@ window.__ModuleLoader__.load({
736
739
  h(
737
740
  'div',
738
741
  { className: 'dsh-greeting-row' },
739
- h('span', { className: 'dsh-greeting-row-label' }, label('today', '今日使用')),
740
- h('span', { className: 'dsh-greeting-row-value' }, spentText),
742
+ h('span', { className: 'dsh-greeting-row-label' }, label('today', '今日消费金额')),
743
+ h('span', { className: 'dsh-greeting-row-value', 'data-nowrap': '' }, spentText),
741
744
  ),
742
745
  h(
743
746
  'div',
@@ -788,7 +791,7 @@ window.__ModuleLoader__.load({
788
791
  dismiss: '关闭问候气泡',
789
792
  balance: '余额',
790
793
  bonus: '赠送',
791
- topUpBalance: '充值',
794
+ topUpBalance: '充值余额',
792
795
  account: '账户',
793
796
  connection: '连接',
794
797
  connected: '已连接',
@@ -796,9 +799,7 @@ window.__ModuleLoader__.load({
796
799
  disconnected: '已断开',
797
800
  reconnect: '重连',
798
801
  updated: '更新',
799
- today: '今日使用',
800
- estimate: '(估算)',
801
- baseline: '基准',
802
+ today: '今日消费金额',
802
803
  hidden: '••••',
803
804
  unavailable: '--',
804
805
  lowBalance: '余额不足',
@@ -818,7 +819,7 @@ window.__ModuleLoader__.load({
818
819
  dismiss: 'Dismiss greeting',
819
820
  balance: 'Balance',
820
821
  bonus: 'Bonus',
821
- topUpBalance: 'Top-up',
822
+ topUpBalance: 'Top-up balance',
822
823
  account: 'Account',
823
824
  connection: 'Connection',
824
825
  connected: 'Connected',
@@ -826,9 +827,7 @@ window.__ModuleLoader__.load({
826
827
  disconnected: 'Disconnected',
827
828
  reconnect: 'Reconnect',
828
829
  updated: 'Updated',
829
- today: "Today's usage",
830
- estimate: '(estimate)',
831
- baseline: 'baseline',
830
+ today: "Today's spend",
832
831
  hidden: '••••',
833
832
  unavailable: '--',
834
833
  lowBalance: 'Low balance',
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
- "description": "Shows a time-aware “你好,腾盛” speech bubble near the bottom-right corner of the window, just above the message composer (morning/noon/afternoon/evening variants), plus the signed-in DeepSeek account balance refreshed every 60 seconds. A balance below 3 CNY is flagged. Click the balance line to expand details: account, connection state with a one-click reconnect, today's usage estimate (balance delta, ignoring top-ups; spending before the plugin was installed cannot be counted, and the baseline time is shown), top-up balance, last update, and shortcuts to the Platform usage/top-up pages; a privacy toggle hides amounts, and drag remembers the bubble position. Click × to dismiss it; it appears again on the next page load. Control labels are localized; the greeting stays Chinese. Balance is read through the DSH account service, so the browser never sees the account token; a signed-out or failed read shows “--”. The plugin makes no network requests of its own and collects no data. Disable or remove the bundle under Plugins to remove it.",
3
+ "description": "Shows a time-aware “你好,腾盛” speech bubble near the bottom-right corner of the window, just above the message composer (morning/noon/afternoon/evening variants), plus the signed-in DeepSeek account balance refreshed every 60 seconds. A balance below 3 CNY is flagged. Click the balance line to expand details: account, connection state with a one-click reconnect, today's spend estimate (balance delta, ignoring top-ups; spending before the plugin was installed cannot be counted), top-up balance, last update, and shortcuts to the Platform usage/top-up pages; a privacy toggle hides amounts, and drag remembers the bubble position. Click × to dismiss it; it appears again on the next page load. Control labels are localized; the greeting stays Chinese. Balance is read through the DSH account service, so the browser never sees the account token; a signed-out or failed read shows “--”. The plugin makes no network requests of its own and collects no data. Disable or remove the bundle under Plugins to remove it.",
4
4
  "detail": "docs/DETAIL.md"
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
- "description": "页面加载后,在窗口右下角、输入框上方弹出按时间变化的问候气泡(早上好/中午好/下午好/晚上好,腾盛),并显示当前 DeepSeek 账号余额(充值 + 赠送),每 60 秒刷新一次。余额低于 3 元会显示提醒;点击余额行展开详情:账户信息、连接状态(断开时可一键重连)、今日使用估算(基于余额差,忽略充值;安装插件之前的消费无法统计,详情里会显示基准时间)、充值余额、更新时间,以及「用量」「充值」快捷入口。支持隐藏金额(隐私模式),按住气泡可拖动并记住位置。点 × 关闭,下次页面加载会再次出现。界面文案跟随语言,问候语保持中文。余额通过 DSH 账号服务读取,浏览器不接触账号令牌;未登录或读取失败时显示「--」。插件不联网、不收集数据。在「插件」页停用或移除本插件即可彻底去掉。",
3
+ "description": "页面加载后,在窗口右下角、输入框上方弹出按时间变化的问候气泡(早上好/中午好/下午好/晚上好,腾盛),并显示当前 DeepSeek 账号余额(充值 + 赠送),每 60 秒刷新一次。余额低于 3 元会显示提醒;点击余额行展开详情:账户信息、连接状态(断开时可一键重连)、今日消费金额估算(基于余额差,忽略充值;安装插件之前的消费无法统计)、充值余额、更新时间,以及「用量」「充值」快捷入口。支持隐藏金额(隐私模式),按住气泡可拖动并记住位置。点 × 关闭,下次页面加载会再次出现。界面文案跟随语言,问候语保持中文。余额通过 DSH 账号服务读取,浏览器不接触账号令牌;未登录或读取失败时显示「--」。插件不联网、不收集数据。在「插件」页停用或移除本插件即可彻底去掉。",
4
4
  "detail": "docs/DETAIL.zh.md"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-greeting-bubble",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Shows a “你好,腾盛” speech bubble in the bottom-right corner of the DeepSeek Harness Web GUI.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {