feat: single-source theme discovery replaces three hardcoded whitelists

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-10-22 17:14:44 +08:00
parent cd109cf873
commit 204c5039ab
4 changed files with 38 additions and 4 deletions
+1 -1
View File
@@ -8,10 +8,10 @@ from __future__ import annotations
import io, json, re, zipfile, shutil
from pathlib import Path
from . import db
from .core import THEMES as BUILTIN
BASE=Path(__file__).resolve().parent.parent/'themes'
THEME_ROOT=db.DATA/'theme_packages'
BUILTIN=('automotive','industrial','corporate','minimal')
THEME_ID=re.compile(r'^[a-z][a-z0-9-]{2,39}$')
VERSION=re.compile(r'^\d+\.\d+\.\d+$')