dsh-ui-alt 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/client.js +20 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
| 隐藏左上角 Logo | 关 | 隐藏侧栏顶部的品牌标记,下方内容自动补位 |
|
|
17
17
|
| 工作区标题与会话小一号 | 开 | 标题 13px、会话行 30px、项目行 32px,左下账户区一并压矮 |
|
|
18
18
|
| 会话前圆点 | 开 | 会话行前显示一个淡化的 4px 小圆点;与收藏星标同位置时自动让位 |
|
|
19
|
+
| 设置面板全屏 | 开 | 设置面板铺满窗口、隐藏右上角关闭按钮,改用左上角返回箭头;关闭后恢复为居中对话框 |
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
另有一些不挂开关的固定样式:设置导航列宽 220px、归档会话标题画删除线、选择题选中项的序号反色高亮、浅色主题下选中会话背景加强、工作区行悬停时保持文件夹图标。
|
|
21
22
|
|
|
22
23
|
## 安装
|
|
23
24
|
|
|
@@ -45,6 +46,7 @@ plugin_manager install_bundle target=<本仓库绝对路径>
|
|
|
45
46
|
| `data-dcc-ws` | `on` / `off` |
|
|
46
47
|
| `data-dcc-dot` | `on` / `off` |
|
|
47
48
|
| `data-dcc-font` | `on` / `off` |
|
|
49
|
+
| `data-dcc-full` | `on` / `off` |
|
|
48
50
|
|
|
49
51
|
## 目录结构
|
|
50
52
|
|
package/client.js
CHANGED
|
@@ -14,6 +14,7 @@ window.__ModuleLoader__.load({
|
|
|
14
14
|
workspaceSmall: true,
|
|
15
15
|
winFont: true,
|
|
16
16
|
sessionDot: true,
|
|
17
|
+
settingsFullscreen: true,
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
const isZh = () => {
|
|
@@ -40,6 +41,7 @@ window.__ModuleLoader__.load({
|
|
|
40
41
|
root.dataset.dccWs = prefs.workspaceSmall ? 'on' : 'off';
|
|
41
42
|
root.dataset.dccDot = prefs.sessionDot ? 'on' : 'off';
|
|
42
43
|
root.dataset.dccFont = prefs.winFont ? 'on' : 'off';
|
|
44
|
+
root.dataset.dccFull = prefs.settingsFullscreen ? 'on' : 'off';
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
function savePrefs(prefs) {
|
|
@@ -391,12 +393,12 @@ html[data-dcc-new="on"] body[data-ds-dark-theme] nav[class*="_panelList"] [class
|
|
|
391
393
|
}
|
|
392
394
|
|
|
393
395
|
/* ---------- 设置面板:全屏(避开 Electron 标题栏)+ 标题左侧返回按钮 ---------- */
|
|
394
|
-
html [class*="_overlay"]:has([class*="_navTitle"]) {
|
|
396
|
+
html[data-dcc-full="on"] [class*="_overlay"]:has([class*="_navTitle"]) {
|
|
395
397
|
top: var(--dsh-windows-titlebar-height, 0px) !important;
|
|
396
398
|
align-items: stretch !important;
|
|
397
399
|
justify-content: stretch !important;
|
|
398
400
|
}
|
|
399
|
-
html [class*="_overlay"]:has([class*="_navTitle"]) > [class*="_panel"] {
|
|
401
|
+
html[data-dcc-full="on"] [class*="_overlay"]:has([class*="_navTitle"]) > [class*="_panel"] {
|
|
400
402
|
width: 100% !important;
|
|
401
403
|
max-width: none !important;
|
|
402
404
|
height: 100% !important;
|
|
@@ -406,21 +408,21 @@ html [class*="_overlay"]:has([class*="_navTitle"]) > [class*="_panel"] {
|
|
|
406
408
|
}
|
|
407
409
|
/* 只在窗口足够宽时锁定两列布局,窄窗口沿用宿主自己的单列布局 */
|
|
408
410
|
@media (min-width: 720px) {
|
|
409
|
-
html [class*="_overlay"]:has([class*="_navTitle"]) > [class*="_panel"] {
|
|
411
|
+
html[data-dcc-full="on"] [class*="_overlay"]:has([class*="_navTitle"]) > [class*="_panel"] {
|
|
410
412
|
grid-template-columns: 220px minmax(0, 1fr) !important;
|
|
411
413
|
}
|
|
412
414
|
}
|
|
413
415
|
/* 全屏时不需要遮罩,去掉它会露出标题栏下方的一条描边 */
|
|
414
|
-
html [class*="_overlay"]:has([class*="_navTitle"]) [class*="_mask"] {
|
|
416
|
+
html[data-dcc-full="on"] [class*="_overlay"]:has([class*="_navTitle"]) [class*="_mask"] {
|
|
415
417
|
display: none !important;
|
|
416
418
|
}
|
|
417
|
-
html [class*="_overlay"]:has([class*="_navTitle"]) [class*="_close"] {
|
|
419
|
+
html[data-dcc-full="on"] [class*="_overlay"]:has([class*="_navTitle"]) [class*="_close"] {
|
|
418
420
|
display: none !important;
|
|
419
421
|
}
|
|
420
|
-
html [class*="_overlay"]:has([class*="_navTitle"]) [class*="_navTitle"] {
|
|
422
|
+
html[data-dcc-full="on"] [class*="_overlay"]:has([class*="_navTitle"]) [class*="_navTitle"] {
|
|
421
423
|
padding-left: 52px !important;
|
|
422
424
|
}
|
|
423
|
-
/*
|
|
425
|
+
/* 设置导航项:略矮一点(与全屏与否无关,始终生效) */
|
|
424
426
|
html [class*="_overlay"]:has([class*="_navTitle"]) [class*="_navCell"] {
|
|
425
427
|
position: relative;
|
|
426
428
|
height: 38px !important;
|
|
@@ -447,6 +449,10 @@ html [class*="_overlay"]:has([class*="_navTitle"]) [class*="_navCell"] {
|
|
|
447
449
|
.dcc-settings-back:hover {
|
|
448
450
|
background: var(--dsw-alias-interactive-bg-hover);
|
|
449
451
|
}
|
|
452
|
+
/* 非全屏时用宿主自己的关闭按钮,自绘的返回箭头不出现 */
|
|
453
|
+
html[data-dcc-full="off"] .dcc-settings-back {
|
|
454
|
+
display: none !important;
|
|
455
|
+
}
|
|
450
456
|
|
|
451
457
|
/* ---------- 左上角品牌区 ---------- */
|
|
452
458
|
html[data-dcc-logo="hidden"] [class*="_brand"]:not([class*="_brandMark"]):not([class*="_brandName"]):not([class*="_brandIdentity"]),
|
|
@@ -768,6 +774,12 @@ html[data-dcc-logo="hidden"] [class*="_logoRow"] {
|
|
|
768
774
|
desc: zh ? '在会话行前显示一个淡化的小圆点。' : 'Show a faint dot before each session row.',
|
|
769
775
|
checked: prefs.sessionDot,
|
|
770
776
|
onChange: update('sessionDot'),
|
|
777
|
+
}),
|
|
778
|
+
h(Row, {
|
|
779
|
+
title: zh ? '设置面板全屏' : 'Full-screen settings panel',
|
|
780
|
+
desc: zh ? '设置面板铺满窗口,隐藏右上角关闭按钮,改用左上角返回箭头;关闭后恢复为居中对话框。' : 'Fill the window with the settings panel, replace its close button with a back arrow at the top left; off restores the centered dialog.',
|
|
781
|
+
checked: prefs.settingsFullscreen,
|
|
782
|
+
onChange: update('settingsFullscreen'),
|
|
771
783
|
})));
|
|
772
784
|
}
|
|
773
785
|
|
|
@@ -813,6 +825,7 @@ html[data-dcc-logo="hidden"] [class*="_logoRow"] {
|
|
|
813
825
|
delete root.dataset.dccWs;
|
|
814
826
|
delete root.dataset.dccDot;
|
|
815
827
|
delete root.dataset.dccFont;
|
|
828
|
+
delete root.dataset.dccFull;
|
|
816
829
|
};
|
|
817
830
|
}, 'dsh-ui-alt: styles and preference attributes');
|
|
818
831
|
|