Skip to main content
6

dsh-drag-settings

645214/dsh-drag-settings

Drag the settings panel by holding its top edge while the rest of the app stays clickable and scrollable.

Install

dsh plugin --profile web add github:645214/dsh-drag-settings

README

dsh-drag-settings

长按设置面板顶部边缘即可拖动它;拖动时主界面保持可点击、可滚动。关掉插件开关即回到 DSH 原生行为。

Long-press the top edge of the DSH settings panel to drag it anywhere inside the window. While it is open the rest of the app stays clickable and scrollable. Turn the plugin off and the settings panel behaves exactly like stock DSH again.

The settings panel dragged to the lower-right corner, with the chat still usable behind it

它做什么 / What it does

  • 拖动:在设置面板顶部 56px 内按住约 100ms(或直接拖动),面板跟随鼠标移动;位置按面板记忆,关掉再打开还在原处。1/2 屏内始终保留可见,不会拖丢。

  • 不接管主界面:面板打开时,插件把模态遮罩中和成透明、不吃事件,并重新打开被宿主关掉的 pointer-events / inert,所以聊天框能点、能滚、能打字,设置窗也不会因为你点了主界面就消失。

  • 可开关:它是标准的 DSH 组合包,在「插件 → 已安装插件」里有一个开关;关闭时会还原所有被改过的行内样式并移除注入的样式表,不需要重启 DSH。

  • Drag: hold for ~100 ms inside the top 56 px of the settings panel, then move the mouse; the panel follows. Its offset is remembered per panel, and at least 140 px always stays inside the window.

  • Non-modal: while the panel is open, the backdrop is made transparent and non-interactive, and pointer-events / inert that the host applied to the app are reopened — so you can still click, scroll and type in the chat, and the panel no longer vanishes when you click outside it.

  • Toggleable: this is a regular DSH bundle. The switch in Plugins → Installed turns it on and off; disabling restores every inline style it touched and removes its stylesheet, no restart needed.

安装 / Install

dsh plugin add 645214/dsh-drag-settings

然后硬刷新页面(Ctrl + Shift + R)。 / Then hard-refresh the page (Ctrl + Shift + R).

手动安装(本地目录): / Manual (local checkout):

dsh plugin add /path/to/dsh-drag-settings

已知边界 / Known limits

  • DSH 桌面端只有一个 BrowserWindow;设置面板是页面内浮层,不是独立窗口,所以它能被移到窗口任意位置,但拖不出窗口。这是宿主结构决定的,不是插件能绕过的。

  • 面板靠结构特征识别(非 static 定位、占视口 25% 以上、内含「设置 / Settings」文案),不依赖构建哈希类名;但如果上游改动模态实现(例如换掉遮罩层或不再用 inert),跟随主界面交互这一部分可能需要调整。

  • 本版在 DSH 0.2.2-rc.5(Electron 桌面端)上实测通过。

  • The desktop app owns a single BrowserWindow; the settings panel is an in-page overlay, not an OS window. It can be moved anywhere inside the window, but it cannot be dragged out of it — that is a property of the host, not something a client plugin can change.

  • The panel is found structurally (non-static position, ≥25 % of the viewport, contains the text 设置/Settings), not by hashed class names; if upstream changes how the modal is implemented (a different backdrop, no inert), the "keep the app interactive" part may need an update.

  • Tested on DSH 0.2.2-rc.5 (Electron desktop).

关掉它 / Turning it off

「插件 → 已安装插件 → dsh-drag-settings」→ 关掉开关。依赖会留在 package.json 里,只是不再启用。

Plugins → Installed → dsh-drag-settings → toggle off. The dependency stays in package.json; the bundle is simply not enabled.

诊断 / Diagnostics

默认不上报任何东西。 / Nothing is reported by default.

  • 前端:控制台 localStorage.setItem('dshDragSettingsDebug','1') 后刷新,事件会 POST 到 127.0.0.1:8768。
  • 宿主:只有设置了 DSH_DRAG_SETTINGS_DEBUG=1 时才会监听 8768,并把记录写到系统临时目录的 dsh-drag-settings-report.jsonl。

License

MIT

Related plugins