@philomelcc/dsh-workbench 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.js +4 -15
- package/index.js +6 -4
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -301,19 +301,6 @@ window.__ModuleLoader__.load({
|
|
|
301
301
|
return api;
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
// ---------- workbench icon ----------
|
|
305
|
-
function WorkbenchIcon(props) {
|
|
306
|
-
const size = props.size || 20;
|
|
307
|
-
return h('svg', {
|
|
308
|
-
viewBox: '0 0 24 24', width: size, height: size, 'aria-hidden': true, fill: 'none',
|
|
309
|
-
},
|
|
310
|
-
h('rect', { x: 3.5, y: 3.5, width: 7, height: 7, rx: 1.6, stroke: 'currentColor', strokeWidth: 1.5 }),
|
|
311
|
-
h('rect', { x: 13.5, y: 3.5, width: 7, height: 7, rx: 1.6, stroke: 'currentColor', strokeWidth: 1.5 }),
|
|
312
|
-
h('rect', { x: 3.5, y: 13.5, width: 7, height: 7, rx: 1.6, stroke: 'currentColor', strokeWidth: 1.5 }),
|
|
313
|
-
h('rect', { x: 13.5, y: 13.5, width: 7, height: 7, rx: 1.6, stroke: 'currentColor', strokeWidth: 1.5 }),
|
|
314
|
-
);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
304
|
// ---------- settings icon & page ----------
|
|
318
305
|
const SETTINGS_VIEW_ID = 'workbench-settings';
|
|
319
306
|
|
|
@@ -399,8 +386,10 @@ window.__ModuleLoader__.load({
|
|
|
399
386
|
function WorkbenchSettings() {
|
|
400
387
|
const enabled = useFeatures();
|
|
401
388
|
const reg = useRegistry();
|
|
389
|
+
// Only tabbed modules belong here: the shell's own overview and this
|
|
390
|
+
// settings page live in the system bar, not in the module row.
|
|
402
391
|
const views = Array.from(reg.views.values())
|
|
403
|
-
.filter((item) => item.
|
|
392
|
+
.filter((item) => item.tab !== false)
|
|
404
393
|
.sort((a, b) => a.order - b.order);
|
|
405
394
|
|
|
406
395
|
function toggleRow(key) {
|
|
@@ -1815,7 +1804,7 @@ body[data-wb-paper="1"] [class*="_hoverPath"] {
|
|
|
1815
1804
|
id: 'workbench',
|
|
1816
1805
|
title: '工作台',
|
|
1817
1806
|
subtitle: '工作台总览:已接入的视图与浮窗',
|
|
1818
|
-
icon:
|
|
1807
|
+
icon: IconWorkbenchTabs,
|
|
1819
1808
|
component: WorkbenchOverview,
|
|
1820
1809
|
order: -10,
|
|
1821
1810
|
tab: false,
|
package/index.js
CHANGED
|
@@ -15,10 +15,12 @@ function resolveSupervisor() {
|
|
|
15
15
|
const command = process.env.DSH_RESTART_CMD || '';
|
|
16
16
|
if (command) return { kind: 'command', command };
|
|
17
17
|
if (process.platform !== 'win32') return null;
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
|
|
18
|
+
// No default task name: this package ships to other machines, where the
|
|
19
|
+
// author's scheduled task does not exist. Enable the button by setting
|
|
20
|
+
// DSH_RESTART_TASK (a Windows scheduled task name) or DSH_RESTART_CMD
|
|
21
|
+
// (any command that starts the host again).
|
|
22
|
+
const task = process.env.DSH_RESTART_TASK || '';
|
|
23
|
+
if (!task) return null;
|
|
22
24
|
try {
|
|
23
25
|
execSync(`schtasks /query /tn ${JSON.stringify(task)}`, { windowsHide: true, stdio: 'ignore' });
|
|
24
26
|
return { kind: 'task', task };
|
package/package.json
CHANGED