@jxgame2020/dsh-token-quota 0.1.33 → 0.1.34
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 +146 -117
- package/lib/index.js +1 -1
- package/lib/types/client/TokenQuotaPanel.js +20 -9
- package/lib/types/client/locales.d.ts +4 -4
- package/lib/types/client/locales.js +8 -8
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -105,7 +105,7 @@ window.__ModuleLoader__.load({
|
|
|
105
105
|
d.musicOnlyCurrentSession = only;
|
|
106
106
|
},
|
|
107
107
|
setUpgrade: (d, upgrade) => {
|
|
108
|
-
const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.
|
|
108
|
+
const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.34" ? upgrade : null;
|
|
109
109
|
if (d.upgrade === null || d.upgrade.latestVersion !== normalized?.latestVersion) d.upgradeDismissed = false;
|
|
110
110
|
d.upgrade = normalized;
|
|
111
111
|
},
|
|
@@ -225,7 +225,7 @@ window.__ModuleLoader__.load({
|
|
|
225
225
|
}
|
|
226
226
|
//#endregion
|
|
227
227
|
//#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaPanel.module.css.mjs
|
|
228
|
-
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_notesBar{flex-wrap:wrap;align-items:center;gap:4px;margin-top:4px;display:flex}.NPLLIq_noteChip{width:20px;height:20px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;font-size:11px;line-height:1;transition:color .12s,border-color .12s;display:inline-flex}.NPLLIq_noteChip:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l2)}.NPLLIq_noteChipOpen{color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew{width:22px;height:20px;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;transition:color .12s,border-color .12s;display:inline-flex;position:relative}.NPLLIq_noteNew:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_noteNewPlus{color:inherit;font-size:10px;font-weight:700;line-height:1;position:absolute;bottom:-2px;right:-1px}.NPLLIq_noteWin{z-index:60;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000038}.NPLLIq_noteWinCollapsed{height:auto!important}.NPLLIq_noteWinBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;flex:none;align-items:center;gap:4px;padding:4px 6px;display:flex}.NPLLIq_noteWinBar:active{cursor:grabbing}.NPLLIq_noteWinGripBar{color:var(--dsw-alias-label-secondary);opacity:.7;flex:none;font-size:10px}.NPLLIq_noteWinTitle{min-width:0;color:var(--dsw-alias-label-primary);background:0 0;border:1px solid #0000;border-radius:4px;outline:none;flex:1;padding:1px 2px;font-size:11px;font-weight:600}.NPLLIq_noteWinTitle:hover{border-color:var(--dsw-alias-border-l1)}.NPLLIq_noteWinTitle:focus{background:var(--dsw-alias-bg-overlay);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteWinBtn{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_noteWinBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.NPLLIq_noteWinText{box-sizing:border-box;width:100%;min-height:0;color:var(--dsw-alias-label-primary);resize:none;background:0 0;border:none;outline:none;flex:1;padding:6px 8px;font-family:inherit;font-size:11px;line-height:1.5}.NPLLIq_noteWinResize{cursor:nwse-resize;background:linear-gradient(135deg, transparent 0 45%, var(--dsw-alias-border-l2) 45% 55%, transparent 55% 70%, var(--dsw-alias-border-l2) 70% 80%, transparent 80%);width:14px;height:14px;position:absolute;bottom:0;right:0}.NPLLIq_noteMenuBackdrop{z-index:100;pointer-events:auto;position:fixed;inset:0}.NPLLIq_noteMenu{z-index:101;pointer-events:auto;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;min-width:96px;padding:4px;display:flex;position:fixed;box-shadow:0 8px 24px #0000003d}.NPLLIq_noteMenuItem{text-align:left;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:5px;padding:5px 8px;font-size:11px}.NPLLIq_noteMenuItem:hover{background:var(--dsw-alias-bg-layer-2)}.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_rowDrag{cursor:grab;color:var(--dsw-alias-label-secondary);user-select:none;border-radius:4px;flex:none;margin-right:2px;padding:2px 3px;font-size:11px;line-height:1}.NPLLIq_rowDrag:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_rowDrag:active{cursor:grabbing}.NPLLIq_rowDragging{opacity:.45}.NPLLIq_rowDropTarget{box-shadow:inset 0 2px 0 var(--dsw-alias-brand-primary)}.NPLLIq_rowName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;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;pointer-events:auto;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:430px;max-width:94vw;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_dialogTabs{border-bottom:1px solid var(--dsw-alias-divider-1,#00000014);gap:2px;margin:-6px -14px 0;padding:0 14px;display:flex}.NPLLIq_dialogTab{appearance:none;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;padding:6px 12px 8px;font-size:12px}.NPLLIq_dialogTab:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_dialogTabActive{color:var(--dsw-alias-brand-primary);border-bottom-color:var(--dsw-alias-brand-primary);font-weight:600}.NPLLIq_settingsDialog{height:min(560px,80vh)}.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;pointer-events:auto;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}";
|
|
228
|
+
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_notesBar{flex-wrap:wrap;align-items:center;gap:4px;margin-top:4px;display:flex}.NPLLIq_noteChip{width:20px;height:20px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;font-size:11px;line-height:1;transition:color .12s,border-color .12s;display:inline-flex}.NPLLIq_noteChip:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l2)}.NPLLIq_noteChipOpen{color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew{width:22px;height:20px;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;transition:color .12s,border-color .12s;display:inline-flex;position:relative}.NPLLIq_noteNew:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_noteNewPlus{color:inherit;font-size:10px;font-weight:700;line-height:1;position:absolute;bottom:-2px;right:-1px}.NPLLIq_noteWin{z-index:60;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000038}.NPLLIq_noteWinCollapsed{height:auto!important}.NPLLIq_noteWinBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;flex:none;align-items:center;gap:4px;padding:4px 6px;display:flex}.NPLLIq_noteWinBar:active{cursor:grabbing}.NPLLIq_noteWinGripBar{color:var(--dsw-alias-label-secondary);opacity:.7;flex:none;font-size:10px}.NPLLIq_noteWinTitleText{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;padding:1px 2px;font-size:11px;font-weight:600;overflow:hidden}.NPLLIq_noteWinTitle{min-width:0;color:var(--dsw-alias-label-primary);background:0 0;border:1px solid #0000;border-radius:4px;outline:none;flex:1;padding:1px 2px;font-size:11px;font-weight:600}.NPLLIq_noteWinTitle:hover{border-color:var(--dsw-alias-border-l1)}.NPLLIq_noteWinTitle:focus{background:var(--dsw-alias-bg-overlay);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteWinBtn{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_noteWinBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.NPLLIq_noteWinText{box-sizing:border-box;width:100%;min-height:0;color:var(--dsw-alias-label-primary);resize:none;background:0 0;border:none;outline:none;flex:1;padding:6px 8px;font-family:inherit;font-size:11px;line-height:1.5}.NPLLIq_noteWinResize{cursor:nwse-resize;background:linear-gradient(135deg, transparent 0 45%, var(--dsw-alias-border-l2) 45% 55%, transparent 55% 70%, var(--dsw-alias-border-l2) 70% 80%, transparent 80%);width:14px;height:14px;position:absolute;bottom:0;right:0}.NPLLIq_noteMenuBackdrop{z-index:100;pointer-events:auto;position:fixed;inset:0}.NPLLIq_noteMenu{z-index:101;pointer-events:auto;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;min-width:96px;padding:4px;display:flex;position:fixed;box-shadow:0 8px 24px #0000003d}.NPLLIq_noteMenuItem{text-align:left;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:5px;padding:5px 8px;font-size:11px}.NPLLIq_noteMenuItem:hover{background:var(--dsw-alias-bg-layer-2)}.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_rowDrag{cursor:grab;color:var(--dsw-alias-label-secondary);user-select:none;border-radius:4px;flex:none;margin-right:2px;padding:2px 3px;font-size:11px;line-height:1}.NPLLIq_rowDrag:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_rowDrag:active{cursor:grabbing}.NPLLIq_rowDragging{opacity:.45}.NPLLIq_rowDropTarget{box-shadow:inset 0 2px 0 var(--dsw-alias-brand-primary)}.NPLLIq_rowName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;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;pointer-events:auto;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:430px;max-width:94vw;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_dialogTabs{border-bottom:1px solid var(--dsw-alias-divider-1,#00000014);gap:2px;margin:-6px -14px 0;padding:0 14px;display:flex}.NPLLIq_dialogTab{appearance:none;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;padding:6px 12px 8px;font-size:12px}.NPLLIq_dialogTab:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_dialogTabActive{color:var(--dsw-alias-brand-primary);border-bottom-color:var(--dsw-alias-brand-primary);font-weight:600}.NPLLIq_settingsDialog{height:min(560px,80vh)}.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;pointer-events:auto;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}";
|
|
229
229
|
const tagId = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
|
|
230
230
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
231
231
|
const tag = document.createElement("style");
|
|
@@ -235,115 +235,116 @@ window.__ModuleLoader__.load({
|
|
|
235
235
|
document.head.appendChild(tag);
|
|
236
236
|
}
|
|
237
237
|
var TokenQuotaPanel_module_css_default = {
|
|
238
|
-
"
|
|
239
|
-
"resetRow": "NPLLIq_resetRow",
|
|
240
|
-
"noteWinBtn": "NPLLIq_noteWinBtn",
|
|
241
|
-
"input": "NPLLIq_input",
|
|
242
|
-
"dialogLabel": "NPLLIq_dialogLabel",
|
|
243
|
-
"dialogClose": "NPLLIq_dialogClose",
|
|
238
|
+
"noteNew": "NPLLIq_noteNew",
|
|
244
239
|
"logPagerInfo": "NPLLIq_logPagerInfo",
|
|
245
|
-
"
|
|
246
|
-
"
|
|
247
|
-
"gearBtn": "NPLLIq_gearBtn",
|
|
248
|
-
"logPagerBtn": "NPLLIq_logPagerBtn",
|
|
249
|
-
"logClearDialog": "NPLLIq_logClearDialog",
|
|
250
|
-
"rowDragging": "NPLLIq_rowDragging",
|
|
251
|
-
"checkErrorHint": "NPLLIq_checkErrorHint",
|
|
252
|
-
"dialogTabActive": "NPLLIq_dialogTabActive",
|
|
253
|
-
"logTable": "NPLLIq_logTable",
|
|
254
|
-
"selectBtn": "NPLLIq_selectBtn",
|
|
255
|
-
"rowName": "NPLLIq_rowName",
|
|
256
|
-
"logToolbar": "NPLLIq_logToolbar",
|
|
240
|
+
"copyBtn": "NPLLIq_copyBtn",
|
|
241
|
+
"headerText": "NPLLIq_headerText",
|
|
257
242
|
"settingsDialog": "NPLLIq_settingsDialog",
|
|
258
|
-
"checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
|
|
259
|
-
"header": "NPLLIq_header",
|
|
260
|
-
"noteChip": "NPLLIq_noteChip",
|
|
261
|
-
"subtitle": "NPLLIq_subtitle",
|
|
262
|
-
"noteChipOpen": "NPLLIq_noteChipOpen",
|
|
263
|
-
"noteWinResize": "NPLLIq_noteWinResize",
|
|
264
|
-
"rowMeta": "NPLLIq_rowMeta",
|
|
265
|
-
"save": "NPLLIq_save",
|
|
266
243
|
"headerActions": "NPLLIq_headerActions",
|
|
267
|
-
"
|
|
268
|
-
"
|
|
269
|
-
"
|
|
270
|
-
"
|
|
244
|
+
"panel": "NPLLIq_panel",
|
|
245
|
+
"noteWinResize": "NPLLIq_noteWinResize",
|
|
246
|
+
"tab": "NPLLIq_tab",
|
|
247
|
+
"upgradeBanner": "NPLLIq_upgradeBanner",
|
|
248
|
+
"checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
|
|
249
|
+
"resetSelect": "NPLLIq_resetSelect",
|
|
250
|
+
"logScroll": "NPLLIq_logScroll",
|
|
251
|
+
"rowDragging": "NPLLIq_rowDragging",
|
|
252
|
+
"monitorList": "NPLLIq_monitorList",
|
|
253
|
+
"noteWinBtn": "NPLLIq_noteWinBtn",
|
|
254
|
+
"noteWinTitle": "NPLLIq_noteWinTitle",
|
|
255
|
+
"collapse": "NPLLIq_collapse",
|
|
256
|
+
"noteNewPlus": "NPLLIq_noteNewPlus",
|
|
257
|
+
"selectBtn": "NPLLIq_selectBtn",
|
|
258
|
+
"logPagerBtn": "NPLLIq_logPagerBtn",
|
|
259
|
+
"logPageSizeSelect": "NPLLIq_logPageSizeSelect",
|
|
260
|
+
"dialogOverlay": "NPLLIq_dialogOverlay",
|
|
261
|
+
"dialogBody": "NPLLIq_dialogBody",
|
|
262
|
+
"radioRow": "NPLLIq_radioRow",
|
|
263
|
+
"checkErrorHint": "NPLLIq_checkErrorHint",
|
|
271
264
|
"dialogTab": "NPLLIq_dialogTab",
|
|
272
|
-
"
|
|
273
|
-
"
|
|
274
|
-
"
|
|
275
|
-
"
|
|
265
|
+
"monitorHint": "NPLLIq_monitorHint",
|
|
266
|
+
"row": "NPLLIq_row",
|
|
267
|
+
"dialogActions": "NPLLIq_dialogActions",
|
|
268
|
+
"upgradeClose": "NPLLIq_upgradeClose",
|
|
269
|
+
"panelDimStrong": "NPLLIq_panelDimStrong",
|
|
270
|
+
"logClearDialog": "NPLLIq_logClearDialog",
|
|
276
271
|
"logClearBtn": "NPLLIq_logClearBtn",
|
|
277
|
-
"
|
|
278
|
-
"
|
|
279
|
-
"
|
|
272
|
+
"logToolbar": "NPLLIq_logToolbar",
|
|
273
|
+
"controls": "NPLLIq_controls",
|
|
274
|
+
"upgradeHint": "NPLLIq_upgradeHint",
|
|
275
|
+
"upgradeCommands": "NPLLIq_upgradeCommands",
|
|
276
|
+
"logClearDate": "NPLLIq_logClearDate",
|
|
277
|
+
"panelDim": "NPLLIq_panelDim",
|
|
278
|
+
"gearBtn": "NPLLIq_gearBtn",
|
|
280
279
|
"fillIdle": "NPLLIq_fillIdle",
|
|
281
|
-
"
|
|
282
|
-
"
|
|
283
|
-
"
|
|
284
|
-
"
|
|
285
|
-
"
|
|
286
|
-
"
|
|
280
|
+
"upgradeBannerText": "NPLLIq_upgradeBannerText",
|
|
281
|
+
"monitorName": "NPLLIq_monitorName",
|
|
282
|
+
"logHeader": "NPLLIq_logHeader",
|
|
283
|
+
"notesBar": "NPLLIq_notesBar",
|
|
284
|
+
"fillOver": "NPLLIq_fillOver",
|
|
285
|
+
"dialogSection": "NPLLIq_dialogSection",
|
|
286
|
+
"logDialog": "NPLLIq_logDialog",
|
|
287
|
+
"version": "NPLLIq_version",
|
|
287
288
|
"logDayCol": "NPLLIq_logDayCol",
|
|
288
|
-
"
|
|
289
|
+
"noteMenu": "NPLLIq_noteMenu",
|
|
290
|
+
"monitorRow": "NPLLIq_monitorRow",
|
|
291
|
+
"noteWinCollapsed": "NPLLIq_noteWinCollapsed",
|
|
292
|
+
"logPager": "NPLLIq_logPager",
|
|
293
|
+
"input": "NPLLIq_input",
|
|
294
|
+
"dialogLabel": "NPLLIq_dialogLabel",
|
|
295
|
+
"switch": "NPLLIq_switch",
|
|
296
|
+
"upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
|
|
297
|
+
"dialogTabActive": "NPLLIq_dialogTabActive",
|
|
298
|
+
"dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
|
|
299
|
+
"noticeError": "NPLLIq_noticeError",
|
|
300
|
+
"versionNew": "NPLLIq_versionNew",
|
|
301
|
+
"resetRow": "NPLLIq_resetRow",
|
|
289
302
|
"logPagerControls": "NPLLIq_logPagerControls",
|
|
290
|
-
"
|
|
303
|
+
"save": "NPLLIq_save",
|
|
304
|
+
"rowHeader": "NPLLIq_rowHeader",
|
|
305
|
+
"tabLabel": "NPLLIq_tabLabel",
|
|
306
|
+
"dialogTitle": "NPLLIq_dialogTitle",
|
|
307
|
+
"header": "NPLLIq_header",
|
|
291
308
|
"bar": "NPLLIq_bar",
|
|
292
309
|
"noteWinGripBar": "NPLLIq_noteWinGripBar",
|
|
293
|
-
"
|
|
294
|
-
"
|
|
295
|
-
"
|
|
296
|
-
"
|
|
297
|
-
"
|
|
298
|
-
"
|
|
310
|
+
"upgradeCommand": "NPLLIq_upgradeCommand",
|
|
311
|
+
"body": "NPLLIq_body",
|
|
312
|
+
"dialog": "NPLLIq_dialog",
|
|
313
|
+
"logTable": "NPLLIq_logTable",
|
|
314
|
+
"fullNotice": "NPLLIq_fullNotice",
|
|
315
|
+
"upgradeCommandRow": "NPLLIq_upgradeCommandRow",
|
|
316
|
+
"noteWin": "NPLLIq_noteWin",
|
|
317
|
+
"noteChipOpen": "NPLLIq_noteChipOpen",
|
|
299
318
|
"rowDrag": "NPLLIq_rowDrag",
|
|
300
|
-
"
|
|
319
|
+
"noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
|
|
320
|
+
"fillWarn": "NPLLIq_fillWarn",
|
|
321
|
+
"noteMenuItem": "NPLLIq_noteMenuItem",
|
|
322
|
+
"checkUpdatesRow": "NPLLIq_checkUpdatesRow",
|
|
323
|
+
"logSearch": "NPLLIq_logSearch",
|
|
324
|
+
"title": "NPLLIq_title",
|
|
325
|
+
"noteWinText": "NPLLIq_noteWinText",
|
|
326
|
+
"rowName": "NPLLIq_rowName",
|
|
327
|
+
"dialogHeader": "NPLLIq_dialogHeader",
|
|
301
328
|
"checkBtn": "NPLLIq_checkBtn",
|
|
302
|
-
"noteNewPlus": "NPLLIq_noteNewPlus",
|
|
303
|
-
"dialogHint": "NPLLIq_dialogHint",
|
|
304
|
-
"dialogTabs": "NPLLIq_dialogTabs",
|
|
305
|
-
"copyBtnDone": "NPLLIq_copyBtnDone",
|
|
306
|
-
"dialogTitle": "NPLLIq_dialogTitle",
|
|
307
|
-
"notice": "NPLLIq_notice",
|
|
308
329
|
"currentBadge": "NPLLIq_currentBadge",
|
|
330
|
+
"noteChip": "NPLLIq_noteChip",
|
|
331
|
+
"subtitle": "NPLLIq_subtitle",
|
|
332
|
+
"noteWinTitleText": "NPLLIq_noteWinTitleText",
|
|
309
333
|
"settingsBtnActive": "NPLLIq_settingsBtnActive",
|
|
310
|
-
"
|
|
311
|
-
"
|
|
312
|
-
"
|
|
334
|
+
"copyBtnDone": "NPLLIq_copyBtnDone",
|
|
335
|
+
"rowDropTarget": "NPLLIq_rowDropTarget",
|
|
336
|
+
"noteWinBar": "NPLLIq_noteWinBar",
|
|
337
|
+
"rowMeta": "NPLLIq_rowMeta",
|
|
338
|
+
"settingsBtn": "NPLLIq_settingsBtn",
|
|
339
|
+
"dialogTabs": "NPLLIq_dialogTabs",
|
|
313
340
|
"dialogBtn": "NPLLIq_dialogBtn",
|
|
314
|
-
"
|
|
315
|
-
"
|
|
341
|
+
"logUsedCol": "NPLLIq_logUsedCol",
|
|
342
|
+
"tabIcon": "NPLLIq_tabIcon",
|
|
343
|
+
"dialogClose": "NPLLIq_dialogClose",
|
|
316
344
|
"logModelCol": "NPLLIq_logModelCol",
|
|
317
|
-
"
|
|
318
|
-
"
|
|
319
|
-
"
|
|
320
|
-
"switch": "NPLLIq_switch",
|
|
321
|
-
"dialogActions": "NPLLIq_dialogActions",
|
|
322
|
-
"logHeader": "NPLLIq_logHeader",
|
|
323
|
-
"upgradeBannerText": "NPLLIq_upgradeBannerText",
|
|
324
|
-
"logClearDate": "NPLLIq_logClearDate",
|
|
325
|
-
"dialogBody": "NPLLIq_dialogBody",
|
|
326
|
-
"versionNew": "NPLLIq_versionNew",
|
|
327
|
-
"noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
|
|
328
|
-
"dialog": "NPLLIq_dialog",
|
|
329
|
-
"upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
|
|
330
|
-
"upgradeClose": "NPLLIq_upgradeClose",
|
|
331
|
-
"noteWinTitle": "NPLLIq_noteWinTitle",
|
|
332
|
-
"logPageSizeSelect": "NPLLIq_logPageSizeSelect",
|
|
333
|
-
"logPagerPages": "NPLLIq_logPagerPages",
|
|
334
|
-
"logScroll": "NPLLIq_logScroll",
|
|
335
|
-
"panel": "NPLLIq_panel",
|
|
336
|
-
"panelDim": "NPLLIq_panelDim",
|
|
337
|
-
"panelDimStrong": "NPLLIq_panelDimStrong",
|
|
338
|
-
"body": "NPLLIq_body",
|
|
339
|
-
"rowDropTarget": "NPLLIq_rowDropTarget",
|
|
340
|
-
"fillOver": "NPLLIq_fillOver",
|
|
341
|
-
"logPager": "NPLLIq_logPager",
|
|
342
|
-
"row": "NPLLIq_row",
|
|
343
|
-
"noteMenu": "NPLLIq_noteMenu",
|
|
344
|
-
"monitorHint": "NPLLIq_monitorHint",
|
|
345
|
-
"upgradeCommandRow": "NPLLIq_upgradeCommandRow",
|
|
346
|
-
"upgradeHint": "NPLLIq_upgradeHint"
|
|
345
|
+
"notice": "NPLLIq_notice",
|
|
346
|
+
"dialogHint": "NPLLIq_dialogHint",
|
|
347
|
+
"logPagerPages": "NPLLIq_logPagerPages"
|
|
347
348
|
};
|
|
348
349
|
//#endregion
|
|
349
350
|
//#region lib/types/client/TokenQuotaPanel.js
|
|
@@ -485,6 +486,8 @@ window.__ModuleLoader__.load({
|
|
|
485
486
|
const notesPending = (0, react.useRef)(null);
|
|
486
487
|
const [noteMenu, setNoteMenu] = (0, react.useState)(null);
|
|
487
488
|
const [activeNote, setActiveNote] = (0, react.useState)(null);
|
|
489
|
+
const [editingTitle, setEditingTitle] = (0, react.useState)(null);
|
|
490
|
+
const [titleDraft, setTitleDraft] = (0, react.useState)("");
|
|
488
491
|
(0, react.useEffect)(() => {
|
|
489
492
|
if (!storedNotesLoaded || notesSeeded.current) return;
|
|
490
493
|
notesSeeded.current = true;
|
|
@@ -544,6 +547,11 @@ window.__ModuleLoader__.load({
|
|
|
544
547
|
visible: true
|
|
545
548
|
}]);
|
|
546
549
|
};
|
|
550
|
+
/** Commit the title draft and leave edit mode. */
|
|
551
|
+
const commitTitle = (id) => {
|
|
552
|
+
patchNote(id, { title: titleDraft }, true);
|
|
553
|
+
setEditingTitle(null);
|
|
554
|
+
};
|
|
547
555
|
const closeNote = (id) => {
|
|
548
556
|
patchNote(id, { visible: false });
|
|
549
557
|
};
|
|
@@ -561,8 +569,7 @@ window.__ModuleLoader__.load({
|
|
|
561
569
|
const win = event.currentTarget.parentElement;
|
|
562
570
|
if (win === null) return;
|
|
563
571
|
if (event.target.closest("button") !== null) return;
|
|
564
|
-
|
|
565
|
-
if (input !== null && document.activeElement === input) return;
|
|
572
|
+
if (event.target.closest("input") !== null) return;
|
|
566
573
|
event.preventDefault();
|
|
567
574
|
const startX = event.clientX;
|
|
568
575
|
const startY = event.clientY;
|
|
@@ -584,9 +591,6 @@ window.__ModuleLoader__.load({
|
|
|
584
591
|
window.removeEventListener("pointermove", onMove);
|
|
585
592
|
window.removeEventListener("pointerup", onUp);
|
|
586
593
|
window.removeEventListener("pointercancel", onUp);
|
|
587
|
-
if (dragging) return;
|
|
588
|
-
const title = win.querySelector("input");
|
|
589
|
-
if (title instanceof HTMLInputElement) title.focus();
|
|
590
594
|
};
|
|
591
595
|
window.addEventListener("pointermove", onMove);
|
|
592
596
|
window.addEventListener("pointerup", onUp);
|
|
@@ -818,13 +822,13 @@ window.__ModuleLoader__.load({
|
|
|
818
822
|
title: t("upgradeAvailableHint"),
|
|
819
823
|
children: [
|
|
820
824
|
"v",
|
|
821
|
-
"0.1.
|
|
825
|
+
"0.1.34",
|
|
822
826
|
" → v",
|
|
823
827
|
upgrade.latestVersion
|
|
824
828
|
]
|
|
825
829
|
}) : (0, react_jsx_runtime.jsxs)("span", {
|
|
826
830
|
className: TokenQuotaPanel_module_css_default.version,
|
|
827
|
-
children: ["v", "0.1.
|
|
831
|
+
children: ["v", "0.1.34"]
|
|
828
832
|
})]
|
|
829
833
|
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
830
834
|
className: TokenQuotaPanel_module_css_default.notesBar,
|
|
@@ -1585,24 +1589,49 @@ window.__ModuleLoader__.load({
|
|
|
1585
1589
|
onPointerDown: (event) => {
|
|
1586
1590
|
beginNoteBarDrag(event, note.id);
|
|
1587
1591
|
},
|
|
1592
|
+
onDoubleClick: () => {
|
|
1593
|
+
patchNote(note.id, { collapsed: false });
|
|
1594
|
+
},
|
|
1588
1595
|
children: [
|
|
1589
1596
|
(0, react_jsx_runtime.jsx)("span", {
|
|
1590
1597
|
className: TokenQuotaPanel_module_css_default.noteWinGripBar,
|
|
1591
1598
|
"aria-hidden": "true",
|
|
1592
1599
|
children: "⠿"
|
|
1593
1600
|
}),
|
|
1594
|
-
(0, react_jsx_runtime.jsx)("input", {
|
|
1601
|
+
editingTitle === note.id ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("input", {
|
|
1595
1602
|
className: TokenQuotaPanel_module_css_default.noteWinTitle,
|
|
1596
|
-
value:
|
|
1603
|
+
value: titleDraft,
|
|
1604
|
+
autoFocus: true,
|
|
1597
1605
|
placeholder: t("noteUntitled"),
|
|
1598
|
-
title: t("noteRenameHint"),
|
|
1599
1606
|
onChange: (event) => {
|
|
1600
|
-
|
|
1607
|
+
setTitleDraft(event.target.value);
|
|
1601
1608
|
},
|
|
1602
1609
|
onKeyDown: (event) => {
|
|
1603
|
-
if (event.key === "Enter")
|
|
1610
|
+
if (event.key === "Enter") commitTitle(note.id);
|
|
1611
|
+
if (event.key === "Escape") setEditingTitle(null);
|
|
1604
1612
|
}
|
|
1605
|
-
}),
|
|
1613
|
+
}), (0, react_jsx_runtime.jsx)("button", {
|
|
1614
|
+
type: "button",
|
|
1615
|
+
className: TokenQuotaPanel_module_css_default.noteWinBtn,
|
|
1616
|
+
title: t("noteConfirmTitle"),
|
|
1617
|
+
onClick: () => {
|
|
1618
|
+
commitTitle(note.id);
|
|
1619
|
+
},
|
|
1620
|
+
children: "✓"
|
|
1621
|
+
})] }) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
1622
|
+
className: TokenQuotaPanel_module_css_default.noteWinTitleText,
|
|
1623
|
+
title: note.title.trim() === "" ? t("noteUntitled") : note.title,
|
|
1624
|
+
children: note.title.trim() === "" ? t("noteUntitled") : note.title
|
|
1625
|
+
}), (0, react_jsx_runtime.jsx)("button", {
|
|
1626
|
+
type: "button",
|
|
1627
|
+
className: TokenQuotaPanel_module_css_default.noteWinBtn,
|
|
1628
|
+
title: t("noteEditTitle"),
|
|
1629
|
+
onClick: () => {
|
|
1630
|
+
setEditingTitle(note.id);
|
|
1631
|
+
setTitleDraft(note.title);
|
|
1632
|
+
},
|
|
1633
|
+
children: "✎"
|
|
1634
|
+
})] }),
|
|
1606
1635
|
(0, react_jsx_runtime.jsx)("button", {
|
|
1607
1636
|
type: "button",
|
|
1608
1637
|
className: TokenQuotaPanel_module_css_default.noteWinBtn,
|
|
@@ -1615,7 +1644,7 @@ window.__ModuleLoader__.load({
|
|
|
1615
1644
|
(0, react_jsx_runtime.jsx)("button", {
|
|
1616
1645
|
type: "button",
|
|
1617
1646
|
className: TokenQuotaPanel_module_css_default.noteWinBtn,
|
|
1618
|
-
title: t("
|
|
1647
|
+
title: t("noteClose"),
|
|
1619
1648
|
onClick: () => {
|
|
1620
1649
|
closeNote(note.id);
|
|
1621
1650
|
},
|
|
@@ -2328,12 +2357,12 @@ window.__ModuleLoader__.load({
|
|
|
2328
2357
|
noteNewHint: "新建笔记(最多 5 个)",
|
|
2329
2358
|
noteMaxHint: "最多 5 个笔记",
|
|
2330
2359
|
noteUntitled: "未命名",
|
|
2331
|
-
|
|
2360
|
+
noteEditTitle: "编辑标题",
|
|
2361
|
+
noteConfirmTitle: "完成编辑",
|
|
2332
2362
|
noteCollapse: "收起",
|
|
2333
2363
|
noteExpand: "展开",
|
|
2334
|
-
noteClose: "
|
|
2335
|
-
|
|
2336
|
-
noteDelete: "删除笔记",
|
|
2364
|
+
noteClose: "关闭",
|
|
2365
|
+
noteDelete: "删除",
|
|
2337
2366
|
noteResizeHint: "拖动改变大小",
|
|
2338
2367
|
notePlaceholder: "在这里记录…",
|
|
2339
2368
|
monitorLabel: "监控模型",
|
|
@@ -2421,12 +2450,12 @@ window.__ModuleLoader__.load({
|
|
|
2421
2450
|
noteNewHint: "New note (max 5)",
|
|
2422
2451
|
noteMaxHint: "At most 5 notes",
|
|
2423
2452
|
noteUntitled: "Untitled",
|
|
2424
|
-
|
|
2453
|
+
noteEditTitle: "Edit title",
|
|
2454
|
+
noteConfirmTitle: "Done",
|
|
2425
2455
|
noteCollapse: "Collapse",
|
|
2426
2456
|
noteExpand: "Expand",
|
|
2427
|
-
noteClose: "Close
|
|
2428
|
-
|
|
2429
|
-
noteDelete: "Delete note",
|
|
2457
|
+
noteClose: "Close",
|
|
2458
|
+
noteDelete: "Delete",
|
|
2430
2459
|
noteResizeHint: "Drag to resize",
|
|
2431
2460
|
notePlaceholder: "Write here…",
|
|
2432
2461
|
monitorLabel: "Monitored models",
|
package/lib/index.js
CHANGED
|
@@ -544,7 +544,7 @@ var TokenQuotaService = class TokenQuotaService extends Service {
|
|
|
544
544
|
return this.upgradeCheck;
|
|
545
545
|
}
|
|
546
546
|
async doRefreshUpgrade() {
|
|
547
|
-
const current = "0.1.
|
|
547
|
+
const current = "0.1.34";
|
|
548
548
|
let latest;
|
|
549
549
|
try {
|
|
550
550
|
const response = await fetch(REGISTRY_LATEST_URL, {
|
|
@@ -158,6 +158,11 @@ export function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored,
|
|
|
158
158
|
const [noteMenu, setNoteMenu] = useState(null);
|
|
159
159
|
// Note window that was touched last, painted above its siblings.
|
|
160
160
|
const [activeNote, setActiveNote] = useState(null);
|
|
161
|
+
// Note whose title is being edited (id) plus the in-progress draft. The
|
|
162
|
+
// title is a plain label until the pencil is pressed, so the title bar
|
|
163
|
+
// stays fully draggable the rest of the time.
|
|
164
|
+
const [editingTitle, setEditingTitle] = useState(null);
|
|
165
|
+
const [titleDraft, setTitleDraft] = useState('');
|
|
161
166
|
useEffect(() => {
|
|
162
167
|
if (!storedNotesLoaded || notesSeeded.current)
|
|
163
168
|
return;
|
|
@@ -222,6 +227,11 @@ export function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored,
|
|
|
222
227
|
visible: true,
|
|
223
228
|
}]);
|
|
224
229
|
};
|
|
230
|
+
/** Commit the title draft and leave edit mode. */
|
|
231
|
+
const commitTitle = (id) => {
|
|
232
|
+
patchNote(id, { title: titleDraft }, true);
|
|
233
|
+
setEditingTitle(null);
|
|
234
|
+
};
|
|
225
235
|
const closeNote = (id) => { patchNote(id, { visible: false }); };
|
|
226
236
|
const removeNote = (id) => {
|
|
227
237
|
commitNotes(notes.filter(note => note.id !== id));
|
|
@@ -239,8 +249,8 @@ export function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored,
|
|
|
239
249
|
return;
|
|
240
250
|
if (event.target.closest('button') !== null)
|
|
241
251
|
return;
|
|
242
|
-
|
|
243
|
-
if (input !== null
|
|
252
|
+
// While the title is being edited the input keeps native text behaviour.
|
|
253
|
+
if (event.target.closest('input') !== null)
|
|
244
254
|
return;
|
|
245
255
|
event.preventDefault();
|
|
246
256
|
const startX = event.clientX;
|
|
@@ -265,11 +275,6 @@ export function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored,
|
|
|
265
275
|
window.removeEventListener('pointermove', onMove);
|
|
266
276
|
window.removeEventListener('pointerup', onUp);
|
|
267
277
|
window.removeEventListener('pointercancel', onUp);
|
|
268
|
-
if (dragging)
|
|
269
|
-
return;
|
|
270
|
-
const title = win.querySelector('input');
|
|
271
|
-
if (title instanceof HTMLInputElement)
|
|
272
|
-
title.focus();
|
|
273
278
|
};
|
|
274
279
|
window.addEventListener('pointermove', onMove);
|
|
275
280
|
window.addEventListener('pointerup', onUp);
|
|
@@ -572,8 +577,14 @@ export function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored,
|
|
|
572
577
|
width: `${note.width}px`,
|
|
573
578
|
zIndex: activeNote === note.id ? 62 : 60,
|
|
574
579
|
...(note.collapsed ? {} : { height: `${note.height}px` }),
|
|
575
|
-
}, onPointerDown: () => { setActiveNote(note.id); }, children: [_jsxs("div", { className: css.noteWinBar, onPointerDown: (event) => { beginNoteBarDrag(event, note.id); }, children: [_jsx("span", { className: css.noteWinGripBar, "aria-hidden": "true", children: "\u283F" }),
|
|
576
|
-
|
|
580
|
+
}, onPointerDown: () => { setActiveNote(note.id); }, children: [_jsxs("div", { className: css.noteWinBar, onPointerDown: (event) => { beginNoteBarDrag(event, note.id); }, onDoubleClick: () => { patchNote(note.id, { collapsed: false }); }, children: [_jsx("span", { className: css.noteWinGripBar, "aria-hidden": "true", children: "\u283F" }), editingTitle === note.id
|
|
581
|
+
? (_jsxs(_Fragment, { children: [_jsx("input", { className: css.noteWinTitle, value: titleDraft, autoFocus: true, placeholder: t('noteUntitled'), onChange: (event) => { setTitleDraft(event.target.value); }, onKeyDown: (event) => {
|
|
582
|
+
if (event.key === 'Enter')
|
|
583
|
+
commitTitle(note.id);
|
|
584
|
+
if (event.key === 'Escape')
|
|
585
|
+
setEditingTitle(null);
|
|
586
|
+
} }), _jsx("button", { type: "button", className: css.noteWinBtn, title: t('noteConfirmTitle'), onClick: () => { commitTitle(note.id); }, children: "\u2713" })] }))
|
|
587
|
+
: (_jsxs(_Fragment, { children: [_jsx("span", { className: css.noteWinTitleText, title: note.title.trim() === '' ? t('noteUntitled') : note.title, children: note.title.trim() === '' ? t('noteUntitled') : note.title }), _jsx("button", { type: "button", className: css.noteWinBtn, title: t('noteEditTitle'), onClick: () => { setEditingTitle(note.id); setTitleDraft(note.title); }, children: "\u270E" })] })), _jsx("button", { type: "button", className: css.noteWinBtn, title: note.collapsed ? t('noteExpand') : t('noteCollapse'), onClick: () => { patchNote(note.id, { collapsed: !note.collapsed }); }, children: note.collapsed ? '▸' : '▾' }), _jsx("button", { type: "button", className: css.noteWinBtn, title: t('noteClose'), onClick: () => { closeNote(note.id); }, children: "\u00D7" })] }), !note.collapsed && (_jsxs(_Fragment, { children: [_jsx("textarea", { className: css.noteWinText, value: note.text, placeholder: t('notePlaceholder'), spellCheck: false, onChange: (event) => { patchNote(note.id, { text: event.target.value }, false); } }), _jsx("span", { className: css.noteWinResize, title: t('noteResizeHint'), onPointerDown: (event) => {
|
|
577
588
|
beginResize(event, event.currentTarget.parentElement, size => { patchNote(note.id, size, false); });
|
|
578
589
|
} })] }))] }, note.id))), noteMenu !== null && (_jsxs(_Fragment, { children: [_jsx("div", { className: css.noteMenuBackdrop, onPointerDown: () => { setNoteMenu(null); }, onContextMenu: (event) => { event.preventDefault(); setNoteMenu(null); } }), _jsxs("div", { className: css.noteMenu, style: { left: `${noteMenu.x}px`, top: `${noteMenu.y}px` }, children: [_jsx("button", { type: "button", className: css.noteMenuItem, onClick: () => { closeNote(noteMenu.id); setNoteMenu(null); }, children: t('noteClose') }), _jsx("button", { type: "button", className: css.noteMenuItem, onClick: () => { removeNote(noteMenu.id); }, children: t('noteDelete') })] })] }))] }));
|
|
579
590
|
}
|
|
@@ -32,11 +32,11 @@ export declare const zh: {
|
|
|
32
32
|
noteNewHint: string;
|
|
33
33
|
noteMaxHint: string;
|
|
34
34
|
noteUntitled: string;
|
|
35
|
-
|
|
35
|
+
noteEditTitle: string;
|
|
36
|
+
noteConfirmTitle: string;
|
|
36
37
|
noteCollapse: string;
|
|
37
38
|
noteExpand: string;
|
|
38
39
|
noteClose: string;
|
|
39
|
-
noteCloseHint: string;
|
|
40
40
|
noteDelete: string;
|
|
41
41
|
noteResizeHint: string;
|
|
42
42
|
notePlaceholder: string;
|
|
@@ -127,11 +127,11 @@ export declare const en: {
|
|
|
127
127
|
noteNewHint: string;
|
|
128
128
|
noteMaxHint: string;
|
|
129
129
|
noteUntitled: string;
|
|
130
|
-
|
|
130
|
+
noteEditTitle: string;
|
|
131
|
+
noteConfirmTitle: string;
|
|
131
132
|
noteCollapse: string;
|
|
132
133
|
noteExpand: string;
|
|
133
134
|
noteClose: string;
|
|
134
|
-
noteCloseHint: string;
|
|
135
135
|
noteDelete: string;
|
|
136
136
|
noteResizeHint: string;
|
|
137
137
|
notePlaceholder: string;
|
|
@@ -32,12 +32,12 @@ export const zh = {
|
|
|
32
32
|
noteNewHint: '新建笔记(最多 5 个)',
|
|
33
33
|
noteMaxHint: '最多 5 个笔记',
|
|
34
34
|
noteUntitled: '未命名',
|
|
35
|
-
|
|
35
|
+
noteEditTitle: '编辑标题',
|
|
36
|
+
noteConfirmTitle: '完成编辑',
|
|
36
37
|
noteCollapse: '收起',
|
|
37
38
|
noteExpand: '展开',
|
|
38
|
-
noteClose: '
|
|
39
|
-
|
|
40
|
-
noteDelete: '删除笔记',
|
|
39
|
+
noteClose: '关闭',
|
|
40
|
+
noteDelete: '删除',
|
|
41
41
|
noteResizeHint: '拖动改变大小',
|
|
42
42
|
notePlaceholder: '在这里记录…',
|
|
43
43
|
monitorLabel: '监控模型',
|
|
@@ -125,12 +125,12 @@ export const en = {
|
|
|
125
125
|
noteNewHint: 'New note (max 5)',
|
|
126
126
|
noteMaxHint: 'At most 5 notes',
|
|
127
127
|
noteUntitled: 'Untitled',
|
|
128
|
-
|
|
128
|
+
noteEditTitle: 'Edit title',
|
|
129
|
+
noteConfirmTitle: 'Done',
|
|
129
130
|
noteCollapse: 'Collapse',
|
|
130
131
|
noteExpand: 'Expand',
|
|
131
|
-
noteClose: 'Close
|
|
132
|
-
|
|
133
|
-
noteDelete: 'Delete note',
|
|
132
|
+
noteClose: 'Close',
|
|
133
|
+
noteDelete: 'Delete',
|
|
134
134
|
noteResizeHint: 'Drag to resize',
|
|
135
135
|
notePlaceholder: 'Write here…',
|
|
136
136
|
monitorLabel: 'Monitored models',
|
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.34",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|