@lls-a1/dsh-balance-float 1.2.0 → 1.2.1
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/client.js +5 -12
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -36,11 +36,10 @@ window.__ModuleLoader__.load({
|
|
|
36
36
|
// panel only links out to the console.
|
|
37
37
|
const TOPUP_URL = 'https://platform.deepseek.com/top_up';
|
|
38
38
|
const APPEARANCE_KEY = 'dsh.balance-float.appearance';
|
|
39
|
-
// `bg` is transparency in percent (0 = solid token background)
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
const DEFAULT_APPEARANCE = { bg: 0, border: 100, shadow: 100, radius: 16, dockBall: true };
|
|
39
|
+
// `bg` is transparency in percent (0 = solid token background) and `shadow`
|
|
40
|
+
// is strength in percent; `radius` is the corner in px. Defaults are the
|
|
41
|
+
// flat look: no transparency, no shadow, a 5px corner.
|
|
42
|
+
const DEFAULT_APPEARANCE = { bg: 0, shadow: 0, radius: 5, dockBall: true };
|
|
44
43
|
// Docking: a drop this close to a side edge turns the pill into a square
|
|
45
44
|
// ball pinned DOCK_MARGIN px from that edge.
|
|
46
45
|
const DOCK_ZONE = 56;
|
|
@@ -134,7 +133,6 @@ window.__ModuleLoader__.load({
|
|
|
134
133
|
settings: '外观设置',
|
|
135
134
|
'settings.open': '外观设置',
|
|
136
135
|
'settings.bg': '背景透明度',
|
|
137
|
-
'settings.border': '边框',
|
|
138
136
|
'settings.shadow': '阴影',
|
|
139
137
|
'settings.radius': '圆角',
|
|
140
138
|
'settings.dock': '贴边收成小球',
|
|
@@ -228,7 +226,6 @@ window.__ModuleLoader__.load({
|
|
|
228
226
|
settings: 'Appearance',
|
|
229
227
|
'settings.open': 'Appearance',
|
|
230
228
|
'settings.bg': 'Background transparency',
|
|
231
|
-
'settings.border': 'Border',
|
|
232
229
|
'settings.shadow': 'Shadow',
|
|
233
230
|
'settings.radius': 'Corner radius',
|
|
234
231
|
'settings.dock': 'Ball at the edge',
|
|
@@ -247,7 +244,7 @@ window.__ModuleLoader__.load({
|
|
|
247
244
|
'.dbf-root{position:fixed;z-index:200;pointer-events:auto;font-family:inherit;color:var(--dsw-alias-label-primary)}',
|
|
248
245
|
'.dbf-surface{position:relative;isolation:isolate}',
|
|
249
246
|
'.dbf-surface::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--dsw-alias-bg-overlay);opacity:var(--dbf-bg,1);z-index:-1;pointer-events:none}',
|
|
250
|
-
'.dbf-surface::after{content:"";position:absolute;inset:0;border-radius:inherit;border:.5px solid var(--dsw-alias-border-l1);
|
|
247
|
+
'.dbf-surface::after{content:"";position:absolute;inset:0;border-radius:inherit;border:.5px solid var(--dsw-alias-border-l1);pointer-events:none}',
|
|
251
248
|
'@keyframes dbf-open-down{from{opacity:0;transform:translateY(-14px)}to{opacity:1;transform:translateY(0)}}',
|
|
252
249
|
'@keyframes dbf-open-up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}',
|
|
253
250
|
'@keyframes dbf-collapse-down{to{opacity:0;transform:translateY(-14px)}}',
|
|
@@ -534,7 +531,6 @@ window.__ModuleLoader__.load({
|
|
|
534
531
|
};
|
|
535
532
|
return {
|
|
536
533
|
bg: pick(parsed?.bg, 0, 90, DEFAULT_APPEARANCE.bg),
|
|
537
|
-
border: pick(parsed?.border, 0, 100, DEFAULT_APPEARANCE.border),
|
|
538
534
|
shadow: pick(parsed?.shadow, 0, 100, DEFAULT_APPEARANCE.shadow),
|
|
539
535
|
radius: pick(parsed?.radius, 0, 20, DEFAULT_APPEARANCE.radius),
|
|
540
536
|
dockBall: parsed?.dockBall !== false,
|
|
@@ -1212,7 +1208,6 @@ window.__ModuleLoader__.load({
|
|
|
1212
1208
|
...style,
|
|
1213
1209
|
'--dbf-origin': dir === 'down' ? '50% 0%' : '50% 100%',
|
|
1214
1210
|
'--dbf-bg': String((100 - appearance.bg) / 100),
|
|
1215
|
-
'--dbf-border': String(appearance.border / 100),
|
|
1216
1211
|
'--dbf-shadow': String(appearance.shadow / 100),
|
|
1217
1212
|
'--dbf-radius': String(appearance.radius),
|
|
1218
1213
|
};
|
|
@@ -1512,7 +1507,6 @@ window.__ModuleLoader__.load({
|
|
|
1512
1507
|
// The menu lives in <body>, outside the root that
|
|
1513
1508
|
// carries the appearance variables.
|
|
1514
1509
|
'--dbf-bg': String((100 - appearance.bg) / 100),
|
|
1515
|
-
'--dbf-border': String(appearance.border / 100),
|
|
1516
1510
|
'--dbf-shadow': String(appearance.shadow / 100),
|
|
1517
1511
|
},
|
|
1518
1512
|
},
|
|
@@ -1818,7 +1812,6 @@ window.__ModuleLoader__.load({
|
|
|
1818
1812
|
'div',
|
|
1819
1813
|
{ className: 'dbf-body' },
|
|
1820
1814
|
settingsRow('bg', t('settings.bg'), appearance.bg, 90, '%'),
|
|
1821
|
-
settingsRow('border', t('settings.border'), appearance.border, 100, '%'),
|
|
1822
1815
|
settingsRow('shadow', t('settings.shadow'), appearance.shadow, 100, '%'),
|
|
1823
1816
|
settingsRow('radius', t('settings.radius'), appearance.radius, 20, 'px'),
|
|
1824
1817
|
h(
|