refactor: 模板注册与默认模板收敛到目录驱动

This commit is contained in:
que01 committed 2026-10-12 10:00:46 +08:00
1 parent f87b26b201
commit 89fdfd7d83
25 files changed
+122 -96

No files matched your search

+5 -1
View File
@@ -135,5 +135,9 @@ export function isBrandTemplateKey(value: string): value is BrandTemplateKey {
}
export function getBrandTemplate(key: string): BrandTemplateDefinition | undefined {
return isBrandTemplateKey(key) ? brandTemplates[key] : undefined;
return isBrandTemplateKey(key) ? brandTemplates[key as keyof typeof brandTemplates] : undefined;
}
export const defaultBrandTemplateKey = "personal" satisfies BrandTemplateKey;
export const brandTemplateKeys = Object.keys(brandTemplates);