@ggboy123/dsh-paper-reader 1.3.1 → 1.3.3
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 +2 -2
- package/lib/client.js +11 -0
- package/package.json +1 -1
- package/reader/index.html +11 -5
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
**DeepSeek 官方桌面端**([deepseek.com/download](https://www.deepseek.com/download/) 下载,即 DeepSeek Harness 桌面版):
|
|
43
43
|
|
|
44
44
|
1. 安装并启动,登录 DeepSeek 账号
|
|
45
|
-
2. 侧栏 → **插件** → **添加插件**,输入 `@ggboy123/dsh-paper-reader@1.3.
|
|
45
|
+
2. 侧栏 → **插件** → **添加插件**,输入 `@ggboy123/dsh-paper-reader@1.3.3` 安装
|
|
46
46
|
3. 装完默认**停用**:点进插件详情,打开「启用」开关
|
|
47
47
|
4. **重启桌面端**(热启用状态下打开论文的链路会静默失效,重启进开机组合才正常,实测)
|
|
48
48
|
|
|
@@ -69,7 +69,7 @@ dsh plugin --profile web add @ggboy123/dsh-paper-reader
|
|
|
69
69
|
**已装过的用户升级必须带显式版本号**——不带版本的 `add` 对已存在的依赖是 no-op(pnpm 按首次安装时记录的版本范围解析,不会追新):
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
dsh plugin --profile web add @ggboy123/dsh-paper-reader@1.3.
|
|
72
|
+
dsh plugin --profile web add @ggboy123/dsh-paper-reader@1.3.3
|
|
73
73
|
# 重启 dsh web 生效;浏览器 Cmd+Shift+R 强刷,避免旧阅读器页面缓存
|
|
74
74
|
```
|
|
75
75
|
|
package/lib/client.js
CHANGED
|
@@ -268,6 +268,17 @@ window.__ModuleLoader__.load({
|
|
|
268
268
|
// 阅读器整个右移并变窄(实测 x=800 w=300,而列是 280..1100)。
|
|
269
269
|
// 只补 minWidth,不碰 width:dsh 每次会话提交都重写内联 width,抢同一属性会持续闪烁。
|
|
270
270
|
setStyle(panel, 'minWidth', eff ? '100%' : '')
|
|
271
|
+
// 全屏态层级修复(用户实测「点全屏放大后一片白」):dsh 的页签宿主 ._tabCell
|
|
272
|
+
// z-index 是 var(--dsh-dockkit-dock-layer, 10),全屏时该变量被抬到 40——但只定义在
|
|
273
|
+
// 右栏**面板**(P3OORG_panel)子树上,把本阅读器 z-10 的悬浮 iframe 压在下面:
|
|
274
|
+
// iframe 里页面活着、工具栏都在,却被白色 tab 宿主盖住。⚠️ 变量不从列/帧继承,
|
|
275
|
+
// body 级 iframe 拿到的是回落值 10——必须从 panel 上现读实际值再 +2:
|
|
276
|
+
// 盖回 tabCell、仍低于对话头部浮动按钮 45(全屏下拖拽手柄本就隐藏);
|
|
277
|
+
// 非全屏回 10(低于手柄 11 与 overlayLayer 20)。
|
|
278
|
+
if (readerIframeEl) {
|
|
279
|
+
const dockLayer = parseFloat(getComputedStyle(panel).getPropertyValue('--dsh-dockkit-dock-layer')) || 10
|
|
280
|
+
setStyle(readerIframeEl, 'zIndex', frame.hasAttribute('data-rightbar-fullscreen') ? String(dockLayer + 2) : '10')
|
|
281
|
+
}
|
|
271
282
|
}
|
|
272
283
|
const tick = () => {
|
|
273
284
|
if (!alive) return
|
package/package.json
CHANGED
package/reader/index.html
CHANGED
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
html, body { margin: 0; height: 100%; }
|
|
19
19
|
body { font: 14px/1.6 -apple-system, "SF Pro", "PingFang SC", "Helvetica Neue", sans-serif; background: var(--bg); color: var(--text); display: flex; flex-direction: column; }
|
|
20
20
|
|
|
21
|
-
/* ---------- 顶栏 ----------
|
|
22
|
-
|
|
21
|
+
/* ---------- 顶栏 ----------
|
|
22
|
+
flex-wrap —— 窄列(rightbar 可拖到 ~300px)下按钮放不下时换行到第二行,
|
|
23
|
+
而不是向右溢出被 iframe 裁掉(v1.3.2 前的坑:+/适宽 被挤出可视区,用户实测) */
|
|
24
|
+
#bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; row-gap: 6px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--border); flex: none; }
|
|
23
25
|
#bar button { font: inherit; }
|
|
24
26
|
/* flex:none —— 列被拖窄时按钮不许被压缩(否则文字竖排、按钮变窄条) */
|
|
25
27
|
.tbtn { flex: none; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--text); cursor: pointer; }
|
|
@@ -31,10 +33,14 @@
|
|
|
31
33
|
#bar .spacer { flex: 1; }
|
|
32
34
|
/* min-width:0 —— flex 项默认 min-width:auto 会拒绝收缩,空间不够时转而去挤按钮;
|
|
33
35
|
让标题自己截断(已有 ellipsis),按钮才能保持原样 */
|
|
34
|
-
#status { min-width: 0; color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
35
|
-
/* PDF
|
|
36
|
-
|
|
36
|
+
#status { flex: 0 1 auto; min-width: 0; color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
37
|
+
/* PDF 文件路径:可点的只读文本(点击复制)。⚠️ 必须可收缩(flex:0 1 auto + min-width:0)——
|
|
38
|
+
它是最长的内容项,窄列时先让位给按钮、自己截断(title 悬停始终有完整路径),
|
|
39
|
+
曾经 max-width:34% + flex:none 在窄列把 +/适宽 挤出可视区(用户实测) */
|
|
40
|
+
#pdf-path { flex: 0 1 auto; min-width: 0; max-width: 34%; padding: 0; border: none; background: none; color: var(--text-2); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
|
|
37
41
|
#pdf-path:hover { color: var(--accent); }
|
|
42
|
+
/* 窄列(<560px):版本号让位——它只是排障辅助信息 */
|
|
43
|
+
@media (max-width: 560px) { #ver { display: none; } }
|
|
38
44
|
|
|
39
45
|
/* ---------- PDF 区 ---------- */
|
|
40
46
|
#main { display: flex; flex: 1; min-height: 0; }
|