dsh-ustc-quota 1.1.39 → 1.1.40

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
@@ -108,7 +108,7 @@ key-c 8.7/30 29% 8.7/70 12% 11.1/100 11%
108
108
  ## 面板位置
109
109
 
110
110
  - 卡片默认在左侧边栏底部。**鼠标移到卡片上时,标题左边的品牌图标会变成方向图标**(布局图示,标出卡片将要去的那一侧),点一下即可换边;移开鼠标图标复原。选择会记住,重启后保持。
111
- - 排版自适应:每个窗口一行显示「数值 · 进度条 · 百分比」,三段各自固定宽度对齐,跨行不参差;刷新时间并入「3h / 12h / 24h」表头行右侧。用宽度换高度,卡片更矮更紧凑。
111
+ - 排版自适应:每个窗口一行显示「数值 · 进度条 · 百分比」,数值与百分比定宽、进度条吃剩余宽度,因此各行进度条左右两端都对齐;「3h / 12h / 24h」与各自的重置时间并排在同一行。用宽度换高度,卡片更矮更紧凑。
112
112
  - 右侧位置会在对话区右侧**预留一条槽**:插件给对话列加右侧内边距(约列宽的 26%,封顶 34%),正文与轮次导航条整体左移,卡片占住这条槽——因此不遮挡正文、不遮挡轮次导航条、也不遮挡右侧原生按钮。上沿从「对话 / 轨迹 / 看板」选项卡下的分隔线以下 6px 开始。
113
113
  - 窄窗口或打开侧栏时槽宽自动收窄(下限 140px),卡片始终可见;如果连正文最小宽度都不够,则允许卡片比常规更窄,而不是消失。
114
114
  - 换边不重新加载:两处卡片共用同一份已取到的数据。底色用左侧边栏的底色(`--dsw-specific-sidebar-fill`),阴影与左侧一致。
package/client.js CHANGED
@@ -11,7 +11,7 @@ window.__ModuleLoader__.load({
11
11
  const UPDATE_ENDPOINT = 'plugins/dsh-ustc-quota/update';
12
12
  const UPDATE_APPLY_ENDPOINT = 'plugins/dsh-ustc-quota/update/apply';
13
13
  const WINDOW_IDS = ['3h', '12h', '24h'];
14
- const CLIENT_VERSION = '1.1.39';
14
+ const CLIENT_VERSION = '1.1.40';
15
15
  const UPDATE_INTERVAL_MS = 24 * 60 * 60 * 1000;
16
16
  const CLIENT_VERSION_KEY = `${NS}:client-version`;
17
17
  const CLIENT_RELOAD_KEY = `${NS}:client-reload`;
@@ -476,8 +476,8 @@ window.__ModuleLoader__.load({
476
476
  },
477
477
  legendRow: {
478
478
  display: 'grid',
479
- gridTemplateColumns: 'var(--ustc-key-col, 36px) repeat(3, minmax(0, 1fr)) auto',
480
- columnGap: 8,
479
+ gridTemplateColumns: 'var(--ustc-key-col, 36px) repeat(3, minmax(0, 1fr))',
480
+ columnGap: 16,
481
481
  alignItems: 'center',
482
482
  minWidth: 0,
483
483
  paddingBottom: 4,
@@ -486,7 +486,7 @@ window.__ModuleLoader__.load({
486
486
  keyRow: {
487
487
  display: 'grid',
488
488
  gridTemplateColumns: 'var(--ustc-key-col, 36px) repeat(3, minmax(0, 1fr))',
489
- columnGap: 8,
489
+ columnGap: 16,
490
490
  alignItems: 'center',
491
491
  minWidth: 0,
492
492
  paddingTop: 6,
@@ -495,9 +495,10 @@ window.__ModuleLoader__.load({
495
495
  legendCell: {
496
496
  minWidth: 0,
497
497
  display: 'flex',
498
- flexDirection: 'column',
499
- alignItems: 'center',
500
- gap: 0,
498
+ flexDirection: 'row',
499
+ alignItems: 'baseline',
500
+ justifyContent: 'center',
501
+ gap: 5,
501
502
  },
502
503
  legendName: {
503
504
  fontSize: 10,
@@ -514,7 +515,7 @@ window.__ModuleLoader__.load({
514
515
  paddingLeft: 2,
515
516
  },
516
517
  legendReset: {
517
- width: '100%',
518
+ minWidth: 0,
518
519
  fontSize: 8,
519
520
  color: 'var(--dsw-alias-label-secondary)',
520
521
  whiteSpace: 'nowrap',
@@ -585,6 +586,7 @@ window.__ModuleLoader__.load({
585
586
  },
586
587
  value: {
587
588
  flex: '0 0 auto',
589
+ width: 44,
588
590
  textAlign: 'right',
589
591
  fontSize: 10,
590
592
  fontWeight: 650,
@@ -1919,6 +1921,7 @@ window.__ModuleLoader__.load({
1919
1921
  : null,
1920
1922
  error && snapshot ? h('span', { style: STYLE.warn, title: error }, '!') : null,
1921
1923
 
1924
+ h('span', { style: STYLE.meta }, updated ? `${t('updatedLabel')} ${updated}` : ''),
1922
1925
  h('button', {
1923
1926
  type: 'button',
1924
1927
  'aria-label': t('refresh'),
@@ -1955,7 +1958,6 @@ window.__ModuleLoader__.load({
1955
1958
  h('div', { style: STYLE.legendRow },
1956
1959
  h('div', { key: 'corner' }),
1957
1960
  WINDOW_IDS.map((id) => h(React.Fragment, { key: id }, windowLegend(id))),
1958
- h('div', { key: 'updated', style: STYLE.legendMeta, title: updated || '' }, updated ? `${t('updatedLabel')} ${updated}` : '')
1959
1961
  ),
1960
1962
  keys.map((key, index) => keyRow(key, index, activeProvider))
1961
1963
  ),
package/index.js CHANGED
@@ -22,7 +22,7 @@ const ROUTE_PATH = '/plugins/dsh-ustc-quota/snapshot';
22
22
  const UPDATE_PATH = '/plugins/dsh-ustc-quota/update';
23
23
  const UPDATE_APPLY_PATH = '/plugins/dsh-ustc-quota/update/apply';
24
24
  const UPDATE_TOKEN_TTL_MS = 30 * 60 * 1000;
25
- const PLUGIN_VERSION = '1.1.39';
25
+ const PLUGIN_VERSION = '1.1.40';
26
26
  const KEY_INFO_PATH = 'key/info';
27
27
  const USER_INFO_PATH = 'user/info';
28
28
  const DISCOVERY_TTL_MS = 30000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ustc-quota",
3
- "version": "1.1.39",
3
+ "version": "1.1.40",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Live 3h/12h/24h USTC token quota card in the DSH sidebar (works with the USTC TokenWorks distribution).",