dsh-bridge-gateway 0.1.4 → 0.1.6
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/CHANGELOG.md +25 -1
- package/README.md +64 -29
- package/README.zh.md +110 -0
- package/client/client.js +306 -3
- package/client/index.js +314 -3
- package/lib/bridge-rpc.js +132 -8
- package/lib/feishu/lark-bundled.mjs +156 -38
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
本项目 `dsh-bridge-gateway` 是基于 [dsh-bridge](https://github.com/wenbin-wb/dsh-bridge) 的移植增强分支,在保留原版能力之外,重点新增「公网直连网关」。
|
|
4
4
|
|
|
5
|
-
## [0.1.
|
|
5
|
+
## [0.1.6] - 2026-09-12
|
|
6
|
+
|
|
7
|
+
### 修复(移动端第二批:布局密度与面板)
|
|
8
|
+
- 输入框贴底:收掉 scrollBody 的 16px 底部衬距,只保留 6px 呼吸位 + 安全区,底部统计药丸完整可见。
|
|
9
|
+
- workbuddy-connect 的 Reasoning levels 按钮收成纯图标(26px,结构锚点不依赖语言),不再把左侧按钮挤到上一行;工具栏恢复单行。
|
|
10
|
+
- 对话/轨迹/上下文标签行折叠为标题行下缘的悬浮胶囊(原生 tooltip 灰配色),不再独占一行,中间内容区净增约 33px。
|
|
11
|
+
- 底部面板(better-sidebar panel-host)不再被一刀切隐藏:展开时以底部面板形态显示内容(zsh 会话等),收起时隐藏;收掉展开时原生预留的 220px 空白。展开信号用语言无关的 aria-pressed 锚点(body.dsh-workbench-open 在收起后残留,不可用)。
|
|
12
|
+
- 抽屉化侧边栏顶部对齐到标签条之下(top: 38px),不再与最上面的栏重叠。
|
|
13
|
+
|
|
14
|
+
## [0.1.5] - 2026-09-12
|
|
15
|
+
|
|
16
|
+
### 变更
|
|
17
|
+
- 适配 DSH 0.1.5:RPC 通道从 `connection.rpc.handle` 迁到 webServer 直注册 + `connection.requestRejection` 鉴权(0.1.5 inject 守卫使旧入口不可用,wire 格式不变)。
|
|
18
|
+
|
|
19
|
+
### 修复(移动端深度适配批次,基于 390px/320px 真机实测坐标)
|
|
20
|
+
- 顶栏「标准模式」与「对话管理」水平重叠(390px 下重叠 11px):titleRow 允许换行,titleCluster/headerActions/headerUtilities 各自可收缩并限宽(45vw/50vw),内部按钮限宽省略号。
|
|
21
|
+
- 输入框被撑到 780px 而消息列仅 318px:从会话根节点收窄 `--dsh-chat-content-width`/`--dsh-composer-card-max-width` 变量,并补上此前遗漏的 `uV2eYG_root` 约束层,输入框祖先链整体不超视口。
|
|
22
|
+
- 320px 下 git 分支 chip 溢出屏幕右侧 39px 被裁切:chip 限宽 `min(120px, 30vw)`,其 `position:absolute` 浮层锚点改用 `right: 8px` 覆盖内联 `left`。
|
|
23
|
+
- 主要控件(模型/权限/工作区/分支 chip/会话操作等 10 类按钮)点击热区经伪元素 `inset: -8px` 扩至约 44px,视觉尺寸不变。
|
|
24
|
+
- 侧边栏关闭时仅被 transform 移出屏幕、内部 7 个按钮仍可被 Tab 聚焦:改用 `visibility: hidden` + `pointer-events: none`,抽屉打开时恢复。
|
|
25
|
+
- 隐藏 dsh-better-sidebar 注入的全屏 `panel-host` 遮罩(z-index 25 压住输入框并拦截点击)与主题装饰性 `glass-fade` 渐变条(右下角小方块)。
|
|
26
|
+
- 输入框底部工具栏(权限选择器/模型选择器/添加命令/发送)弹性自适应互不重叠。
|
|
27
|
+
- 侧边栏抽屉底部溢出屏幕 38px:`box-sizing: border-box` + `100dvh` 高度约束。
|
|
28
|
+
|
|
29
|
+
## [0.1.4] - 2026-08-30
|
|
6
30
|
|
|
7
31
|
### 修复
|
|
8
32
|
- 修复「远程访问」面板在宿主连接未建立时无限卡在「加载中」的问题:为状态拉取增加兜底超时(15s),超时后释放 in-flight 锁并给出可用的「🔄 重试」按钮,避免面板永远无法自行恢复。
|
package/README.md
CHANGED
|
@@ -1,47 +1,82 @@
|
|
|
1
1
|
# dsh-bridge-gateway
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [简体中文](./README.zh.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Remote-access plugin for DeepSeek Harness (DSH). Built on top of [dsh-bridge](https://github.com/wenbin-wb/dsh-bridge), it adds a **public direct-connect gateway** so phones and other out-of-network devices can open and operate the Harness running on your computer — no tunnel required.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
LAN access, Cloudflare tunnels, custom tunnels, and the IM bots all keep working exactly as before. The plugin is fully inert until you enable the features you want.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Public direct-connect gateway.** The computer listens on `0.0.0.0:<port>` with its own HTTPS self-signed certificate and a forced login gate, so outside devices connect straight to your machine. The link is terminated at the gateway and proxied to the DSH loopback, so plugin pages and RPC channels work unchanged.
|
|
12
|
+
- **LAN access.** Scan a QR code from the remote-access panel on the same Wi-Fi and you are in.
|
|
13
|
+
- **Public tunnels.** Cloudflare (temporary or fixed hostname) or a self-built tunnel, selectable per need alongside the direct gateway.
|
|
14
|
+
- **Remote workspace.** Browse the host's directory tree and pick workspace conversations from the phone.
|
|
15
|
+
- **Security.** Password gate + QR-based password-free token + admin unlock/lock for sensitive config + rate limiting against brute force. Client-claimed `isLocalhost` is never trusted.
|
|
16
|
+
- **IM bots.** WeChat / QQ / Feishu / Telegram bots connect through their own gateway links — no public IP needed. Per-platform guides live in [docs/](./docs).
|
|
17
|
+
- **Mobile-friendly web.** The remote web UI is deeply adapted for phone screens: drawer sidebar (fully hidden when closed, removing keyboard/screen-reader focus traps), top-bar mode and conversation-management controls that wrap instead of overlapping, git branch chips anchored to the viewport edge instead of being clipped, composer width aligned with the conversation column and stuck to the bottom, ~44px touch targets on the main controls via pseudo-element hit areas, and removal of full-screen overlays and decorative gradient strips that covered the input box.
|
|
18
|
+
- **All configuration in the UI.** Every feature above is configured from DSH Web's remote-access panel; nothing is edited by hand.
|
|
19
|
+
|
|
20
|
+
## Requirements
|
|
21
|
+
|
|
22
|
+
- Node `^22.19.0 || >=24.0.0`.
|
|
23
|
+
- DSH with a web profile (built and tested against `0.1.5-rc.2`; adapted for the 0.1.5 RPC/webServer entry points).
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
# Preferred: install straight from GitHub (no npm involved)
|
|
29
|
+
dsh plugin --profile web add github:lament-z/dsh-bridge-gateway
|
|
30
|
+
|
|
31
|
+
# Alternative: from npm
|
|
10
32
|
dsh plugin --profile web add dsh-bridge-gateway
|
|
33
|
+
|
|
34
|
+
# From a local clone / working copy
|
|
35
|
+
dsh plugin --profile web add link:<this directory>
|
|
11
36
|
```
|
|
12
37
|
|
|
13
|
-
|
|
38
|
+
Upgrade to the newest build: `dsh plugin --profile web add github:lament-z/dsh-bridge-gateway` again (or append `@latest` for the npm source). Then restart `dsh web`.
|
|
39
|
+
|
|
40
|
+
Nothing changes on install: the gateway is off by default and the original LAN/tunnel/IM behavior is untouched.
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
### Public direct-connect gateway (core feature)
|
|
45
|
+
|
|
46
|
+
No tunnel needed — the computer exposes a port itself and outside devices connect directly.
|
|
47
|
+
|
|
48
|
+
1. Install, then open DSH Web -> Settings -> **Public Access** tab.
|
|
49
|
+
2. In the **Direct Gateway** card, set the port (default `7443`) and click save.
|
|
50
|
+
3. Click **Enable Direct Gateway**.
|
|
51
|
+
4. Map that port to this machine on your router / cloud server, then open `https://<public-IP-or-domain>:<port>` from outside.
|
|
52
|
+
|
|
53
|
+
First visit shows a certificate warning because the HTTPS certificate is self-signed — choose "always allow" to continue. External visitors must pass the login gate configured under **Security**; the gate policy is independent of your LAN settings.
|
|
54
|
+
|
|
55
|
+
### LAN access
|
|
14
56
|
|
|
15
|
-
|
|
57
|
+
Open the remote-access panel in DSH Web and scan the QR code with the phone on the same Wi-Fi.
|
|
16
58
|
|
|
17
|
-
|
|
59
|
+
### Public tunnel
|
|
18
60
|
|
|
19
|
-
|
|
61
|
+
In the same panel choose Cloudflare (temporary or fixed hostname) or a self-built tunnel. See [docs/custom-tunnel.md](./docs/custom-tunnel.md) for the custom-tunnel protocol.
|
|
20
62
|
|
|
21
|
-
|
|
22
|
-
- **强制登录门禁**:外部访问必须输入你在「安全认证」里设置的密码,与局域网策略相互独立。
|
|
23
|
-
- **全界面配置**:端口、随 DSH 自动启动等,都在「公网访问」设置页里配置。
|
|
63
|
+
### Security configuration
|
|
24
64
|
|
|
25
|
-
|
|
65
|
+
Settings -> Security: enable protection, set the password, manage the password-free token, and unlock/lock the admin surface. Unauthorized visitors are rejected before any page content is served.
|
|
26
66
|
|
|
27
|
-
|
|
28
|
-
2. 在「直连网关」卡片设置端口(默认 `7443`),点「保存端口」。
|
|
29
|
-
3. 点击「开启直连网关」。
|
|
30
|
-
4. 在路由器/云服务器把该端口映射到本机,即可通过 `https://<公网IP或域名>:端口` 访问。
|
|
67
|
+
### IM bots
|
|
31
68
|
|
|
32
|
-
|
|
69
|
+
WeChat / QQ / Feishu / Telegram guides: [docs/wechat-usage.md](./docs/wechat-usage.md), [docs/qq-usage.md](./docs/qq-usage.md), [docs/feishu-usage.md](./docs/feishu-usage.md), [docs/telegram-usage.md](./docs/telegram-usage.md).
|
|
33
70
|
|
|
34
|
-
##
|
|
71
|
+
## Security notes
|
|
35
72
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- **安全认证**:密码 + 扫码免密 Token + 管理后台防篡改 + 防暴力破解。
|
|
40
|
-
- **IM 机器人**:微信 / QQ / 飞书 / Telegram 扫码直连,无需公网。
|
|
73
|
+
- The direct gateway always enforces `public_only`-style gating: external visitors authenticate through the same AuthManager as LAN access, and loopback-only resources stay loopback-only.
|
|
74
|
+
- RPC channels are registered through the host web server and pass request-rejection authentication, so forged or unauthenticated channel calls are dropped at the entry.
|
|
75
|
+
- The self-signed certificate encrypts transport; it does not add identity. Anyone with the password can log in — keep the password strong and enable admin lock.
|
|
41
76
|
|
|
42
|
-
##
|
|
77
|
+
## Development
|
|
43
78
|
|
|
44
|
-
```
|
|
79
|
+
```sh
|
|
45
80
|
git clone https://github.com/lament-z/dsh-bridge-gateway
|
|
46
81
|
cd dsh-bridge-gateway
|
|
47
82
|
npm install
|
|
@@ -50,10 +85,10 @@ npm test
|
|
|
50
85
|
dsh plugin --profile web add .
|
|
51
86
|
```
|
|
52
87
|
|
|
53
|
-
##
|
|
88
|
+
## Release notes
|
|
54
89
|
|
|
55
|
-
|
|
90
|
+
Pushing a `v*` tag to GitHub triggers automatic `npm publish` (GitHub Actions; the repository needs an `NPM_TOKEN` secret).
|
|
56
91
|
|
|
57
|
-
##
|
|
92
|
+
## License
|
|
58
93
|
|
|
59
|
-
[MIT](./LICENSE)
|
|
94
|
+
[MIT](./LICENSE)
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# dsh-bridge-gateway
|
|
2
|
+
|
|
3
|
+
[English](./README.md) | 简体中文
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness(DSH)远程访问插件。以 [dsh-bridge](https://github.com/wenbin-wb/dsh-bridge)
|
|
6
|
+
为根基,额外加入**「公网直连网关」**,让手机等外网设备不借助隧道就能直接访问、操作电脑上的
|
|
7
|
+
Harness。
|
|
8
|
+
|
|
9
|
+
局域网访问、Cloudflare 隧道、自建隧道、IM 机器人等原有能力保持不变;插件默认完全不启用,
|
|
10
|
+
装上后原有行为零改动,需要什么再开什么。
|
|
11
|
+
|
|
12
|
+
## 功能
|
|
13
|
+
|
|
14
|
+
- **公网直连网关。** 电脑直接监听 `0.0.0.0:<端口>`,自带 HTTPS 自签证书与强制登录门禁,
|
|
15
|
+
外网设备直连访问。链路在网关处终结并转发到 DSH loopback,插件页面与 RPC 通道原样可用。
|
|
16
|
+
- **局域网访问。** 同一 Wi-Fi 下用手机扫远程访问面板里的二维码即可进入。
|
|
17
|
+
- **公网隧道。** Cloudflare(临时/固定域名)或自建隧道,与直连网关按需二选一或并存。
|
|
18
|
+
- **远程工作区。** 手机端网页目录树直接浏览并选择工作区对话。
|
|
19
|
+
- **安全认证。** 密码门禁 + 扫码免密 Token + 敏感配置的管理员解锁/锁定 + 防暴力破解限频;
|
|
20
|
+
永不信任客户端自称的 `isLocalhost`。
|
|
21
|
+
- **IM 机器人。** 微信 / QQ / 飞书 / Telegram 机器人走各自网关链路,无需公网 IP;
|
|
22
|
+
分平台指南见 [docs/](./docs)。
|
|
23
|
+
- **移动端适配。** 远程网页 UI 针对手机屏幕深度适配:抽屉化侧边栏(隐藏后消除键盘/读屏
|
|
24
|
+
焦点陷阱)、顶栏「标准模式/对话管理」换行不再重叠、git 分支 chip 按视口右边界锚定不再
|
|
25
|
+
被裁切、输入框宽度与对话列对齐且 sticky 固定于底部、主要控件以伪元素把点击热区扩到
|
|
26
|
+
约 44px、隐藏会遮挡输入框的全屏遮罩与装饰性渐变条。
|
|
27
|
+
- **全界面配置。** 以上全部功能都在 DSH Web 远程访问面板里配置,无需手改任何文件。
|
|
28
|
+
|
|
29
|
+
## 要求
|
|
30
|
+
|
|
31
|
+
- Node `^22.19.0 || >=24.0.0`。
|
|
32
|
+
- DSH web profile(构建与测试基于 `0.1.5-rc.2`,已适配 0.1.5 的 RPC/webServer 入口)。
|
|
33
|
+
|
|
34
|
+
## 安装
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
# 推荐:直接从 GitHub 安装(不经 npm)
|
|
38
|
+
dsh plugin --profile web add github:lament-z/dsh-bridge-gateway
|
|
39
|
+
|
|
40
|
+
# 备选:从 npm 安装
|
|
41
|
+
dsh plugin --profile web add dsh-bridge-gateway
|
|
42
|
+
|
|
43
|
+
# 从本地 clone / 工作副本安装
|
|
44
|
+
dsh plugin --profile web add link:<本目录>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
升级到最新版:再次执行上面的 GitHub 安装命令(npm 来源可加 `@latest`)。然后重启 `dsh web`。
|
|
48
|
+
|
|
49
|
+
安装后默认不启用:直连网关关闭,原有局域网/隧道/IM 行为完全不变。
|
|
50
|
+
|
|
51
|
+
## 使用方法
|
|
52
|
+
|
|
53
|
+
### 公网直连网关(核心功能)
|
|
54
|
+
|
|
55
|
+
不需要隧道,让电脑直接监听公网端口,外网直连访问。
|
|
56
|
+
|
|
57
|
+
1. 安装后进入 DSH Web 设置 -> **公网访问** Tab。
|
|
58
|
+
2. 在**直连网关**卡片设置端口(默认 `7443`),点「保存端口」。
|
|
59
|
+
3. 点击「开启直连网关」。
|
|
60
|
+
4. 在路由器/云服务器把该端口映射到本机,即可通过 `https://<公网IP或域名>:端口` 访问。
|
|
61
|
+
|
|
62
|
+
HTTPS 证书为自签,浏览器首次访问会提示不安全,勾选「始终允许」即可继续。外部访客必须通过
|
|
63
|
+
**安全认证**里配置的登录门禁;门禁策略与局域网设置相互独立。
|
|
64
|
+
|
|
65
|
+
### 局域网访问
|
|
66
|
+
|
|
67
|
+
在 DSH Web 打开远程访问面板,用同一 Wi-Fi 下的手机扫二维码。
|
|
68
|
+
|
|
69
|
+
### 公网隧道
|
|
70
|
+
|
|
71
|
+
同一面板里选择 Cloudflare(临时/固定域名)或自建隧道。自建隧道协议见
|
|
72
|
+
[docs/custom-tunnel.md](./docs/custom-tunnel.md)。
|
|
73
|
+
|
|
74
|
+
### 安全配置
|
|
75
|
+
|
|
76
|
+
设置 -> 安全认证:开启防护、设置密码、管理免密 Token、解锁/锁定管理面。未认证访客在
|
|
77
|
+
任何页面内容返回之前就会被拒绝。
|
|
78
|
+
|
|
79
|
+
### IM 机器人
|
|
80
|
+
|
|
81
|
+
微信 / QQ / 飞书 / Telegram 使用指南:
|
|
82
|
+
[docs/wechat-usage.md](./docs/wechat-usage.md)、[docs/qq-usage.md](./docs/qq-usage.md)、
|
|
83
|
+
[docs/feishu-usage.md](./docs/feishu-usage.md)、[docs/telegram-usage.md](./docs/telegram-usage.md)。
|
|
84
|
+
|
|
85
|
+
## 安全说明
|
|
86
|
+
|
|
87
|
+
- 直连网关始终强制 `public_only` 式门禁:外部访客与局域网访问共用同一 AuthManager 认证,
|
|
88
|
+
仅限 loopback 的资源绝不经网关暴露。
|
|
89
|
+
- RPC 通道经由宿主 web server 注册并通过请求拒绝(requestRejection)鉴权,
|
|
90
|
+
伪造或未认证的通道调用在入口即被丢弃。
|
|
91
|
+
- 自签证书只加密传输、不提供身份:拿到密码的人就能登录——请设置强密码并开启管理员锁定。
|
|
92
|
+
|
|
93
|
+
## 开发
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
git clone https://github.com/lament-z/dsh-bridge-gateway
|
|
97
|
+
cd dsh-bridge-gateway
|
|
98
|
+
npm install
|
|
99
|
+
npm run build:client
|
|
100
|
+
npm test
|
|
101
|
+
dsh plugin --profile web add .
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## 发布说明
|
|
105
|
+
|
|
106
|
+
打 `v*` 标签推送到 GitHub 即自动 `npm publish`(GitHub Actions,需仓库配置 `NPM_TOKEN` secret)。
|
|
107
|
+
|
|
108
|
+
## 开源协议
|
|
109
|
+
|
|
110
|
+
[MIT](./LICENSE)
|
package/client/client.js
CHANGED
|
@@ -3829,6 +3829,92 @@ function injectMobileStyles() {
|
|
|
3829
3829
|
display: none !important;
|
|
3830
3830
|
}
|
|
3831
3831
|
|
|
3832
|
+
/* ---- \u5BF9\u8BDD/\u8F68\u8FF9/\u4E0A\u4E0B\u6587 \u6807\u7B7E\u884C\u6298\u53E0\u8FDB\u6807\u9898\u884C ----
|
|
3833
|
+
\u539F\u672C tabs \u72EC\u5360\u4E00\u884C\uFF0825px + \u95F4\u8DDD\uFF09\uFF0C\u79FB\u52A8\u7AEF\u4E2D\u95F4\u7A7A\u95F4\u592A\u5C0F\u3002
|
|
3834
|
+
\u6539\u4E3A\u7EDD\u5BF9\u5B9A\u4F4D\u7684\u60AC\u6D6E\u80F6\u56CA\uFF1A\u9489\u5728\u6807\u9898\u884C\u4E0B\u7F18\u53F3\u4FA7\uFF0C\u4E0D\u518D\u5360\u636E\u5E03\u5C40\u9AD8\u5EA6\uFF0C
|
|
3835
|
+
\u4E2D\u95F4\u5185\u5BB9\u533A\u51C0\u589E\u7EA6 33px\uFF1B\u80CC\u666F\u7528\u539F\u751F tooltip \u7070\u4E0E\u5185\u5BB9\u5206\u5C42\u3002 */
|
|
3836
|
+
header[class*="wSkVaW_header"] {
|
|
3837
|
+
position: relative !important;
|
|
3838
|
+
}
|
|
3839
|
+
div[class*="wSkVaW_tabs"] {
|
|
3840
|
+
position: absolute !important;
|
|
3841
|
+
top: 38px !important;
|
|
3842
|
+
right: 6px !important;
|
|
3843
|
+
left: auto !important;
|
|
3844
|
+
width: auto !important;
|
|
3845
|
+
max-width: 62vw !important;
|
|
3846
|
+
height: 30px !important;
|
|
3847
|
+
display: inline-flex !important;
|
|
3848
|
+
align-items: center !important;
|
|
3849
|
+
gap: 2px !important;
|
|
3850
|
+
padding: 2px !important;
|
|
3851
|
+
border-radius: 999px !important;
|
|
3852
|
+
background: var(--dsw-alias-tooltip-bg, #43454a) !important;
|
|
3853
|
+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
|
|
3854
|
+
overflow-x: auto !important;
|
|
3855
|
+
scrollbar-width: none !important;
|
|
3856
|
+
z-index: 30 !important;
|
|
3857
|
+
}
|
|
3858
|
+
div[class*="wSkVaW_tabs"]::-webkit-scrollbar {
|
|
3859
|
+
display: none !important;
|
|
3860
|
+
}
|
|
3861
|
+
div[class*="wSkVaW_tabs"] [role="tab"] {
|
|
3862
|
+
height: 24px !important;
|
|
3863
|
+
padding: 0 10px !important;
|
|
3864
|
+
border-radius: 999px !important;
|
|
3865
|
+
font-size: 12px !important;
|
|
3866
|
+
white-space: nowrap !important;
|
|
3867
|
+
flex: 0 0 auto !important;
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
/* ---- \u9876\u680F\u300C\u6807\u51C6\u6A21\u5F0F\u300D\u4E0E\u300C\u5BF9\u8BDD\u7BA1\u7406\u300D\u91CD\u53E0\u4FEE\u590D ----
|
|
3871
|
+
\u5B9E\u6D4B\uFF08390px\uFF09\uFF1A\u6807\u51C6\u6A21\u5F0F(\u5728 titleCluster \u5185) \u53F3\u8FB9\u754C 102\uFF0C
|
|
3872
|
+
\u5BF9\u8BDD\u7BA1\u7406(\u5728 headerUtilities \u5185) \u5DE6\u8FB9\u754C 91 \u2192 \u6C34\u5E73\u91CD\u53E0 11px\u3002
|
|
3873
|
+
\u6839\u56E0\uFF1AtitleCluster \u53EA\u6709 46px \u5BBD\uFF08[33,79]\uFF09\uFF0C\u4F46\u5185\u90E8\u7684\u300C\u6807\u51C6\u6A21\u5F0F\u300D\u80F6\u56CA\u56FA\u5B9A 69px\uFF0C
|
|
3874
|
+
\u6491\u7834\u7236\u5BB9\u5668\u540E\u4E0E\u53F3\u4FA7 headerUtilities \u76F8\u649E\u3002
|
|
3875
|
+
\u4FEE\u590D\uFF1A\u5141\u8BB8 titleRow \u6362\u884C + \u8BA9\u4E24\u4FA7\u5404\u81EA\u53EF\u6536\u7F29\u5E76\u9650\u5BBD\u3002 */
|
|
3876
|
+
div[class*="wSkVaW_titleRow"],
|
|
3877
|
+
div[class*="_titleRow"] {
|
|
3878
|
+
flex-wrap: wrap !important;
|
|
3879
|
+
row-gap: 6px !important;
|
|
3880
|
+
column-gap: 8px !important;
|
|
3881
|
+
overflow: visible !important;
|
|
3882
|
+
}
|
|
3883
|
+
div[class*="wSkVaW_titleCluster"],
|
|
3884
|
+
div[class*="_titleCluster"] {
|
|
3885
|
+
flex: 1 1 auto !important;
|
|
3886
|
+
min-width: 0 !important;
|
|
3887
|
+
max-width: 100% !important;
|
|
3888
|
+
}
|
|
3889
|
+
div[class*="wSkVaW_headerActions"],
|
|
3890
|
+
div[class*="_headerActions"] {
|
|
3891
|
+
flex: 0 0 auto !important;
|
|
3892
|
+
min-width: 0 !important;
|
|
3893
|
+
max-width: 45vw !important;
|
|
3894
|
+
overflow: hidden !important;
|
|
3895
|
+
}
|
|
3896
|
+
div[class*="wSkVaW_headerUtilities"],
|
|
3897
|
+
div[class*="_headerUtilities"] {
|
|
3898
|
+
flex: 0 0 auto !important;
|
|
3899
|
+
min-width: 0 !important;
|
|
3900
|
+
max-width: 50vw !important;
|
|
3901
|
+
margin-left: auto !important;
|
|
3902
|
+
overflow: hidden !important;
|
|
3903
|
+
}
|
|
3904
|
+
/* \u4E24\u8005\u5185\u90E8\u7684\u65E0 class \u6309\u94AE\uFF08\u6A21\u5F0F\u80F6\u56CA / \u5BF9\u8BDD\u7BA1\u7406 / \u5220\u9664\u672C\u5BF9\u8BDD\uFF09\u7EDF\u4E00\u9650\u5BBD\u5E76\u5141\u8BB8\u6536\u7F29 */
|
|
3905
|
+
div[class*="wSkVaW_headerActions"] > *,
|
|
3906
|
+
div[class*="wSkVaW_headerActions"] button,
|
|
3907
|
+
div[class*="wSkVaW_headerActions"] span,
|
|
3908
|
+
div[class*="wSkVaW_headerUtilities"] > *,
|
|
3909
|
+
div[class*="wSkVaW_headerUtilities"] button,
|
|
3910
|
+
div[class*="wSkVaW_headerUtilities"] span {
|
|
3911
|
+
max-width: 100% !important;
|
|
3912
|
+
min-width: 0 !important;
|
|
3913
|
+
overflow: hidden !important;
|
|
3914
|
+
text-overflow: ellipsis !important;
|
|
3915
|
+
white-space: nowrap !important;
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3832
3918
|
/* \u5B50\u4EE3\u7406/\u667A\u80FD\u4F53\u6A21\u5F0F\u80F6\u56CA (Actions)\uFF1A\u7D27\u51D1\u5706\u89D2\u80F6\u56CA */
|
|
3833
3919
|
div[class*="wSkVaW_headerActions"],
|
|
3834
3920
|
div[class*="headerActions"] {
|
|
@@ -3939,17 +4025,197 @@ function injectMobileStyles() {
|
|
|
3939
4025
|
box-sizing: border-box !important;
|
|
3940
4026
|
}
|
|
3941
4027
|
|
|
4028
|
+
/* ---- \u8F93\u5165\u6846\u5BBD\u5EA6\u4E0E\u5BF9\u8BDD\u5217\u5BF9\u9F50\u4FEE\u590D ----
|
|
4029
|
+
\u95EE\u9898\uFF1A\u8FDB\u5165\u771F\u5B9E\u5BF9\u8BDD\u540E\u8F93\u5165\u6846\u88AB\u6491\u5230 780px\uFF08= 748px \u5185\u5BB9\u5BBD + 32px\uFF09\uFF0C
|
|
4030
|
+
\u800C\u6D88\u606F\u5217\u4EC5 318px\uFF0C\u8F93\u5165\u6846\u6BD4\u5BF9\u8BDD\u5185\u5BB9\u5BBD\u7EA6 2.45 \u500D\u3002
|
|
4031
|
+
\u6839\u56E0\uFF1A\u5361\u7247\u7684\u7236\u7EA7 uV2eYG_root \u81EA\u5E26 max-width: var(--dsh-composer-card-max-width)\uFF0C
|
|
4032
|
+
\u5361\u7247\u81EA\u8EAB\u7684 max-width:100% \u662F\u76F8\u5BF9\u7236\u7EA7 780px \u8BA1\u7B97\u7684\uFF0C\u56E0\u6B64\u4ECD\u662F 780px\u3002
|
|
4033
|
+
\u4FEE\u590D\uFF1A\u4ECE\u6839\u53D8\u91CF\u6536\u7A84 + \u8865\u4E0A uV2eYG_root \u8FD9\u4E00\u5C42\u7EA6\u675F\u3002 */
|
|
4034
|
+
|
|
4035
|
+
/* 1. \u4ECE\u4F1A\u8BDD\u6839\u8282\u70B9\u6536\u7A84\u5185\u5BB9\u5BBD\u5EA6\u53D8\u91CF\uFF08\u540C\u65F6\u7EA6\u675F\u6D88\u606F\u5217\u4E0E\u8F93\u5165\u6846\uFF09 */
|
|
4036
|
+
div[class*="wSkVaW_root"] {
|
|
4037
|
+
--dsh-chat-content-width: min(748px, 100vw - 32px) !important;
|
|
4038
|
+
--dsh-composer-card-max-width: min(780px, 100vw - 24px) !important;
|
|
4039
|
+
}
|
|
4040
|
+
|
|
4041
|
+
/* 2. \u8865\u4E0A\u63D2\u4EF6\u6B64\u524D\u9057\u6F0F\u7684 uV2eYG_root\uFF08\u8F93\u5165\u6846\u7684\u76F4\u63A5\u7F29\u5BB9\u5668\uFF09 */
|
|
4042
|
+
div[class*="uV2eYG_root"] {
|
|
4043
|
+
max-width: 100% !important;
|
|
4044
|
+
min-width: 0 !important;
|
|
4045
|
+
box-sizing: border-box !important;
|
|
4046
|
+
}
|
|
4047
|
+
|
|
4048
|
+
/* 3. \u8F93\u5165\u6846\u7956\u5148\u94FE\u6574\u4F53\u4E0D\u8D85\u51FA\u89C6\u53E3 */
|
|
4049
|
+
div[class*="wSkVaW_composerStack"],
|
|
4050
|
+
div[class*="wSkVaW_composerSeat"],
|
|
4051
|
+
div[class*="uV2eYG_scroll"],
|
|
4052
|
+
div[class*="uV2eYG_grow"] {
|
|
4053
|
+
max-width: 100% !important;
|
|
4054
|
+
min-width: 0 !important;
|
|
4055
|
+
box-sizing: border-box !important;
|
|
4056
|
+
}
|
|
4057
|
+
|
|
4058
|
+
/* ---- \u9876\u90E8\u63A7\u4EF6\u9632\u6EA2\u51FA\u88C1\u5207\uFF08320px \u4E0B main \u5206\u652F chip \u6EA2\u51FA 39px \u88AB\u88C1\uFF09 ---- */
|
|
4059
|
+
div[class*="wSkVaW_titleRow"],
|
|
4060
|
+
div[class*="_titleRow"] {
|
|
4061
|
+
flex-wrap: wrap !important;
|
|
4062
|
+
row-gap: 6px !important;
|
|
4063
|
+
overflow: visible !important;
|
|
4064
|
+
}
|
|
4065
|
+
button[class*="_7rgC5q_chip"],
|
|
4066
|
+
button[class*="cubgiG_seat"],
|
|
4067
|
+
div[class*="_7rgC5q_chipWrap"] {
|
|
4068
|
+
max-width: min(120px, 30vw) !important;
|
|
4069
|
+
min-width: 0 !important;
|
|
4070
|
+
overflow: hidden !important;
|
|
4071
|
+
text-overflow: ellipsis !important;
|
|
4072
|
+
}
|
|
4073
|
+
|
|
4074
|
+
/* git-graph \u7684\u5206\u652F chip \u5916\u5C42\u662F position:absolute \u6D6E\u5C42\uFF08_7rgC5q_anchor / _7rgC5q_anchorHero\uFF09\uFF0C
|
|
4075
|
+
\u4E14\u901A\u8FC7\u5185\u8054\u6837\u5F0F\u5199\u6B7B left\uFF08\u5982 left: 271.484px\uFF09\uFF0C\u8131\u79BB flex \u6D41\u4E14\u4E0D\u53D7\u7236\u5BB9\u5668\u9650\u5BBD\u7EA6\u675F\uFF0C
|
|
4076
|
+
\u5728 320px \u4E0B\u6EA2\u51FA\u5C4F\u5E55\u53F3\u4FA7\u88AB\u88C1\u5207\uFF08\u53F3\u8FB9\u754C 351 > \u89C6\u53E3 320\uFF09\u3002
|
|
4077
|
+
\u5185\u8054\u6837\u5F0F\u4F18\u5148\u7EA7\u9AD8\u4E8E\u666E\u901A CSS\uFF0C\u5FC5\u987B\u7528 !important \u8986\u76D6 left\uFF0C\u6539\u4E3A\u6309\u89C6\u53E3\u53F3\u8FB9\u754C\u951A\u5B9A\u3002 */
|
|
4078
|
+
div[class*="_7rgC5q_anchor"] {
|
|
4079
|
+
left: auto !important;
|
|
4080
|
+
right: 8px !important;
|
|
4081
|
+
max-width: calc(100vw - 16px) !important;
|
|
4082
|
+
min-width: 0 !important;
|
|
4083
|
+
overflow: hidden !important;
|
|
4084
|
+
}
|
|
4085
|
+
button[class*="_7rgC5q_chip"],
|
|
4086
|
+
div[class*="_7rgC5q_chipWrap"] {
|
|
4087
|
+
width: auto !important;
|
|
4088
|
+
max-width: 100% !important;
|
|
4089
|
+
}
|
|
4090
|
+
|
|
4091
|
+
/* ---- \u70B9\u51FB\u76EE\u6807\u6269\u5230 44px\uFF08\u4F2A\u5143\u7D20\u6269\u70ED\u533A\uFF0C\u89C6\u89C9\u5C3A\u5BF8\u4E0D\u53D8\uFF09 ---- */
|
|
4092
|
+
button[class*="cubgiG_seat"],
|
|
4093
|
+
button[class*="_7rgC5q_chip"],
|
|
4094
|
+
button[class*="pXSMma_workspace"],
|
|
4095
|
+
button[class*="Sh0Q9G_trigger"],
|
|
4096
|
+
button[class*="_7KE1Ra_trigger"],
|
|
4097
|
+
button[class*="uV2eYG_add"],
|
|
4098
|
+
button[class*="qDHVXG_iconButton"],
|
|
4099
|
+
button[class*="qDHVXG_searchButton"],
|
|
4100
|
+
button[class*="hHd-Xa_iconButton"],
|
|
4101
|
+
button[class*="YDXeBa_iconButton"] {
|
|
4102
|
+
position: relative !important;
|
|
4103
|
+
}
|
|
4104
|
+
button[class*="cubgiG_seat"]::after,
|
|
4105
|
+
button[class*="_7rgC5q_chip"]::after,
|
|
4106
|
+
button[class*="pXSMma_workspace"]::after,
|
|
4107
|
+
button[class*="Sh0Q9G_trigger"]::after,
|
|
4108
|
+
button[class*="_7KE1Ra_trigger"]::after,
|
|
4109
|
+
button[class*="uV2eYG_add"]::after,
|
|
4110
|
+
button[class*="qDHVXG_iconButton"]::after,
|
|
4111
|
+
button[class*="qDHVXG_searchButton"]::after,
|
|
4112
|
+
button[class*="hHd-Xa_iconButton"]::after,
|
|
4113
|
+
button[class*="YDXeBa_iconButton"]::after {
|
|
4114
|
+
content: "" !important;
|
|
4115
|
+
position: absolute !important;
|
|
4116
|
+
inset: -8px !important;
|
|
4117
|
+
z-index: 1 !important;
|
|
4118
|
+
}
|
|
4119
|
+
|
|
4120
|
+
/* ---- \u4FA7\u8FB9\u680F\u771F\u6B63\u9690\u85CF\uFF0C\u6D88\u9664\u952E\u76D8/\u8BFB\u5C4F\u7126\u70B9\u9677\u9631 ----
|
|
4121
|
+
\u6B64\u524D\u4FA7\u8FB9\u680F\u4EC5\u88AB transform \u79FB\u5230\u5C4F\u5E55\u5916\uFF08visibility \u4ECD\u4E3A visible\uFF09\uFF0C
|
|
4122
|
+
\u5185\u90E8 7 \u4E2A\u6309\u94AE\u4ECD\u53EF\u88AB Tab \u805A\u7126\u3002 */
|
|
4123
|
+
div[class*="_sidebarCol"] {
|
|
4124
|
+
visibility: hidden !important;
|
|
4125
|
+
pointer-events: none !important;
|
|
4126
|
+
}
|
|
4127
|
+
body.dsh-drawer-open div[class*="_sidebarCol"] {
|
|
4128
|
+
visibility: visible !important;
|
|
4129
|
+
pointer-events: auto !important;
|
|
4130
|
+
}
|
|
4131
|
+
|
|
4132
|
+
/* ---- \u8F93\u5165\u6846 sticky \u5B9A\u4F4D\u4E0E\u906E\u6321\u4FEE\u590D ----
|
|
4133
|
+
\u73B0\u8C61\uFF1A\u53D1\u9001\u540E\u8F93\u5165\u6846\u8DF3\u5230 tabs(\u5BF9\u8BDD/\u8F68\u8FF9/\u4E0A\u4E0B\u6587/\u8BB0\u5FC6) \u4E0B\u65B9\uFF0C\u4E0B\u65B9\u7559\u51FA\u5927\u7247\u7A7A\u767D\uFF1B
|
|
4134
|
+
\u6EDA\u52A8\u65F6\u53F3\u4E0B\u89D2\u51FA\u73B0\u4E00\u4E2A\u5C0F\u65B9\u5757\u3002
|
|
4135
|
+
\u6839\u56E0\uFF1A
|
|
4136
|
+
1) dsh-better-sidebar \u63D2\u4EF6\u6CE8\u5165\u7684 div[data-dsh-panel-host] \u662F\u5168\u5C4F fixed \u906E\u7F69
|
|
4137
|
+
\uFF08390x844\uFF0Cz-index 25\uFF09\uFF0C\u5728\u79FB\u52A8\u7AEF\u672A\u88AB\u9690\u85CF\uFF0C\u538B\u5728 composerSeat(z-index 7) \u4E4B\u4E0A\uFF1B
|
|
4138
|
+
2) \u4E3B\u9898\u88C5\u9970\u5C42 span[data-dsh-glass-fade="bottom"] \u662F\u5168\u5BBD fixed \u6761\uFF08390x13\uFF0Cz-index 7\uFF09\uFF0C
|
|
4139
|
+
\u5E38\u9A7B\u5C4F\u5E55\u53F3\u4E0B\u89D2\uFF0C\u89C6\u89C9\u4E0A\u5C31\u662F\u90A3\u4E2A"\u5C0F\u65B9\u5757"\u3002
|
|
4140
|
+
\u4FEE\u590D\uFF1A\u79FB\u52A8\u7AEF\u9690\u85CF panel-host \u906E\u7F69\u4E0E glass \u6E10\u53D8\u88C5\u9970\u6761\uFF0C\u5E76\u9501\u5B9A\u8F93\u5165\u6846 sticky \u4E8E\u5E95\u90E8\u3002 */
|
|
4141
|
+
|
|
4142
|
+
/* better-sidebar \u9762\u677F\u5BBF\u4E3B\uFF1A\u9ED8\u8BA4\u9690\u85CF\uFF08\u65E7\u7684\u5168\u5C4F fixed \u906E\u7F69\u4F1A\u76D6\u4F4F\u8F93\u5165\u6846\u5E76\u62E6\u622A\u70B9\u51FB\uFF09\uFF1B
|
|
4143
|
+
\u5E95\u90E8\u9762\u677F\u5C55\u5F00\u65F6\uFF08\u5F00\u5173 aria-pressed=true / body.dsh-workbench-open\uFF09\u6539\u4E3A
|
|
4144
|
+
\u5E95\u90E8\u9762\u677F\u5F62\u6001\u663E\u793A\u2014\u2014\u4E0D\u906E\u8F93\u5165\u6846\u3001\u4E0D\u9876\u72B6\u6001\u680F\uFF0C\u5185\u5BB9\uFF08zsh \u4F1A\u8BDD\u7B49\uFF09\u53EF\u89C1\u3002
|
|
4145
|
+
aria-pressed \u4E0E data-active \u90FD\u662F\u8BED\u8A00\u65E0\u5173\u951A\u70B9\uFF0C\u4E2D\u82F1\u6587\u73AF\u5883\u901A\u7528\u3002 */
|
|
4146
|
+
div[data-dsh-panel-host],
|
|
4147
|
+
div[data-dsh-better-sidebar] {
|
|
4148
|
+
display: none !important;
|
|
4149
|
+
}
|
|
4150
|
+
body:has(button[data-dsh-bottom-toggle][aria-pressed='true']) div[data-dsh-panel-host],
|
|
4151
|
+
body:has(button[data-dsh-bottom-toggle][aria-pressed='true']) div[data-dsh-better-sidebar] {
|
|
4152
|
+
display: block !important;
|
|
4153
|
+
top: 42px !important;
|
|
4154
|
+
bottom: calc(var(--dsh-composer-height, 171px) + 34px) !important;
|
|
4155
|
+
left: 8px !important;
|
|
4156
|
+
right: 8px !important;
|
|
4157
|
+
width: auto !important;
|
|
4158
|
+
height: auto !important;
|
|
4159
|
+
z-index: 20 !important;
|
|
4160
|
+
border-radius: 12px !important;
|
|
4161
|
+
overflow: auto !important;
|
|
4162
|
+
background: var(--dsw-alias-bg-layer-2, #2c2c2e) !important;
|
|
4163
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
|
|
4164
|
+
}
|
|
4165
|
+
/* \u5E95\u90E8\u9762\u677F\u5C55\u5F00\u65F6\u539F\u751F\u7ED9\u4E2D\u680F\u9884\u7559\u7684 220px \u5E95\u90E8\u7A7A\u767D\u6536\u6389\uFF0C\u8F93\u5165\u6846\u56DE\u5230\u5C4F\u5E55\u5E95\u3002
|
|
4166
|
+
\u6CE8\u610F body.dsh-workbench-open \u5728\u6536\u8D77\u540E\u4ECD\u6B8B\u7559\uFF0C\u4E0D\u80FD\u5F53\u5C55\u5F00\u4FE1\u53F7\u3002 */
|
|
4167
|
+
body:has(button[data-dsh-bottom-toggle][aria-pressed='true']) div[class*="pI_x6G_centerCol"] {
|
|
4168
|
+
margin-bottom: 0 !important;
|
|
4169
|
+
}
|
|
4170
|
+
/* \u9690\u85CF\u4E3B\u9898\u88C5\u9970\u6027\u6E10\u53D8\u6761\uFF08\u53F3\u4E0B\u89D2\u5C0F\u65B9\u5757\uFF09 */
|
|
4171
|
+
span[data-dsh-glass-fade] {
|
|
4172
|
+
display: none !important;
|
|
4173
|
+
}
|
|
4174
|
+
/* \u6CE8\u610F\uFF1A\u4EE5\u4E0B\u4E24\u5904\u6539\u52A8\u5747\u5DF2\u5B9E\u6D4B\u5931\u8D25\u5E76\u64A4\u56DE\uFF0C\u5207\u52FF\u91CD\u8BD5\u2014\u2014
|
|
4175
|
+
(1) \u628A viewArea \u6539\u4E3A\u53EF\u6536\u7F29\uFF08flex:1 1 auto / min-height:0\uFF09\uFF1A
|
|
4176
|
+
sticky \u5931\u53BB\u6B63\u786E\u6EDA\u52A8\u4E0A\u4E0B\u6587\uFF0C\u8F93\u5165\u6846\u88AB\u9876\u5230\u6574\u4E2A\u5BF9\u8BDD\u5386\u53F2\u6700\u4E0A\u65B9\u3002
|
|
4177
|
+
(2) \u628A composerSeat \u6539\u4E3A absolute\uFF08\u4EFF\u6E90\u7801 composer-overlay \u5206\u652F\uFF09\uFF1A
|
|
4178
|
+
absolute \u8131\u79BB\u6587\u6863\u6D41\u540E\u968F\u6EDA\u52A8\u5185\u5BB9\u79FB\u52A8\uFF0C\u5B9E\u6D4B\u8F93\u5165\u6846\u8DD1\u5230 y=-8972\u3002
|
|
4179
|
+
\u7ED3\u8BBA\uFF1A\u4FDD\u7559\u6E90\u7801\u7684 sticky \u673A\u5236\uFF0C\u4E0D\u505A\u7ED3\u6784\u6027\u6539\u52A8\u3002 */
|
|
4180
|
+
|
|
3942
4181
|
/* \u8F93\u5165\u6846\u5E95\u90E8\u5DE5\u5177\u680F\uFF1A\u5F39\u6027\u81EA\u9002\u5E94\uFF0C\u5F7B\u5E95\u675C\u7EDD\u6743\u9650\u9009\u62E9\u5668(Full access)\u4E0E\u6A21\u578B\u9009\u62E9\u5668\u91CD\u53E0\u78B0\u649E */
|
|
3943
4182
|
div[class*="uV2eYG_row"] {
|
|
3944
4183
|
display: flex !important;
|
|
3945
4184
|
align-items: center !important;
|
|
3946
4185
|
justify-content: space-between !important;
|
|
4186
|
+
flex-wrap: nowrap !important;
|
|
3947
4187
|
gap: 6px !important;
|
|
3948
4188
|
width: 100% !important;
|
|
3949
4189
|
padding: 2px 2px 4px !important;
|
|
3950
4190
|
box-sizing: border-box !important;
|
|
3951
4191
|
}
|
|
3952
4192
|
|
|
4193
|
+
/* \u8F93\u5165\u6846\u8D34\u5E95\uFF1AscrollBody \u7684 16px \u5E95\u90E8\u886C\u8DDD\u662F\u7A7A\u9699\u6765\u6E90\uFF0C\u6536\u6389\u53EA\u7559\u5B89\u5168\u533A\uFF1B
|
|
4194
|
+
\u518D\u57AB 6px \u8BA9\u7EDF\u8BA1\u836F\u4E38\u5B8C\u6574\u53EF\u89C1 */
|
|
4195
|
+
div[class*="wSkVaW_scrollBody"] {
|
|
4196
|
+
padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
|
|
4197
|
+
}
|
|
4198
|
+
div[class*="wSkVaW_composerStack"] {
|
|
4199
|
+
padding-bottom: env(safe-area-inset-bottom, 0px) !important;
|
|
4200
|
+
}
|
|
4201
|
+
|
|
4202
|
+
/* workbuddy-connect \u7684 Reasoning levels \u6309\u94AE\uFF08uV2eYG_trailing \u91CC\u552F\u4E00\u7684\u65E0 class
|
|
4203
|
+
\u6309\u94AE\uFF0C\u7ED3\u6784\u951A\u70B9 span>button\uFF09\uFF1A\u79FB\u52A8\u7AEF\u6536\u6210\u7EAF\u56FE\u6807\uFF0C\u6587\u5B57\u88AB\u88C1\u6389\uFF0C
|
|
4204
|
+
\u4E0D\u518D\u628A\u5DE6\u4FA7\u6309\u94AE\u6324\u5230\u4E0A\u4E00\u884C */
|
|
4205
|
+
div[class*="uV2eYG_trailing"] span > button:not([class]) {
|
|
4206
|
+
flex: 0 0 26px !important;
|
|
4207
|
+
width: 26px !important;
|
|
4208
|
+
min-width: 26px !important;
|
|
4209
|
+
padding: 0 2px !important;
|
|
4210
|
+
overflow: hidden !important;
|
|
4211
|
+
justify-content: center !important;
|
|
4212
|
+
gap: 0 !important;
|
|
4213
|
+
font-size: 0 !important;
|
|
4214
|
+
}
|
|
4215
|
+
div[class*="uV2eYG_trailing"] span > button:not([class]) svg {
|
|
4216
|
+
flex: 0 0 auto !important;
|
|
4217
|
+
}
|
|
4218
|
+
|
|
3953
4219
|
div[class*="uV2eYG_tools"] {
|
|
3954
4220
|
display: flex !important;
|
|
3955
4221
|
align-items: center !important;
|
|
@@ -4032,9 +4298,18 @@ function injectMobileStyles() {
|
|
|
4032
4298
|
div[class*="_sidebarCol"] {
|
|
4033
4299
|
position: fixed !important;
|
|
4034
4300
|
left: 0 !important;
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4301
|
+
/* \u9876\u5230\u9876\u90E8\u6807\u7B7E\u6761(38px)\u4E4B\u4E0B\uFF0C\u4E0D\u518D\u4E0E\u6700\u4E0A\u9762\u7684\u680F\u91CD\u53E0 */
|
|
4302
|
+
top: 38px !important;
|
|
4303
|
+
bottom: auto !important;
|
|
4304
|
+
/* \u4FA7\u8FB9\u680F\u5E95\u90E8\u6EA2\u51FA\u5C4F\u5E55\u4FEE\u590D\uFF1A
|
|
4305
|
+
\u5B9E\u6D4B 390x844 \u4E0B\uFF0C\u4FA7\u8FB9\u680F\u5B9E\u9645\u76D2\u5B50\u4E3A T=12 B=882\uFF08\u9AD8\u5EA6 870 > \u89C6\u53E3 844\uFF09\uFF0C\u5E95\u90E8\u6EA2\u51FA 38px\u3002
|
|
4306
|
+
\u6839\u56E0\u662F\u63D2\u4EF6\u6B64\u524D\u672A\u58F0\u660E box-sizing\uFF0C\u5143\u7D20\u7EE7\u627F\u4E3A content-box\uFF0C
|
|
4307
|
+
\u4E8E\u662F padding(10px+14px) \u4E0E margin(12px) \u88AB\u52A0\u5728 height:100dvh \u4E4B\u5916\u3002
|
|
4308
|
+
\u6539\u4E3A border-box \u5E76\u7528 100dvh \u76F4\u63A5\u7EA6\u675F\u9AD8\u5EA6\uFF0Cpadding \u5373\u88AB\u5305\u542B\u5728\u9AD8\u5EA6\u5185\u3002 */
|
|
4309
|
+
box-sizing: border-box !important;
|
|
4310
|
+
height: calc(100dvh - 38px) !important;
|
|
4311
|
+
max-height: calc(100dvh - 38px) !important;
|
|
4312
|
+
margin: 0 !important;
|
|
4038
4313
|
width: 290px !important;
|
|
4039
4314
|
max-width: 82vw !important;
|
|
4040
4315
|
z-index: 10000 !important;
|
|
@@ -4552,6 +4827,9 @@ function setupMobileExperience(rpcCall, ctx) {
|
|
|
4552
4827
|
}
|
|
4553
4828
|
const sessionRow = e.target.closest('a, div[class*="sessionRow"], div[role="treeitem"]');
|
|
4554
4829
|
if (sessionRow) {
|
|
4830
|
+
if (sessionRow.hasAttribute("aria-expanded")) {
|
|
4831
|
+
return;
|
|
4832
|
+
}
|
|
4555
4833
|
setTimeout(() => {
|
|
4556
4834
|
if (document.body.classList.contains("dsh-drawer-open")) {
|
|
4557
4835
|
document.body.classList.remove("dsh-drawer-open");
|
|
@@ -4562,6 +4840,31 @@ function setupMobileExperience(rpcCall, ctx) {
|
|
|
4562
4840
|
document.body.classList.remove("dsh-drawer-open");
|
|
4563
4841
|
}
|
|
4564
4842
|
}, true);
|
|
4843
|
+
const syncSidebarInert = () => {
|
|
4844
|
+
const sidebar = document.querySelector('div[class*="_sidebarCol"]');
|
|
4845
|
+
if (!sidebar) return;
|
|
4846
|
+
const open = document.body.classList.contains("dsh-drawer-open");
|
|
4847
|
+
const wantInert = window.innerWidth <= 768 && !open;
|
|
4848
|
+
if (wantInert) {
|
|
4849
|
+
if (!sidebar.hasAttribute("inert")) sidebar.setAttribute("inert", "");
|
|
4850
|
+
} else if (sidebar.hasAttribute("inert")) {
|
|
4851
|
+
sidebar.removeAttribute("inert");
|
|
4852
|
+
}
|
|
4853
|
+
};
|
|
4854
|
+
new MutationObserver(syncSidebarInert).observe(document.body, {
|
|
4855
|
+
attributes: true,
|
|
4856
|
+
attributeFilter: ["class"],
|
|
4857
|
+
childList: true,
|
|
4858
|
+
subtree: true
|
|
4859
|
+
});
|
|
4860
|
+
window.addEventListener("resize", syncSidebarInert);
|
|
4861
|
+
let inertRetry = 0;
|
|
4862
|
+
const inertTimer = setInterval(() => {
|
|
4863
|
+
syncSidebarInert();
|
|
4864
|
+
const sb = document.querySelector('div[class*="_sidebarCol"]');
|
|
4865
|
+
if (sb && sb.hasAttribute("inert") || ++inertRetry > 40) clearInterval(inertTimer);
|
|
4866
|
+
}, 250);
|
|
4867
|
+
syncSidebarInert();
|
|
4565
4868
|
let longPressTimer = null;
|
|
4566
4869
|
let touchStartX = 0;
|
|
4567
4870
|
let touchStartY = 0;
|