@luosuqwq/dsh-ui-appearance 0.1.8 → 0.1.12

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 CHANGED
@@ -30,6 +30,14 @@ The DSH web interface ships with one plain look. This bundle adds an "Appearance
30
30
 
31
31
  **Sidebar.** The wallpaper shows through at the chosen opacity; auto-hide is a single switch.
32
32
 
33
+ ![Sidebar auto-hide: it slides in when the cursor reaches the left edge and retracts when it leaves](https://raw.githubusercontent.com/LuosuQWQ/dsh-ui-appearance/main/docs/preview/sidebar-autohide.gif)
34
+
35
+ **Auto-hide.** A real capture of the browser UI: once the cursor comes within 20 px of the left edge the sidebar slides back in over 220 ms, and it retracts along the same curve when the cursor leaves, without reflowing the conversation column.
36
+
37
+
38
+ ![The conversation area over a wallpaper](https://raw.githubusercontent.com/LuosuQWQ/dsh-ui-appearance/main/docs/preview/conversation.jpg)
39
+
40
+ **Conversation area.** Messages, tool cards and the composer sit on the frosted card while the wallpaper stays visible around and through it.
33
41
 
34
42
  ## Why this plugin
35
43
 
@@ -240,6 +248,8 @@ curl -s http://127.0.0.1:<port>/bg/path
240
248
  curl -s http://127.0.0.1:<port>/bg/config
241
249
  ```
242
250
 
251
+ Every `/bg/*` route runs the Host admission check (`ctx.connection.requestRejection`) before it touches the disk: a request has to come from an admitted DSH client, so a plain `curl` without the browser's `dsh-auth-*` cookie gets `401`. Add `-H 'cookie: dsh-auth-...=<value>'` copied from devtools when you want to poke at the routes by hand.
252
+
243
253
  `/bg/list` returns `[{ url, name }]` with the name decoded, `/bg/path` the writable folder, `POST /bg/reveal` opens it in the OS file manager, and `/bg/config` the stored settings — the last one answers 404 until the page has saved at least once.
244
254
 
245
255
  | Path | Role |
package/README.zh-CN.md CHANGED
@@ -30,6 +30,14 @@ DSH 的网页界面默认只有一套朴素外观。这个 bundle 在设置里
30
30
 
31
31
  **侧边栏。** 壁纸按设定的透明度透出,自动隐藏一个开关。
32
32
 
33
+ ![侧边栏自动隐藏:光标靠近左边缘时滑出,移开后再收起](https://raw.githubusercontent.com/LuosuQWQ/dsh-ui-appearance/main/docs/preview/sidebar-autohide.gif)
34
+
35
+ **自动隐藏。** 浏览器界面里真实录制的:光标进入距左边缘 20 px 的范围,侧边栏用 220 ms 滑回屏幕;光标移开就沿着同一条曲线收回,主内容区不跟着重排。
36
+
37
+
38
+ ![壁纸上的会话区效果](https://raw.githubusercontent.com/LuosuQWQ/dsh-ui-appearance/main/docs/preview/conversation.jpg)
39
+
40
+ **会话区。** 消息、工具卡片和输入框落在毛玻璃卡片上,壁纸在四周和玻璃后面仍然可见。
33
41
 
34
42
  ## 为什么用它
35
43
 
@@ -230,6 +238,8 @@ curl -s http://127.0.0.1:<port>/bg/path
230
238
  curl -s http://127.0.0.1:<port>/bg/config
231
239
  ```
232
240
 
241
+ 每个 `/bg/*` 路由在碰磁盘之前都要过 Host 的准入检查(`ctx.connection.requestRejection`):请求必须来自已认证的 DSH 客户端,所以不带浏览器那枚 `dsh-auth-*` cookie 的裸 `curl` 只会拿到 `401`。想手工试的话从开发者工具里把 cookie 抄出来,加 `-H 'cookie: dsh-auth-...=<value>'`。
242
+
233
243
  `/bg/list` 返回 `[{ url, name }]`(name 已解码),`/bg/path` 返回可写目录,`POST /bg/reveal` 用系统文件管理器打开它,`/bg/config` 返回已保存的设置——页面还没保存过时最后一个返回 404。
234
244
 
235
245
  | 路径 | 作用 |