dsh-imgnav
其他 活跃维护

dsh-imgnav

fuguier001/dsh-imgnav

Click-to-zoom lightbox with arrow-key paging for DSH conversation images: ← prev / → next / Esc close, edge hints

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
6 KB
仓库大小
2 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:fuguier001/dsh-imgnav
git clone https://github.com/fuguier001/dsh-imgnav.git
git clone git@github.com:fuguier001/dsh-imgnav.git
README.md main

dsh-imgnav

对话内图片的点击放大 + 键盘翻页 lightbox(DSH web 插件)。

交互

  • 点击任意图片卡 → 全屏放大(接管 imgview 卡片自带的单卡放大)
  • 放大态内 ← 上一张 / → 下一张(图片按会话内出现顺序)
  • 翻到最早一张再 ← → 提示 "这是最早一张";翻到最后一张再 → → 提示 "这是最后一张"
  • Esc / 点空白 / 右上角 ✕ 关闭返回页面
  • 右下角常驻角标:点击 = 打开最新一张;"键 N" = 累计收到方向/Esc 键次数(诊断信号)

结构

  • lib/index.js — host half,零 import 零副作用(纯占位)
  • lib/client.js — 全部功能:shell.overlay lightbox + window 捕获键盘 + document 捕获点击

安装(软链模式,改源码重启即生效)

git clone https://github.com/fuguier001/dsh-imgnav.git ~/dsh-imgnav
ln -s ~/dsh-imgnav ~/.dsh/profiles/web/node_modules/dsh-imgnav

并在 ~/.dsh/profiles/web/cordis.patch.yml 加行:

- insert:
    - id: imgnav
      name: 'dsh-imgnav'

重启 dsh web 生效。

兼容

  • 依赖 dsh-imgview 的图片卡(/dsh-imgview/ URL 特征)作为翻页集合
  • host half 零依赖零副作用;client half 仅依赖页面 React 与 slots 服务