Files
apes-sidebar/src/client/plugins-viewers.ts
T
HuanLinOTO 3d6d55d2ea feat(catalog): 预览插件目录收录音频预览插件(dsh-plugin-better-sidebar-plugin-audio)
- src/client/plugins-viewers.ts:新增 PluginEntry,设置页「添加插件」弹窗的预览插件目录可一键复制安装命令
- i18n:pluginAudioName / pluginAudioDesc 同步全部 20 份词典(zh/en + 19 份第三语言),key 集合由 tests/locales.spec.ts 守护
- tests/plugin-list.spec.ts:该条目写进目录清单断言
- README.md / README_EN.md:预览插件表格 3 → 4

验证:pnpm typecheck 通过;vitest run tests/locales.spec.ts tests/plugin-list.spec.ts 全绿(29 用例)。本机全量 pnpm test 的 7 个失败与本改动无关(tasks-model 语言回退 / git / plugin-meta 打包 / editor-host),已在未改动的 dev 上复现同一失败集合。
2026-10-07 00:31:16 +08:00

53 lines
2.3 KiB
TypeScript

/**
* The built-in catalog of FILE-PREVIEWER plugins (file-type previewers),
* shown in the "add preview plugin" modal (Side card settings → 文件预览
* grid → the dashed card). Adding an entry: append one object here (unique
* `id` = npm package name, `name` / `description` = i18n-friendly (add a
* `pluginXxxName` / `pluginXxxDesc` key in locales.ts), `url` = GitHub repo,
* `install` = the full shell command pre-filled into the
* install terminal — it starts with `cd ~/.dsh` so the install runs with
* the DSH home as the working directory). Data integrity is guarded by
* `tests/plugin-list.spec.ts`.
*/
import { t } from './locales.ts'
import type { PluginEntry } from './plugins-shared.ts'
/** File-previewer plugins (alphabetical order). */
export const builtinViewerPlugins: readonly PluginEntry[] = [
{
id: '@huanlin/dsh-plugin-better-sidebar-plugin-office',
name: () => t('pluginOfficeName'),
url: 'https://github.com/HuanLinOTO/dsh-plugin-better-sidebar-plugin-office',
description: () => t('pluginOfficeDesc'),
install: 'cd ~/.dsh && dsh plugin --profile web add @huanlin/dsh-plugin-better-sidebar-plugin-office',
},
{
id: 'dsh-md-export',
name: () => t('pluginMdExportName'),
url: 'https://github.com/AnakinCao/dsh-md-export',
description: () => t('pluginMdExportDesc'),
install: 'cd ~/.dsh && dsh plugin --profile web add dsh-md-export',
},
{
id: 'dsh-code-nav',
name: () => t('pluginCodeNavName'),
url: 'https://github.com/AnakinCao/dsh-code-nav',
description: () => t('pluginCodeNavDesc'),
install: 'cd ~/.dsh && dsh plugin --profile web add https://github.com/AnakinCao/dsh-code-nav.git',
},
{
id: 'dsh-video-preview',
name: () => t('pluginVideoPreviewName'),
url: 'https://github.com/zemul/dsh-video-preview',
description: () => t('pluginVideoPreviewDesc'),
install: 'cd ~/.dsh && dsh plugin --profile web add dsh-video-preview',
},
{
id: '@huanlin/dsh-plugin-better-sidebar-plugin-audio',
name: () => t('pluginAudioName'),
url: 'https://github.com/HuanLinOTO/dsh-plugin-better-sidebar-plugin-audio',
description: () => t('pluginAudioDesc'),
install: 'cd ~/.dsh && dsh plugin --profile web add @huanlin/dsh-plugin-better-sidebar-plugin-audio',
},
]