Compare commits

..

1 Commits

Author SHA1 Message Date
Rumio
185de85e0d
Merge b4df0c0fe9 into c839b44256 2025-11-12 08:24:57 +00:00

View File

@ -239,36 +239,27 @@ class RendererService:
) )
style_paths_to_load = [] style_paths_to_load = []
if manifest and manifest.get("styles"): if manifest and "styles" in manifest:
styles = manifest["styles"] styles = (
styles = [styles] if isinstance(styles, str) else styles [manifest["styles"]]
if isinstance(manifest["styles"], str)
resolution_base_path = Path(component_path_base) else manifest["styles"]
if variant:
skin_manifest_path = str(Path(component_path_base) / "skins" / variant)
skin_manifest = await context.theme_manager._load_single_manifest(
skin_manifest_path
)
if skin_manifest and "styles" in skin_manifest:
resolution_base_path = Path(skin_manifest_path)
style_paths_to_load.extend(
str(resolution_base_path / style).replace("\\", "/") for style in styles
) )
for style_path in styles:
full_style_path = str(Path(component_path_base) / style_path).replace(
"\\", "/"
)
style_paths_to_load.append(full_style_path)
else: else:
base_template_path = ( resolved_template_name = (
await context.theme_manager._resolve_component_template( await context.theme_manager._resolve_component_template(
component, context component, context
) )
) )
base_style_path = str( conventional_style_path = str(
Path(base_template_path).with_name("style.css") Path(resolved_template_name).with_name("style.css")
).replace("\\", "/") ).replace("\\", "/")
style_paths_to_load.append(base_style_path) style_paths_to_load.append(conventional_style_path)
if variant:
skin_style_path = f"{component_path_base}/skins/{variant}/style.css"
style_paths_to_load.append(skin_style_path)
for css_template_path in style_paths_to_load: for css_template_path in style_paths_to_load:
try: try: