@jxgame2020/dsh-token-quota 0.1.28 → 0.1.29
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/lib/client.js +94 -80
- package/lib/index.js +1 -1
- package/lib/types/client/TokenQuotaPanel.js +1 -1
- package/lib/types/client/index.js +5 -0
- package/lib/types/client/locales.d.ts +4 -0
- package/lib/types/client/locales.js +4 -0
- package/lib/types/client/music.d.ts +4 -0
- package/lib/types/client/music.js +22 -6
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -95,7 +95,7 @@ window.__ModuleLoader__.load({
|
|
|
95
95
|
d.musicOnlyCurrentSession = only;
|
|
96
96
|
},
|
|
97
97
|
setUpgrade: (d, upgrade) => {
|
|
98
|
-
const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.
|
|
98
|
+
const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.29" ? upgrade : null;
|
|
99
99
|
if (d.upgrade === null || d.upgrade.latestVersion !== normalized?.latestVersion) d.upgradeDismissed = false;
|
|
100
100
|
d.upgrade = normalized;
|
|
101
101
|
},
|
|
@@ -191,7 +191,7 @@ window.__ModuleLoader__.load({
|
|
|
191
191
|
}
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaPanel.module.css.mjs
|
|
194
|
-
const css = ".NPLLIq_panel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;z-index:40;opacity:1;border-radius:12px;flex-direction:column;width:320px;max-height:min(72vh,560px);transition:opacity .18s;display:flex;position:fixed;top:56px;right:12px;overflow:hidden;box-shadow:0 8px 28px #0000002e}.NPLLIq_panelDim{opacity:.55}.NPLLIq_panelDimStrong{opacity:.3}.NPLLIq_header{border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:flex-start;gap:8px;padding:10px 12px;display:flex}.NPLLIq_header:active{cursor:grabbing}.NPLLIq_headerText{flex-direction:column;gap:2px;min-width:0;display:flex}.NPLLIq_title{color:var(--dsw-alias-label-primary);align-items:baseline;gap:6px;font-size:13px;font-weight:600;display:flex}.NPLLIq_version{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:10px;font-weight:500}.NPLLIq_versionNew{color:var(--dsw-alias-status-warning-foreground,#b56900);background:var(--dsw-alias-status-warning-background,#fff6d7);cursor:default;border-radius:4px;padding:1px 6px}.NPLLIq_subtitle{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_collapse{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_collapse:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_body{padding:4px 0;overflow-y:auto}.NPLLIq_row{border-bottom:1px solid var(--dsw-alias-border-l1);flex-direction:column;gap:6px;padding:8px 12px;display:flex}.NPLLIq_rowHeader{justify-content:space-between;align-items:center;gap:8px;display:flex}.NPLLIq_rowName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;font-size:12px;font-weight:500;display:inline-flex;overflow:hidden}.NPLLIq_currentBadge{color:var(--dsw-alias-state-success-primary);border:1px solid var(--dsw-alias-state-success-primary);border-radius:8px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_rowMeta{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.NPLLIq_bar{background:var(--dsw-alias-bg-layer-1);border-radius:3px;height:6px;overflow:hidden}.NPLLIq_fillIdle{background:var(--dsw-alias-brand-primary);height:100%;transition:width .2s}.NPLLIq_fillWarn{background:var(--dsw-alias-state-warn-primary);height:100%;transition:width .2s}.NPLLIq_fillOver{background:var(--dsw-alias-state-error-primary);height:100%;transition:width .2s}.NPLLIq_controls{align-items:center;gap:6px;display:flex}.NPLLIq_input{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);min-width:0;color:var(--dsw-alias-label-primary);border-radius:6px;flex:1;padding:4px 8px;font-size:11px}.NPLLIq_input::placeholder{color:var(--dsw-alias-label-secondary)}.NPLLIq_save,.NPLLIq_switch{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;flex:none;padding:4px 10px;font-size:11px}.NPLLIq_save:hover,.NPLLIq_switch:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2)}.NPLLIq_switch:disabled{opacity:.5;cursor:default}.NPLLIq_notice,.NPLLIq_noticeError{color:var(--dsw-alias-label-secondary);padding:10px 12px;font-size:12px}.NPLLIq_noticeError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_tab{background:var(--dsw-alias-brand-primary);border:1px solid var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay);pointer-events:auto;cursor:pointer;z-index:90;border-radius:10px;align-items:center;gap:6px;padding:9px 14px;font-size:12px;font-weight:600;display:inline-flex;position:fixed;top:56px;right:12px;box-shadow:0 6px 20px #00000040}.NPLLIq_tab:hover{filter:brightness(1.08)}.NPLLIq_tabIcon{font-size:12px;line-height:1}.NPLLIq_tabLabel{white-space:nowrap}.NPLLIq_headerActions{flex:none;align-items:center;gap:4px;display:flex}.NPLLIq_settingsBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_settingsBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_settingsBtnActive{color:var(--dsw-alias-brand-primary)}.NPLLIq_selectBtn{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_selectBtn:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_gearBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;margin-left:6px;padding:0 2px;font-size:12px;line-height:1}.NPLLIq_gearBtn:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_fullNotice{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px;margin:6px 12px;padding:8px 10px;font-size:12px}.NPLLIq_upgradeBanner{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-divider-1,#0000001a);border-radius:8px;margin:6px 12px;padding:10px 30px 10px 10px;font-size:12px;position:relative}@keyframes NPLLIq_upgradeBannerFlash{0%,to{border-color:var(--dsw-alias-divider-1,#0000001a);box-shadow:0 0 #f0a02000}50%{border-color:var(--dsw-alias-status-warning-foreground,#b56900);box-shadow:0 0 0 5px #f0a02073}}.NPLLIq_upgradeBannerFlash{border-color:var(--dsw-alias-status-warning-foreground,#b56900);animation:.6s ease-in-out 4 NPLLIq_upgradeBannerFlash}.NPLLIq_upgradeBannerText{margin-bottom:6px;font-weight:600}.NPLLIq_upgradeCommands{flex-direction:column;gap:4px;display:flex}.NPLLIq_upgradeCommandRow{align-items:center;gap:6px;display:flex}.NPLLIq_upgradeCommand{background:var(--dsw-alias-bg-layer-2,#0000000a);white-space:nowrap;border-radius:4px;flex:1;min-width:0;padding:4px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;overflow-x:auto}.NPLLIq_copyBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;flex:none;padding:3px 8px;font-size:11px;transition:transform 80ms,background .12s,color .12s}.NPLLIq_copyBtn:hover{background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_copyBtn:active{transform:scale(.92)}.NPLLIq_copyBtnDone{background:var(--dsw-alias-status-success-background,#14963c1f);border-color:var(--dsw-alias-status-success-foreground,#0a7d32);color:var(--dsw-alias-status-success-foreground,#0a7d32);font-weight:600}.NPLLIq_upgradeHint{color:var(--dsw-alias-label-secondary);margin-top:6px;font-size:11px}.NPLLIq_upgradeClose{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;font-size:16px;line-height:1;position:absolute;top:4px;right:6px}.NPLLIq_upgradeClose:hover{background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary)}.NPLLIq_checkUpdatesRow{justify-content:space-between;align-items:center;gap:12px;display:flex}.NPLLIq_checkUpdatesLabel{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.NPLLIq_checkUpdatesLabel input{margin:0}.NPLLIq_checkUpdatesLabel input[type=range]{min-width:90px;accent-color:var(--dsw-alias-brand-primary);flex:1}.NPLLIq_checkUpdatesLabel select{background:var(--dsw-alias-bg-layer-2,#0000000a);min-width:90px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-divider-1,#00000026);border-radius:4px;flex:1;padding:2px 4px;font-size:12px}.NPLLIq_checkBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-align:center;border-radius:4px;flex:none;min-width:72px;padding:4px 10px;font-size:12px}.NPLLIq_checkBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_checkBtn:disabled{opacity:.6;cursor:default}.NPLLIq_checkErrorHint{color:var(--dsw-alias-state-error-primary,#c00);background:var(--dsw-alias-state-error-background,#ff00000f);border:1px solid var(--dsw-alias-state-error-border,#b4000040);word-break:break-all;border-radius:6px;margin-top:8px;padding:6px 8px;font-size:11px;line-height:1.4}.NPLLIq_dialog{z-index:100;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;gap:12px;width:280px;max-height:80vh;padding:14px;display:flex;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%);box-shadow:0 8px 28px #00000040}.NPLLIq_dialogTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.NPLLIq_dialogSection{flex-direction:column;gap:6px;display:flex}.NPLLIq_dialogLabel{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:500}.NPLLIq_monitorHint{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_dialogHint{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:11px;line-height:1.4}.NPLLIq_monitorList{flex-direction:column;gap:2px;max-height:180px;display:flex;overflow-y:auto}.NPLLIq_monitorRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:12px;display:flex}.NPLLIq_monitorRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_monitorName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.NPLLIq_radioRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:3px 4px;font-size:12px;display:flex}.NPLLIq_radioRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_dialogActions{justify-content:flex-end;gap:6px;display:flex}.NPLLIq_dialogBtn,.NPLLIq_dialogBtnPrimary{border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:6px;padding:4px 12px;font-size:11px}.NPLLIq_dialogBtn{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.NPLLIq_dialogBtnPrimary{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay)}.NPLLIq_dialogHeader{z-index:2;background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:center;gap:8px;margin:-14px -14px 0;padding:14px 14px 8px;display:flex;position:sticky;top:-14px}.NPLLIq_dialogHeader:active{cursor:grabbing}.NPLLIq_dialogClose{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;font-size:18px;line-height:1;display:flex}.NPLLIq_dialogClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_resetRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.NPLLIq_resetSelect{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:6px;padding:3px 6px;font-size:12px}.NPLLIq_logTable{border-collapse:collapse;width:100%;font-size:11px}.NPLLIq_logTable th{text-align:left;color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);padding:4px 6px;font-weight:500}.NPLLIq_logTable td{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;padding:4px 6px}.NPLLIq_logDayCol{white-space:nowrap;color:var(--dsw-alias-label-secondary)}.NPLLIq_logModelCol{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.NPLLIq_logUsedCol{text-align:right}.NPLLIq_logDialog{gap:0;width:380px;max-height:min(72vh,480px);padding:0}.NPLLIq_logHeader{background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;flex:none;justify-content:space-between;align-items:center;gap:8px;padding:14px 14px 8px;display:flex}.NPLLIq_logHeader:active{cursor:grabbing}.NPLLIq_logScroll{flex:1;min-height:0;padding:0 14px 14px;overflow:auto}.NPLLIq_logToolbar{flex:1;align-items:center;gap:6px;display:flex}.NPLLIq_logSearch{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);min-width:0;color:var(--dsw-alias-label-primary);border-radius:4px;flex:1;padding:3px 6px;font-size:11px}.NPLLIq_logSearch:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_logClearBtn{border:1px solid var(--dsw-alias-state-error-border,#b400004d);color:var(--dsw-alias-state-error-primary,#c00);cursor:pointer;white-space:nowrap;background:0 0;border-radius:4px;flex:none;padding:3px 8px;font-size:11px}.NPLLIq_logClearBtn:hover{background:var(--dsw-alias-state-error-background,#ff00000f)}.NPLLIq_logPager{border-top:1px solid var(--dsw-alias-divider-1,#00000014);background:var(--dsw-alias-bg-overlay);color:var(--dsw-alias-label-secondary);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:6px 14px;font-size:11px;display:flex}.NPLLIq_logPagerInfo{white-space:nowrap}.NPLLIq_logPagerControls{align-items:center;gap:4px;display:flex}.NPLLIq_logPagerBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:24px;height:24px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;font-size:13px;line-height:1}.NPLLIq_logPagerBtn:disabled{opacity:.4;cursor:default}.NPLLIq_logPagerPages{text-align:center;min-width:50px;color:var(--dsw-alias-label-secondary)}.NPLLIq_logPageSizeSelect{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;padding:2px 4px;font-size:11px}.NPLLIq_dialogOverlay{z-index:100001;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.NPLLIq_logClearDialog{gap:0;width:320px;padding:16px}.NPLLIq_dialogBody{color:var(--dsw-alias-label-secondary);margin:6px 0 10px;font-size:12px;line-height:1.5}.NPLLIq_logClearDate{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:100%;color:var(--dsw-alias-label-primary);border-radius:6px;margin-bottom:12px;padding:6px 8px;font-size:13px}.NPLLIq_logClearDate:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}";
|
|
194
|
+
const css = ".NPLLIq_panel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;z-index:40;opacity:1;border-radius:12px;flex-direction:column;width:320px;max-height:min(72vh,560px);transition:opacity .18s;display:flex;position:fixed;top:56px;right:12px;overflow:hidden;box-shadow:0 8px 28px #0000002e}.NPLLIq_panelDim{opacity:.55}.NPLLIq_panelDimStrong{opacity:.3}.NPLLIq_header{border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:flex-start;gap:8px;padding:10px 12px;display:flex}.NPLLIq_header:active{cursor:grabbing}.NPLLIq_headerText{flex-direction:column;gap:2px;min-width:0;display:flex}.NPLLIq_title{color:var(--dsw-alias-label-primary);align-items:baseline;gap:6px;font-size:13px;font-weight:600;display:flex}.NPLLIq_version{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:10px;font-weight:500}.NPLLIq_versionNew{color:var(--dsw-alias-status-warning-foreground,#b56900);background:var(--dsw-alias-status-warning-background,#fff6d7);cursor:default;border-radius:4px;padding:1px 6px}.NPLLIq_subtitle{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_collapse{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_collapse:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_body{padding:4px 0;overflow-y:auto}.NPLLIq_row{border-bottom:1px solid var(--dsw-alias-border-l1);flex-direction:column;gap:6px;padding:8px 12px;display:flex}.NPLLIq_rowHeader{justify-content:space-between;align-items:center;gap:8px;display:flex}.NPLLIq_rowName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;font-size:12px;font-weight:500;display:inline-flex;overflow:hidden}.NPLLIq_currentBadge{color:var(--dsw-alias-state-success-primary);border:1px solid var(--dsw-alias-state-success-primary);border-radius:8px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_rowMeta{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.NPLLIq_bar{background:var(--dsw-alias-bg-layer-1);border-radius:3px;height:6px;overflow:hidden}.NPLLIq_fillIdle{background:var(--dsw-alias-brand-primary);height:100%;transition:width .2s}.NPLLIq_fillWarn{background:var(--dsw-alias-state-warn-primary);height:100%;transition:width .2s}.NPLLIq_fillOver{background:var(--dsw-alias-state-error-primary);height:100%;transition:width .2s}.NPLLIq_controls{align-items:center;gap:6px;display:flex}.NPLLIq_input{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);min-width:0;color:var(--dsw-alias-label-primary);border-radius:6px;flex:1;padding:4px 8px;font-size:11px}.NPLLIq_input::placeholder{color:var(--dsw-alias-label-secondary)}.NPLLIq_save,.NPLLIq_switch{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;flex:none;padding:4px 10px;font-size:11px}.NPLLIq_save:hover,.NPLLIq_switch:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2)}.NPLLIq_switch:disabled{opacity:.5;cursor:default}.NPLLIq_notice,.NPLLIq_noticeError{color:var(--dsw-alias-label-secondary);padding:10px 12px;font-size:12px}.NPLLIq_noticeError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_tab{background:var(--dsw-alias-brand-primary);border:1px solid var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay);pointer-events:auto;cursor:pointer;z-index:90;border-radius:10px;align-items:center;gap:6px;padding:9px 14px;font-size:12px;font-weight:600;display:inline-flex;position:fixed;top:56px;right:12px;box-shadow:0 6px 20px #00000040}.NPLLIq_tab:hover{filter:brightness(1.08)}.NPLLIq_tabIcon{font-size:12px;line-height:1}.NPLLIq_tabLabel{white-space:nowrap}.NPLLIq_headerActions{flex:none;align-items:center;gap:4px;display:flex}.NPLLIq_settingsBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_settingsBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_settingsBtnActive{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2,#0000000f);box-shadow:inset 0 0 0 1px var(--dsw-alias-brand-primary);font-weight:700}.NPLLIq_selectBtn{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_selectBtn:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_gearBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;margin-left:6px;padding:0 2px;font-size:12px;line-height:1}.NPLLIq_gearBtn:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_fullNotice{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px;margin:6px 12px;padding:8px 10px;font-size:12px}.NPLLIq_upgradeBanner{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-divider-1,#0000001a);border-radius:8px;margin:6px 12px;padding:10px 30px 10px 10px;font-size:12px;position:relative}@keyframes NPLLIq_upgradeBannerFlash{0%,to{border-color:var(--dsw-alias-divider-1,#0000001a);box-shadow:0 0 #f0a02000}50%{border-color:var(--dsw-alias-status-warning-foreground,#b56900);box-shadow:0 0 0 5px #f0a02073}}.NPLLIq_upgradeBannerFlash{border-color:var(--dsw-alias-status-warning-foreground,#b56900);animation:.6s ease-in-out 4 NPLLIq_upgradeBannerFlash}.NPLLIq_upgradeBannerText{margin-bottom:6px;font-weight:600}.NPLLIq_upgradeCommands{flex-direction:column;gap:4px;display:flex}.NPLLIq_upgradeCommandRow{align-items:center;gap:6px;display:flex}.NPLLIq_upgradeCommand{background:var(--dsw-alias-bg-layer-2,#0000000a);white-space:nowrap;border-radius:4px;flex:1;min-width:0;padding:4px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;overflow-x:auto}.NPLLIq_copyBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;flex:none;padding:3px 8px;font-size:11px;transition:transform 80ms,background .12s,color .12s}.NPLLIq_copyBtn:hover{background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_copyBtn:active{transform:scale(.92)}.NPLLIq_copyBtnDone{background:var(--dsw-alias-status-success-background,#14963c1f);border-color:var(--dsw-alias-status-success-foreground,#0a7d32);color:var(--dsw-alias-status-success-foreground,#0a7d32);font-weight:600}.NPLLIq_upgradeHint{color:var(--dsw-alias-label-secondary);margin-top:6px;font-size:11px}.NPLLIq_upgradeClose{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;font-size:16px;line-height:1;position:absolute;top:4px;right:6px}.NPLLIq_upgradeClose:hover{background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary)}.NPLLIq_checkUpdatesRow{justify-content:space-between;align-items:center;gap:12px;display:flex}.NPLLIq_checkUpdatesLabel{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.NPLLIq_checkUpdatesLabel input{margin:0}.NPLLIq_checkUpdatesLabel input[type=range]{min-width:90px;accent-color:var(--dsw-alias-brand-primary);flex:1}.NPLLIq_checkUpdatesLabel select{background:var(--dsw-alias-bg-layer-2,#0000000a);min-width:90px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-divider-1,#00000026);border-radius:4px;flex:1;padding:2px 4px;font-size:12px}.NPLLIq_checkBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-align:center;border-radius:4px;flex:none;min-width:72px;padding:4px 10px;font-size:12px}.NPLLIq_checkBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_checkBtn:disabled{opacity:.6;cursor:default}.NPLLIq_checkErrorHint{color:var(--dsw-alias-state-error-primary,#c00);background:var(--dsw-alias-state-error-background,#ff00000f);border:1px solid var(--dsw-alias-state-error-border,#b4000040);word-break:break-all;border-radius:6px;margin-top:8px;padding:6px 8px;font-size:11px;line-height:1.4}.NPLLIq_dialog{z-index:100;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;gap:12px;width:280px;max-height:80vh;padding:14px;display:flex;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%);box-shadow:0 8px 28px #00000040}.NPLLIq_dialogTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.NPLLIq_dialogSection{flex-direction:column;gap:6px;display:flex}.NPLLIq_dialogLabel{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:500}.NPLLIq_monitorHint{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_dialogHint{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:11px;line-height:1.4}.NPLLIq_monitorList{flex-direction:column;gap:2px;max-height:180px;display:flex;overflow-y:auto}.NPLLIq_monitorRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:12px;display:flex}.NPLLIq_monitorRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_monitorName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.NPLLIq_radioRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:3px 4px;font-size:12px;display:flex}.NPLLIq_radioRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_dialogActions{justify-content:flex-end;gap:6px;display:flex}.NPLLIq_dialogBtn,.NPLLIq_dialogBtnPrimary{border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:6px;padding:4px 12px;font-size:11px}.NPLLIq_dialogBtn{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.NPLLIq_dialogBtnPrimary{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay)}.NPLLIq_dialogHeader{z-index:2;background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:center;gap:8px;margin:-14px -14px 0;padding:14px 14px 8px;display:flex;position:sticky;top:-14px}.NPLLIq_dialogHeader:active{cursor:grabbing}.NPLLIq_dialogClose{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;font-size:18px;line-height:1;display:flex}.NPLLIq_dialogClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_resetRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.NPLLIq_resetSelect{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:6px;padding:3px 6px;font-size:12px}.NPLLIq_logTable{border-collapse:collapse;width:100%;font-size:11px}.NPLLIq_logTable th{text-align:left;color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);padding:4px 6px;font-weight:500}.NPLLIq_logTable td{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;padding:4px 6px}.NPLLIq_logDayCol{white-space:nowrap;color:var(--dsw-alias-label-secondary)}.NPLLIq_logModelCol{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.NPLLIq_logUsedCol{text-align:right}.NPLLIq_logDialog{gap:0;width:380px;max-height:min(72vh,480px);padding:0}.NPLLIq_logHeader{background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;flex:none;justify-content:space-between;align-items:center;gap:8px;padding:14px 14px 8px;display:flex}.NPLLIq_logHeader:active{cursor:grabbing}.NPLLIq_logScroll{flex:1;min-height:0;padding:0 14px 14px;overflow:auto}.NPLLIq_logToolbar{flex:1;align-items:center;gap:6px;display:flex}.NPLLIq_logSearch{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);min-width:0;color:var(--dsw-alias-label-primary);border-radius:4px;flex:1;padding:3px 6px;font-size:11px}.NPLLIq_logSearch:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_logClearBtn{border:1px solid var(--dsw-alias-state-error-border,#b400004d);color:var(--dsw-alias-state-error-primary,#c00);cursor:pointer;white-space:nowrap;background:0 0;border-radius:4px;flex:none;padding:3px 8px;font-size:11px}.NPLLIq_logClearBtn:hover{background:var(--dsw-alias-state-error-background,#ff00000f)}.NPLLIq_logPager{border-top:1px solid var(--dsw-alias-divider-1,#00000014);background:var(--dsw-alias-bg-overlay);color:var(--dsw-alias-label-secondary);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:6px 14px;font-size:11px;display:flex}.NPLLIq_logPagerInfo{white-space:nowrap}.NPLLIq_logPagerControls{align-items:center;gap:4px;display:flex}.NPLLIq_logPagerBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:24px;height:24px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;font-size:13px;line-height:1}.NPLLIq_logPagerBtn:disabled{opacity:.4;cursor:default}.NPLLIq_logPagerPages{text-align:center;min-width:50px;color:var(--dsw-alias-label-secondary)}.NPLLIq_logPageSizeSelect{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;padding:2px 4px;font-size:11px}.NPLLIq_dialogOverlay{z-index:100001;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.NPLLIq_logClearDialog{gap:0;width:320px;padding:16px}.NPLLIq_dialogBody{color:var(--dsw-alias-label-secondary);margin:6px 0 10px;font-size:12px;line-height:1.5}.NPLLIq_logClearDate{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:100%;color:var(--dsw-alias-label-primary);border-radius:6px;margin-bottom:12px;padding:6px 8px;font-size:13px}.NPLLIq_logClearDate:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}";
|
|
195
195
|
const tagId = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
|
|
196
196
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
197
197
|
const tag = document.createElement("style");
|
|
@@ -201,92 +201,92 @@ window.__ModuleLoader__.load({
|
|
|
201
201
|
document.head.appendChild(tag);
|
|
202
202
|
}
|
|
203
203
|
var TokenQuotaPanel_module_css_default = {
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
"
|
|
208
|
-
"
|
|
204
|
+
"controls": "NPLLIq_controls",
|
|
205
|
+
"logModelCol": "NPLLIq_logModelCol",
|
|
206
|
+
"resetRow": "NPLLIq_resetRow",
|
|
207
|
+
"noticeError": "NPLLIq_noticeError",
|
|
208
|
+
"selectBtn": "NPLLIq_selectBtn",
|
|
209
|
+
"monitorList": "NPLLIq_monitorList",
|
|
210
|
+
"upgradeCommandRow": "NPLLIq_upgradeCommandRow",
|
|
211
|
+
"dialogBtn": "NPLLIq_dialogBtn",
|
|
209
212
|
"logDayCol": "NPLLIq_logDayCol",
|
|
210
|
-
"
|
|
211
|
-
"
|
|
212
|
-
"
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"
|
|
213
|
+
"fillIdle": "NPLLIq_fillIdle",
|
|
214
|
+
"logPagerBtn": "NPLLIq_logPagerBtn",
|
|
215
|
+
"panel": "NPLLIq_panel",
|
|
216
|
+
"subtitle": "NPLLIq_subtitle",
|
|
217
|
+
"notice": "NPLLIq_notice",
|
|
218
|
+
"settingsBtnActive": "NPLLIq_settingsBtnActive",
|
|
219
|
+
"gearBtn": "NPLLIq_gearBtn",
|
|
220
|
+
"panelDimStrong": "NPLLIq_panelDimStrong",
|
|
221
|
+
"logClearDate": "NPLLIq_logClearDate",
|
|
222
|
+
"settingsBtn": "NPLLIq_settingsBtn",
|
|
223
|
+
"copyBtn": "NPLLIq_copyBtn",
|
|
224
|
+
"logPager": "NPLLIq_logPager",
|
|
225
|
+
"tab": "NPLLIq_tab",
|
|
226
|
+
"tabIcon": "NPLLIq_tabIcon",
|
|
216
227
|
"dialog": "NPLLIq_dialog",
|
|
217
|
-
"
|
|
228
|
+
"upgradeCommands": "NPLLIq_upgradeCommands",
|
|
218
229
|
"rowMeta": "NPLLIq_rowMeta",
|
|
219
|
-
"
|
|
220
|
-
"
|
|
221
|
-
"
|
|
230
|
+
"version": "NPLLIq_version",
|
|
231
|
+
"checkUpdatesRow": "NPLLIq_checkUpdatesRow",
|
|
232
|
+
"dialogTitle": "NPLLIq_dialogTitle",
|
|
233
|
+
"headerText": "NPLLIq_headerText",
|
|
234
|
+
"dialogActions": "NPLLIq_dialogActions",
|
|
235
|
+
"logDialog": "NPLLIq_logDialog",
|
|
236
|
+
"fillOver": "NPLLIq_fillOver",
|
|
237
|
+
"monitorRow": "NPLLIq_monitorRow",
|
|
222
238
|
"upgradeBanner": "NPLLIq_upgradeBanner",
|
|
223
|
-
"rowHeader": "NPLLIq_rowHeader",
|
|
224
|
-
"checkBtn": "NPLLIq_checkBtn",
|
|
225
239
|
"dialogHint": "NPLLIq_dialogHint",
|
|
226
|
-
"
|
|
227
|
-
"
|
|
228
|
-
"
|
|
229
|
-
"resetRow": "NPLLIq_resetRow",
|
|
230
|
-
"dialogActions": "NPLLIq_dialogActions",
|
|
231
|
-
"upgradeCommandRow": "NPLLIq_upgradeCommandRow",
|
|
232
|
-
"currentBadge": "NPLLIq_currentBadge",
|
|
240
|
+
"dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
|
|
241
|
+
"logClearDialog": "NPLLIq_logClearDialog",
|
|
242
|
+
"logHeader": "NPLLIq_logHeader",
|
|
233
243
|
"upgradeHint": "NPLLIq_upgradeHint",
|
|
234
|
-
"
|
|
244
|
+
"row": "NPLLIq_row",
|
|
245
|
+
"logToolbar": "NPLLIq_logToolbar",
|
|
246
|
+
"logSearch": "NPLLIq_logSearch",
|
|
247
|
+
"switch": "NPLLIq_switch",
|
|
248
|
+
"checkBtn": "NPLLIq_checkBtn",
|
|
249
|
+
"dialogSection": "NPLLIq_dialogSection",
|
|
250
|
+
"bar": "NPLLIq_bar",
|
|
251
|
+
"logPagerPages": "NPLLIq_logPagerPages",
|
|
252
|
+
"input": "NPLLIq_input",
|
|
253
|
+
"rowHeader": "NPLLIq_rowHeader",
|
|
254
|
+
"copyBtnDone": "NPLLIq_copyBtnDone",
|
|
255
|
+
"dialogClose": "NPLLIq_dialogClose",
|
|
235
256
|
"logScroll": "NPLLIq_logScroll",
|
|
236
257
|
"versionNew": "NPLLIq_versionNew",
|
|
237
258
|
"header": "NPLLIq_header",
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"
|
|
241
|
-
"dialogSection": "NPLLIq_dialogSection",
|
|
242
|
-
"logUsedCol": "NPLLIq_logUsedCol",
|
|
243
|
-
"subtitle": "NPLLIq_subtitle",
|
|
259
|
+
"upgradeCommand": "NPLLIq_upgradeCommand",
|
|
260
|
+
"logPagerControls": "NPLLIq_logPagerControls",
|
|
261
|
+
"currentBadge": "NPLLIq_currentBadge",
|
|
244
262
|
"tabLabel": "NPLLIq_tabLabel",
|
|
245
|
-
"
|
|
246
|
-
"
|
|
247
|
-
"
|
|
263
|
+
"logPageSizeSelect": "NPLLIq_logPageSizeSelect",
|
|
264
|
+
"upgradeBannerText": "NPLLIq_upgradeBannerText",
|
|
265
|
+
"logClearBtn": "NPLLIq_logClearBtn",
|
|
266
|
+
"fullNotice": "NPLLIq_fullNotice",
|
|
267
|
+
"upgradeClose": "NPLLIq_upgradeClose",
|
|
248
268
|
"dialogBody": "NPLLIq_dialogBody",
|
|
249
|
-
"
|
|
269
|
+
"resetSelect": "NPLLIq_resetSelect",
|
|
270
|
+
"rowName": "NPLLIq_rowName",
|
|
250
271
|
"checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
|
|
251
|
-
"
|
|
252
|
-
"
|
|
253
|
-
"headerText": "NPLLIq_headerText",
|
|
254
|
-
"fillWarn": "NPLLIq_fillWarn",
|
|
255
|
-
"upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
|
|
256
|
-
"fullNotice": "NPLLIq_fullNotice",
|
|
257
|
-
"upgradeCommand": "NPLLIq_upgradeCommand",
|
|
258
|
-
"dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
|
|
259
|
-
"logPagerPages": "NPLLIq_logPagerPages",
|
|
260
|
-
"upgradeCommands": "NPLLIq_upgradeCommands",
|
|
261
|
-
"save": "NPLLIq_save",
|
|
262
|
-
"logClearDate": "NPLLIq_logClearDate",
|
|
263
|
-
"settingsBtn": "NPLLIq_settingsBtn",
|
|
264
|
-
"logPager": "NPLLIq_logPager",
|
|
272
|
+
"logUsedCol": "NPLLIq_logUsedCol",
|
|
273
|
+
"collapse": "NPLLIq_collapse",
|
|
265
274
|
"dialogOverlay": "NPLLIq_dialogOverlay",
|
|
266
|
-
"logDialog": "NPLLIq_logDialog",
|
|
267
|
-
"headerActions": "NPLLIq_headerActions",
|
|
268
|
-
"monitorList": "NPLLIq_monitorList",
|
|
269
|
-
"bar": "NPLLIq_bar",
|
|
270
|
-
"input": "NPLLIq_input",
|
|
271
|
-
"noticeError": "NPLLIq_noticeError",
|
|
272
|
-
"fillIdle": "NPLLIq_fillIdle",
|
|
273
|
-
"copyBtn": "NPLLIq_copyBtn",
|
|
274
|
-
"logPagerControls": "NPLLIq_logPagerControls",
|
|
275
|
-
"logPagerBtn": "NPLLIq_logPagerBtn",
|
|
276
275
|
"radioRow": "NPLLIq_radioRow",
|
|
277
|
-
"
|
|
278
|
-
"
|
|
279
|
-
"
|
|
280
|
-
"
|
|
281
|
-
"
|
|
276
|
+
"dialogHeader": "NPLLIq_dialogHeader",
|
|
277
|
+
"title": "NPLLIq_title",
|
|
278
|
+
"logTable": "NPLLIq_logTable",
|
|
279
|
+
"save": "NPLLIq_save",
|
|
280
|
+
"checkErrorHint": "NPLLIq_checkErrorHint",
|
|
281
|
+
"upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
|
|
282
|
+
"dialogLabel": "NPLLIq_dialogLabel",
|
|
283
|
+
"logPagerInfo": "NPLLIq_logPagerInfo",
|
|
284
|
+
"panelDim": "NPLLIq_panelDim",
|
|
285
|
+
"fillWarn": "NPLLIq_fillWarn",
|
|
286
|
+
"monitorHint": "NPLLIq_monitorHint",
|
|
282
287
|
"body": "NPLLIq_body",
|
|
283
|
-
"
|
|
284
|
-
"
|
|
285
|
-
"switch": "NPLLIq_switch",
|
|
286
|
-
"settingsBtnActive": "NPLLIq_settingsBtnActive",
|
|
287
|
-
"panel": "NPLLIq_panel",
|
|
288
|
-
"checkUpdatesRow": "NPLLIq_checkUpdatesRow",
|
|
289
|
-
"logTable": "NPLLIq_logTable"
|
|
288
|
+
"headerActions": "NPLLIq_headerActions",
|
|
289
|
+
"monitorName": "NPLLIq_monitorName"
|
|
290
290
|
};
|
|
291
291
|
//#endregion
|
|
292
292
|
//#region lib/types/client/TokenQuotaPanel.js
|
|
@@ -592,13 +592,13 @@ window.__ModuleLoader__.load({
|
|
|
592
592
|
title: t("upgradeAvailableHint"),
|
|
593
593
|
children: [
|
|
594
594
|
"v",
|
|
595
|
-
"0.1.
|
|
595
|
+
"0.1.29",
|
|
596
596
|
" → v",
|
|
597
597
|
upgrade.latestVersion
|
|
598
598
|
]
|
|
599
599
|
}) : (0, react_jsx_runtime.jsxs)("span", {
|
|
600
600
|
className: TokenQuotaPanel_module_css_default.version,
|
|
601
|
-
children: ["v", "0.1.
|
|
601
|
+
children: ["v", "0.1.29"]
|
|
602
602
|
})]
|
|
603
603
|
}), (0, react_jsx_runtime.jsx)("div", {
|
|
604
604
|
className: TokenQuotaPanel_module_css_default.subtitle,
|
|
@@ -612,12 +612,13 @@ window.__ModuleLoader__.load({
|
|
|
612
612
|
children: [
|
|
613
613
|
(0, react_jsx_runtime.jsx)("button", {
|
|
614
614
|
type: "button",
|
|
615
|
+
"aria-pressed": musicEnabled,
|
|
615
616
|
className: `${TokenQuotaPanel_module_css_default.settingsBtn}${musicEnabled ? ` ${TokenQuotaPanel_module_css_default.settingsBtnActive}` : ""}`,
|
|
616
|
-
title: t("
|
|
617
|
+
title: `${t("musicLabel")}:${musicEnabled ? t("musicOn") : t("musicOff")}`,
|
|
617
618
|
onClick: () => {
|
|
618
619
|
setMusicEnabled(!musicEnabled);
|
|
619
620
|
},
|
|
620
|
-
children:
|
|
621
|
+
children: "♪"
|
|
621
622
|
}),
|
|
622
623
|
(0, react_jsx_runtime.jsx)("button", {
|
|
623
624
|
type: "button",
|
|
@@ -1495,6 +1496,8 @@ window.__ModuleLoader__.load({
|
|
|
1495
1496
|
phraseIndex = 0;
|
|
1496
1497
|
/** True when the next piece start should play the full intro glissando. */
|
|
1497
1498
|
introPending = true;
|
|
1499
|
+
/** Session the current piece belongs to (turn/start carries it). */
|
|
1500
|
+
sessionId;
|
|
1498
1501
|
phraseTimer;
|
|
1499
1502
|
lastStreamActivity = 0;
|
|
1500
1503
|
watchdogTimer;
|
|
@@ -1560,16 +1563,24 @@ window.__ModuleLoader__.load({
|
|
|
1560
1563
|
markStreamActivity() {
|
|
1561
1564
|
this.lastStreamActivity = Date.now();
|
|
1562
1565
|
}
|
|
1566
|
+
/** Stop any playing piece — e.g. when the panel switches sessions. */
|
|
1567
|
+
stop() {
|
|
1568
|
+
this.stopPiece(false);
|
|
1569
|
+
}
|
|
1563
1570
|
/** Handle one incoming host action and steer the piece. */
|
|
1564
1571
|
onAction(action) {
|
|
1565
1572
|
if (!this.enabled || this.audio === null) return;
|
|
1566
1573
|
const base = TokenQuotaMusic.BASE_MIDI;
|
|
1567
1574
|
switch (action.type) {
|
|
1568
1575
|
case "turn/start":
|
|
1569
|
-
this.stopPiece(false);
|
|
1576
|
+
if (this.sessionId !== void 0 && this.sessionId !== action.sessionId) this.stopPiece(false);
|
|
1577
|
+
this.sessionId = action.sessionId;
|
|
1578
|
+
this.stopMelody();
|
|
1579
|
+
this.playing = false;
|
|
1570
1580
|
this.tonicIndex = 0;
|
|
1571
1581
|
this.phraseIndex = 0;
|
|
1572
1582
|
this.introPending = true;
|
|
1583
|
+
this.startPiece();
|
|
1573
1584
|
break;
|
|
1574
1585
|
case "request/header":
|
|
1575
1586
|
if (!this.playing) this.startPiece();
|
|
@@ -1603,8 +1614,6 @@ window.__ModuleLoader__.load({
|
|
|
1603
1614
|
setTimeout(() => this.pluck(base + 5, .4, .8), 220);
|
|
1604
1615
|
break;
|
|
1605
1616
|
case "assistant/message":
|
|
1606
|
-
this.stopMelody();
|
|
1607
|
-
this.playing = false;
|
|
1608
1617
|
this.breath(action.interrupted ? base + 6 : base + 12, 1.6);
|
|
1609
1618
|
break;
|
|
1610
1619
|
case "turn/end":
|
|
@@ -1887,6 +1896,8 @@ window.__ModuleLoader__.load({
|
|
|
1887
1896
|
dimWhenIdleHint: "鼠标移开面板时降低不透明度,输入文字时更透明;鼠标悬停恢复",
|
|
1888
1897
|
musicLabel: "动作音乐",
|
|
1889
1898
|
musicHint: "根据 Harness 动作实时作曲:请求开始、工具调用、回合结束等(需点击开关启动音频;检测到 MIDI 输出时同步发送 MIDI)",
|
|
1899
|
+
musicOn: "开",
|
|
1900
|
+
musicOff: "关",
|
|
1890
1901
|
musicVolume: "音量",
|
|
1891
1902
|
musicStyle: "风格",
|
|
1892
1903
|
musicStyleMajor: "大调",
|
|
@@ -1963,6 +1974,8 @@ window.__ModuleLoader__.load({
|
|
|
1963
1974
|
dimWhenIdleHint: "Fade the panel out when the pointer is away (more while typing); hover to restore",
|
|
1964
1975
|
musicLabel: "Action music",
|
|
1965
1976
|
musicHint: "Live-composes from Harness actions: request starts, tool calls, turn ends, etc. (click the switch to start audio; a detected MIDI output is driven as well)",
|
|
1977
|
+
musicOn: "On",
|
|
1978
|
+
musicOff: "Off",
|
|
1966
1979
|
musicVolume: "Volume",
|
|
1967
1980
|
musicStyle: "Style",
|
|
1968
1981
|
musicStyleMajor: "Major",
|
|
@@ -2186,6 +2199,7 @@ window.__ModuleLoader__.load({
|
|
|
2186
2199
|
};
|
|
2187
2200
|
}, "token-quota-ui: snapshot poll + full strategy");
|
|
2188
2201
|
const load = (sessionId) => {
|
|
2202
|
+
if (lastSessionId !== void 0 && lastSessionId !== sessionId) music.stop();
|
|
2189
2203
|
lastSessionId = sessionId;
|
|
2190
2204
|
bound?.setLoading(true);
|
|
2191
2205
|
bound?.setError(null);
|
package/lib/index.js
CHANGED
|
@@ -515,7 +515,7 @@ var TokenQuotaService = class TokenQuotaService extends Service {
|
|
|
515
515
|
return this.upgradeCheck;
|
|
516
516
|
}
|
|
517
517
|
async doRefreshUpgrade() {
|
|
518
|
-
const current = "0.1.
|
|
518
|
+
const current = "0.1.29";
|
|
519
519
|
let latest;
|
|
520
520
|
try {
|
|
521
521
|
const response = await fetch(REGISTRY_LATEST_URL, {
|
|
@@ -298,7 +298,7 @@ export function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored,
|
|
|
298
298
|
: '';
|
|
299
299
|
return (_jsxs("div", { ref: panelRef, className: `${css.panel}${panelDimClass !== '' ? ` ${panelDimClass}` : ''}`, style: panelPos !== null ? { left: panelPos.x, top: panelPos.y, right: 'auto' } : undefined, onPointerEnter: () => { setHovered(true); }, onPointerLeave: () => { setHovered(false); }, children: [_jsxs("div", { className: css.header, onPointerDown: (event) => { beginDrag(event, panelRef.current, applyPanelPos); }, children: [_jsxs("div", { className: css.headerText, children: [_jsxs("div", { className: css.title, children: [t('title'), __TOKEN_QUOTA_VERSION__ !== undefined && __TOKEN_QUOTA_VERSION__ !== '' && (upgrade !== null
|
|
300
300
|
? (_jsxs("span", { className: `${css.version} ${css.versionNew}`, title: t('upgradeAvailableHint'), children: ["v", __TOKEN_QUOTA_VERSION__, " \u2192 v", upgrade.latestVersion] }))
|
|
301
|
-
: (_jsxs("span", { className: css.version, children: ["v", __TOKEN_QUOTA_VERSION__] })))] }), _jsx("div", { className: css.subtitle, children: t('subtitle') })] }), _jsxs("div", { className: css.headerActions, onPointerDown: (event) => { event.stopPropagation(); }, children: [_jsx("button", { type: "button", className: `${css.settingsBtn}${musicEnabled ? ` ${css.settingsBtnActive}` : ''}`, title: t('
|
|
301
|
+
: (_jsxs("span", { className: css.version, children: ["v", __TOKEN_QUOTA_VERSION__] })))] }), _jsx("div", { className: css.subtitle, children: t('subtitle') })] }), _jsxs("div", { className: css.headerActions, onPointerDown: (event) => { event.stopPropagation(); }, children: [_jsx("button", { type: "button", "aria-pressed": musicEnabled, className: `${css.settingsBtn}${musicEnabled ? ` ${css.settingsBtnActive}` : ''}`, title: `${t('musicLabel')}:${musicEnabled ? t('musicOn') : t('musicOff')}`, onClick: () => { setMusicEnabled(!musicEnabled); }, children: "\u266A" }), _jsx("button", { type: "button", className: css.settingsBtn, onClick: () => { actions.setLogOpen(true); }, children: t('logs') }), _jsx("button", { type: "button", className: css.settingsBtn, onClick: openSettings, children: t('settings') }), _jsx("button", { type: "button", className: css.collapse, onClick: () => { setCollapsed(true); }, children: t('collapse') })] })] }), _jsxs("div", { className: css.body, children: [loading && _jsx("div", { className: css.notice, children: t('loading') }), error !== null && _jsx("div", { className: css.noticeError, children: error }), fullNotice !== null && (_jsx("div", { className: css.fullNotice, role: "alert", children: fullNotice })), upgrade !== null && !upgradeDismissed && (_jsxs("div", { className: `${css.upgradeBanner}${upgradeFlash ? ` ${css.upgradeBannerFlash}` : ''}`, role: "alert", children: [_jsx("div", { className: css.upgradeBannerText, children: t('upgradeAvailable').replace('{version}', upgrade.latestVersion) }), _jsx("div", { className: css.upgradeCommands, children: upgrade.commands.map(cmd => (_jsxs("div", { className: css.upgradeCommandRow, children: [_jsx("code", { className: css.upgradeCommand, children: cmd }), _jsx("button", { type: "button", className: `${css.copyBtn}${copiedCmd === cmd ? ` ${css.copyBtnDone}` : ''}`, onClick: () => { copyUpgradeCommand(cmd); }, children: copiedCmd === cmd ? t('copied') : t('copy') })] }, cmd))) }), _jsx("div", { className: css.upgradeHint, children: t('upgradeHint') }), _jsx("button", { type: "button", className: css.upgradeClose, onClick: () => { actions.setUpgradeDismissed(true); }, "aria-label": t('close'), children: "\u00D7" })] })), !loading && error === null && visibleRows.length === 0 && (_jsx("div", { className: css.notice, children: monitored !== null && monitored.length === 0 ? t('noMonitored') : t('waiting') })), visibleRows.map((row) => {
|
|
302
302
|
const state = barStateOf(row);
|
|
303
303
|
const pct = row.limit > 0 ? Math.min(100, Math.round((row.used / row.limit) * 100)) : 0;
|
|
304
304
|
const barClass = state === 'over'
|
|
@@ -262,6 +262,11 @@ export function apply(ctx) {
|
|
|
262
262
|
return () => { clearInterval(timer); };
|
|
263
263
|
}, 'token-quota-ui: snapshot poll + full strategy');
|
|
264
264
|
const load = (sessionId) => {
|
|
265
|
+
// Switching the panel to another session: stop the previous session's
|
|
266
|
+
// soundtrack — while scoped to the current session its stop events are
|
|
267
|
+
// filtered out, so without this it could play forever.
|
|
268
|
+
if (lastSessionId !== undefined && lastSessionId !== sessionId)
|
|
269
|
+
music.stop();
|
|
265
270
|
lastSessionId = sessionId;
|
|
266
271
|
bound?.setLoading(true);
|
|
267
272
|
bound?.setError(null);
|
|
@@ -68,6 +68,8 @@ export declare const zh: {
|
|
|
68
68
|
dimWhenIdleHint: string;
|
|
69
69
|
musicLabel: string;
|
|
70
70
|
musicHint: string;
|
|
71
|
+
musicOn: string;
|
|
72
|
+
musicOff: string;
|
|
71
73
|
musicVolume: string;
|
|
72
74
|
musicStyle: string;
|
|
73
75
|
musicStyleMajor: string;
|
|
@@ -146,6 +148,8 @@ export declare const en: {
|
|
|
146
148
|
dimWhenIdleHint: string;
|
|
147
149
|
musicLabel: string;
|
|
148
150
|
musicHint: string;
|
|
151
|
+
musicOn: string;
|
|
152
|
+
musicOff: string;
|
|
149
153
|
musicVolume: string;
|
|
150
154
|
musicStyle: string;
|
|
151
155
|
musicStyleMajor: string;
|
|
@@ -68,6 +68,8 @@ export const zh = {
|
|
|
68
68
|
dimWhenIdleHint: '鼠标移开面板时降低不透明度,输入文字时更透明;鼠标悬停恢复',
|
|
69
69
|
musicLabel: '动作音乐',
|
|
70
70
|
musicHint: '根据 Harness 动作实时作曲:请求开始、工具调用、回合结束等(需点击开关启动音频;检测到 MIDI 输出时同步发送 MIDI)',
|
|
71
|
+
musicOn: '开',
|
|
72
|
+
musicOff: '关',
|
|
71
73
|
musicVolume: '音量',
|
|
72
74
|
musicStyle: '风格',
|
|
73
75
|
musicStyleMajor: '大调',
|
|
@@ -144,6 +146,8 @@ export const en = {
|
|
|
144
146
|
dimWhenIdleHint: 'Fade the panel out when the pointer is away (more while typing); hover to restore',
|
|
145
147
|
musicLabel: 'Action music',
|
|
146
148
|
musicHint: 'Live-composes from Harness actions: request starts, tool calls, turn ends, etc. (click the switch to start audio; a detected MIDI output is driven as well)',
|
|
149
|
+
musicOn: 'On',
|
|
150
|
+
musicOff: 'Off',
|
|
147
151
|
musicVolume: 'Volume',
|
|
148
152
|
musicStyle: 'Style',
|
|
149
153
|
musicStyleMajor: 'Major',
|
|
@@ -42,6 +42,8 @@ export declare class TokenQuotaMusic {
|
|
|
42
42
|
private phraseIndex;
|
|
43
43
|
/** True when the next piece start should play the full intro glissando. */
|
|
44
44
|
private introPending;
|
|
45
|
+
/** Session the current piece belongs to (turn/start carries it). */
|
|
46
|
+
private sessionId;
|
|
45
47
|
private phraseTimer;
|
|
46
48
|
private lastStreamActivity;
|
|
47
49
|
private watchdogTimer;
|
|
@@ -64,6 +66,8 @@ export declare class TokenQuotaMusic {
|
|
|
64
66
|
setStyle(value: TokenQuotaMusicStyle): void;
|
|
65
67
|
/** Feed the engine one SSE activity timestamp (action or heartbeat). */
|
|
66
68
|
markStreamActivity(): void;
|
|
69
|
+
/** Stop any playing piece — e.g. when the panel switches sessions. */
|
|
70
|
+
stop(): void;
|
|
67
71
|
/** Handle one incoming host action and steer the piece. */
|
|
68
72
|
onAction(action: TokenQuotaMusicAction): void;
|
|
69
73
|
/** Start a new piece: intro run, then the phrase chain. */
|
|
@@ -80,6 +80,8 @@ export class TokenQuotaMusic {
|
|
|
80
80
|
phraseIndex = 0;
|
|
81
81
|
/** True when the next piece start should play the full intro glissando. */
|
|
82
82
|
introPending = true;
|
|
83
|
+
/** Session the current piece belongs to (turn/start carries it). */
|
|
84
|
+
sessionId;
|
|
83
85
|
phraseTimer;
|
|
84
86
|
// Watchdog: host heartbeat freshness (ms timestamp)
|
|
85
87
|
lastStreamActivity = 0;
|
|
@@ -161,6 +163,10 @@ export class TokenQuotaMusic {
|
|
|
161
163
|
markStreamActivity() {
|
|
162
164
|
this.lastStreamActivity = Date.now();
|
|
163
165
|
}
|
|
166
|
+
/** Stop any playing piece — e.g. when the panel switches sessions. */
|
|
167
|
+
stop() {
|
|
168
|
+
this.stopPiece(false);
|
|
169
|
+
}
|
|
164
170
|
/** Handle one incoming host action and steer the piece. */
|
|
165
171
|
onAction(action) {
|
|
166
172
|
if (!this.enabled || this.audio === null)
|
|
@@ -168,16 +174,27 @@ export class TokenQuotaMusic {
|
|
|
168
174
|
const base = TokenQuotaMusic.BASE_MIDI;
|
|
169
175
|
switch (action.type) {
|
|
170
176
|
case 'turn/start':
|
|
171
|
-
|
|
177
|
+
// A new turn = the user sent a message: begin a fresh piece right
|
|
178
|
+
// away (request/header only fires on the first request of a session
|
|
179
|
+
// or on model changes — it cannot be the music's start trigger).
|
|
180
|
+
// If another session's music was still playing, stop it first.
|
|
181
|
+
if (this.sessionId !== undefined && this.sessionId !== action.sessionId) {
|
|
182
|
+
this.stopPiece(false);
|
|
183
|
+
}
|
|
184
|
+
this.sessionId = action.sessionId;
|
|
185
|
+
this.stopMelody();
|
|
186
|
+
this.playing = false;
|
|
172
187
|
this.tonicIndex = 0;
|
|
173
188
|
this.phraseIndex = 0;
|
|
174
189
|
this.introPending = true;
|
|
190
|
+
this.startPiece();
|
|
175
191
|
break;
|
|
176
192
|
case 'request/header': {
|
|
193
|
+
// Safety net (and a light "request fired" accent when already playing).
|
|
177
194
|
if (!this.playing)
|
|
178
195
|
this.startPiece();
|
|
179
196
|
else
|
|
180
|
-
this.pluck(base + 24, 0.3);
|
|
197
|
+
this.pluck(base + 24, 0.3);
|
|
181
198
|
break;
|
|
182
199
|
}
|
|
183
200
|
case 'step/start': {
|
|
@@ -213,10 +230,9 @@ export class TokenQuotaMusic {
|
|
|
213
230
|
setTimeout(() => this.pluck(base + 5, 0.4, 0.8), 220);
|
|
214
231
|
break;
|
|
215
232
|
case 'assistant/message':
|
|
216
|
-
// Sentence end:
|
|
217
|
-
//
|
|
218
|
-
|
|
219
|
-
this.playing = false;
|
|
233
|
+
// Sentence end: a soft breath cadence, but the bed keeps playing
|
|
234
|
+
// until the turn fully ends (turn/end), so thinking + streaming stay
|
|
235
|
+
// audible the whole way through.
|
|
220
236
|
this.breath(action.interrupted ? base + 6 : base + 12, 1.6);
|
|
221
237
|
break;
|
|
222
238
|
case 'turn/end':
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jxgame2020/dsh-token-quota",
|
|
3
3
|
"description": "Daily per-model token quota accounting, enforcement, and a floating quota panel for the DeepSeek Harness — a fully self-contained plugin (no core-Harness wiring, no generated RPC contract)",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.29",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|