@lls-a1/dsh-balance-float 1.1.54 → 1.1.55

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/client.js +15 -0
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -113,6 +113,8 @@ window.__ModuleLoader__.load({
113
113
  'history.window.30': '近30天',
114
114
  'history.window.month': '本月',
115
115
  'history.calls': '{calls} 次',
116
+ 'history.peak': '峰段 {cost}',
117
+ 'history.valley': '谷段 {cost}',
116
118
  'history.total': '合计 {total}',
117
119
  version: '版本',
118
120
  'version.open': '打开插件页(更新在这里)',
@@ -205,6 +207,8 @@ window.__ModuleLoader__.load({
205
207
  'history.window.30': '30d',
206
208
  'history.window.month': 'Month',
207
209
  'history.calls': '{calls} calls',
210
+ 'history.peak': 'Peak {cost}',
211
+ 'history.valley': 'Valley {cost}',
208
212
  'history.total': 'Total {total}',
209
213
  version: 'Version',
210
214
  'version.open': 'Open the plugin page (updates live there)',
@@ -348,6 +352,8 @@ window.__ModuleLoader__.load({
348
352
  '.dbf-trend-meta{display:flex;align-items:baseline;gap:8px;margin-top:5px}',
349
353
  '.dbf-trend-total{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}',
350
354
  '.dbf-trend-calls{font-size:11px;color:var(--dsw-alias-label-secondary)}',
355
+ '.dbf-trend-split{display:flex;align-items:center;gap:6px;margin-top:2px;font-size:11px;line-height:16px;font-variant-numeric:tabular-nums}',
356
+ '.dbf-trend-dot{color:var(--dsw-alias-label-secondary);opacity:.6}',
351
357
  '.dbf-bars{display:flex;align-items:flex-end;justify-content:space-between;gap:4px;height:58px;margin-top:8px;padding-bottom:2px;overflow-x:auto;scrollbar-width:none}',
352
358
  '.dbf-bar{flex:1 0 auto;min-width:13px;max-width:32px;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}',
353
359
  '.dbf-bar-fill{width:100%;min-height:2px;border-radius:3px 3px 0 0;background:var(--dsw-alias-border-l2)}',
@@ -1064,6 +1070,8 @@ window.__ModuleLoader__.load({
1064
1070
  })()
1065
1071
  : allHistory.slice(-Number(chartWindow));
1066
1072
  const windowTotal = history.reduce((sum, row) => sum + (row.cost ?? 0), 0);
1073
+ const windowPeakCost = history.reduce((sum, row) => sum + (row.peakCost ?? 0), 0);
1074
+ const windowValleyCost = history.reduce((sum, row) => sum + (row.valleyCost ?? 0), 0);
1067
1075
  const windowModels = (() => {
1068
1076
  const table = {};
1069
1077
  for (const row of history) {
@@ -1425,6 +1433,13 @@ window.__ModuleLoader__.load({
1425
1433
  t('history.calls', { calls: history.reduce((sum, row) => sum + (row.calls ?? 0), 0) }),
1426
1434
  ),
1427
1435
  ),
1436
+ h(
1437
+ 'div',
1438
+ { className: 'dbf-trend-split' },
1439
+ h('span', { className: 'dbf-peak' }, t('history.peak', { cost: '¥' + money(windowPeakCost) })),
1440
+ h('span', { className: 'dbf-trend-dot' }, '·'),
1441
+ h('span', { className: 'dbf-valley' }, t('history.valley', { cost: '¥' + money(windowValleyCost) })),
1442
+ ),
1428
1443
  windowModels.length > 0
1429
1444
  ? h(
1430
1445
  'div',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lls-a1/dsh-balance-float",
3
- "version": "1.1.54",
3
+ "version": "1.1.55",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },