dsh-custom-theme-import

by Juryorca

1 主题与外观github收录于 08-21

DSH Web 皮肤管理器:支持主流 DSH 皮肤包本地/GitHub 导入、扫描已安装皮肤、预览/使用/禁用/刷新/删除,宿主持久化。

DSH Web skin manager for mainstream DSH skin packages: import local paths or GitHub collections, scan installed skins from the web profile, preview/use/disable/refresh/delete, with host-side persistence.

安装

dsh plugin --profile web add github:Juryorca/dsh-custom-theme-import

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

English | 中文

一个用于管理主流 DSH 皮肤包格式的插件。支持导入、预览、使用和管理皮肤,不替代 DSH 原生插件系统。

功能

  • 从本地路径或 GitHub 导入主流 DSH 皮肤包格式。
  • 也兼容没有 skin.json 的 DSH 主题插件(dsh.client.platform: "web" + lib/client.js)。
  • 扫描 web profile 的 node_modules 中已安装皮肤。
  • 预览、使用、刷新、管理皮肤。
  • 皮肤自带 skin.json 预览图时显示缩略图。
  • 宿主持久化,可选择保存托管副本。
  • 界面语言自动跟随 DSH(中文 / English)。

构建

node build.mjs
node build.mjs --check

安装

通过 GitHub 安装:

dsh plugin --profile web add -w github:Juryorca/dsh-custom-theme-import

通过本地目录安装:

dsh plugin --profile web add -w link:/本地路径/dsh-custom-theme-import

重启:

dsh --profile web

打开:

设置 → 我的主题

支持的皮肤格式

主流 DSH 皮肤包格式:

skin-package/
├── package.json
├── cordis.patch.yml
├── skin.json
├── lib/index.js
└── lib/client.js

要求:

  • package.json 必须声明 dsh.bundle。
  • 必须有 skin.json。
  • lib/client.js 必须是导出 apply(ctx) 的 DSH ModuleLoader bundle。

集合仓库

GitHub 仓库或本地路径可以包含多个主流皮肤,以下常见布局会自动扫描:

repo-root/
├── themes/<skin-id>/...
├── skins/<skin-id>/...
└── packages/*/skins/<skin-id>/...

每个 <skin-id>/ 都是完整皮肤包(package.json、cordis.patch.yml、skin.json、lib/index.js、lib/client.js)。

存储

  • 主题库文件:~/.dsh/dsh-custom-theme-import/library.json
  • 本地路径导入默认引用原路径;也可以选择复制到: ~/.dsh/dsh-custom-theme-import/themes/<id>/
  • GitHub/远程导入会克隆/下载到: ~/.dsh/dsh-custom-theme-import/themes/<id>/

原始 README: https://github.com/Juryorca/dsh-custom-theme-import/blob/main/README.zh.md ↗