Refactoring: use theme instead of layout in a lot of places

This commit is contained in:
Pieter Vander Vennet 2024-10-17 04:06:03 +02:00
parent 9427083939
commit bdc9ba52a6
104 changed files with 445 additions and 449 deletions

View file

@ -1,4 +1,4 @@
import { LayoutConfigJson } from "../Json/LayoutConfigJson"
import { ThemeConfigJson } from "../Json/ThemeConfigJson"
import { Utils } from "../../../Utils"
import LineRenderingConfigJson from "../Json/LineRenderingConfigJson"
import { LayerConfigJson } from "../Json/LayerConfigJson"
@ -257,12 +257,12 @@ export class UpdateLegacyLayer extends DesugaringStep<
}
}
class UpdateLegacyTheme extends DesugaringStep<LayoutConfigJson> {
class UpdateLegacyTheme extends DesugaringStep<ThemeConfigJson> {
constructor() {
super("Small fixes in the theme config", ["roamingRenderings"], "UpdateLegacyTheme")
}
convert(json: LayoutConfigJson, context: ConversionContext): LayoutConfigJson {
convert(json: ThemeConfigJson, context: ConversionContext): ThemeConfigJson {
const oldThemeConfig = { ...json }
if (oldThemeConfig.socialImage === "") {
@ -311,7 +311,7 @@ class UpdateLegacyTheme extends DesugaringStep<LayoutConfigJson> {
}
}
export class FixLegacyTheme extends Fuse<LayoutConfigJson> {
export class FixLegacyTheme extends Fuse<ThemeConfigJson> {
constructor() {
super(
"Fixes a legacy theme to the modern JSON format geared to humans. Syntactic sugars are kept (i.e. no tagRenderings are expandend, no dependencies are automatically gathered)",