mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
fix(skin): register runtime plugin layout parts
This commit is contained in:
1 parent
35cb6ad6df
commit
11a07eae0f
9 files changed
+80
-15
No files matched your search
@@ -433,12 +433,12 @@ export const SKIN_LAYOUT_COMPONENTS: readonly SkinLayoutComponent[] = [
|
||||
const componentById = new Map(SKIN_LAYOUT_COMPONENTS.map((component) => [component.id, component]));
|
||||
|
||||
function dynamicSkinPartPage(id: string): SkinLayoutPage | undefined {
|
||||
const match = /^skin\.(home|voice|demo)\.([a-z][a-z0-9-]{0,63})(?:\.(control-)?(node-root(?:-\d+){0,32}|part-[a-z][a-z0-9-]{0,63}))?$/.exec(id);
|
||||
const match = /^skin\.(home|voice|demo)\.((?:[a-z][a-z0-9-]{0,63}|runtime_plugin_[a-z][a-z0-9-]{0,63}__[a-z][a-z0-9-]{0,63}))(?:\.(control-)?(node-root(?:-\d+){0,32}|part-[a-z][a-z0-9-]{0,63}))?$/.exec(id);
|
||||
return match?.[1] as SkinLayoutPage | undefined;
|
||||
}
|
||||
|
||||
function isDynamicSkinControl(id: string): boolean {
|
||||
return /^skin\.(?:home|voice|demo)\.[a-z][a-z0-9-]{0,63}\.control-(?:node-root(?:-\d+){0,32}|part-[a-z][a-z0-9-]{0,63})$/.test(id);
|
||||
return /^skin\.(?:home|voice|demo)\.(?:[a-z][a-z0-9-]{0,63}|runtime_plugin_[a-z][a-z0-9-]{0,63}__[a-z][a-z0-9-]{0,63})\.control-(?:node-root(?:-\d+){0,32}|part-[a-z][a-z0-9-]{0,63})$/.test(id);
|
||||
}
|
||||
|
||||
const dynamicSkinPartCache = new Map<string, SkinLayoutComponent>();
|
||||
|
||||
Reference in new issue
Block a user