retmon2333/dsh-background0

dsh-background

DSH Web 自定义背景壁纸:本机单图/文件夹轮播、透明模糊遮罩、侧栏与输入框扩展、樱花/雪花特效

包名
dsh-background
版本
0.1.0
许可证
MIT
最近更新
2026年9月4日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:retmon2333/dsh-background

配置存放位置

路径
用户设置%USERPROFILE%\.dsh\settings.yaml(Linux/macOS:~/.dsh/settings.yaml
本插件分节文件内 dsh-background:

单图模式:返回图片字节(未配置时 400 image-not-configured)

curl.exe -o NUL -w "%{http_code}`n" http://127.0.0.1:3080/dsh-background/file

文件夹模式:返回 JSON { folder, images[] }(未配置时 400)

curl.exe http://127.0.0.1:3080/dsh-background/folder/list


> macOS/Linux 用 `curl -o /dev/null -w "%{http_code}\n" ...`。

---

## 常见问题

- **设置里没有「背景」**:确认 `add` 成功且 dump-config 有条目;必须完整重启 `dsh web`,再 F5。
- **pnpm 报 `allowBuilds`/`ignored build scripts`**:DSH 默认拦截 git 插件的 `prepare` 构建脚本。把报错里打印的包名(通常是本插件 `dsh-background`)加进 profile 的 `pnpm-workspace.yaml`:

  ```yaml
  allowBuilds:
    - dsh-background

文件位于 %USERPROFILE%\.dsh\profiles\web\pnpm-workspace.yaml(Linux/macOS:~/.dsh/profiles/web/pnpm-workspace.yaml),改完重新 dsh plugin --profile web add github:retmon2333/dsh-background

  • Windows 装失败报 ERR_PNPM_EPERM: symlink:多为系统符号链接权限问题。开启「开发者模式」(设置 → 隐私与安全 → 开发者选项),或以管理员身份运行终端;或改用无空格路径的 link: 本地安装。
  • 改了代码不生效pnpm build 后重启宿主(不要只刷页面)。
  • 路径含空格装失败:用 junction 的无空格 link:
  • 重装后还是旧设置:删 settings.yaml 里的 dsh-background: 段。
  • 默认壁纸不显示:确认 assets/default-wallpaper.jpg 存在,且未被用户配置覆盖。
  • GitHub 安装 404:仓库须公开,仓库名与 github:用户/仓库 一致。

开发

pnpm install
pnpm build
pnpm watch

License

MIT