テーマインポート機能を実装するなど
This commit is contained in:
parent
b12bf78c6d
commit
dac962580b
10 changed files with 118 additions and 12 deletions
|
|
@ -102,3 +102,10 @@ function compile(theme: Theme): { [key: string]: string } {
|
|||
function genValue(c: tinycolor.Instance): string {
|
||||
return c.toRgbString();
|
||||
}
|
||||
|
||||
export function validateTheme(theme: Record<string, any>): boolean {
|
||||
if (theme.id == null) return false;
|
||||
if (theme.name == null) return false;
|
||||
if (theme.base == null || !['light', 'dark'].includes(theme.base)) return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue