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

@ -2,7 +2,7 @@ import { Utils } from "../../Utils"
import Constants from "../../Models/Constants"
import { LayerConfigJson } from "../../Models/ThemeConfig/Json/LayerConfigJson"
import { Store, UIEventSource } from "../../Logic/UIEventSource"
import { LayoutConfigJson } from "../../Models/ThemeConfig/Json/LayoutConfigJson"
import { ThemeConfigJson } from "../../Models/ThemeConfig/Json/ThemeConfigJson"
/**
* A small class wrapping around the Server API.
@ -71,12 +71,12 @@ export default class StudioServer {
}
async fetch(layerId: string, category: "layers", uid?: number): Promise<LayerConfigJson>
async fetch(layerId: string, category: "themes", uid?: number): Promise<LayoutConfigJson>
async fetch(layerId: string, category: "themes", uid?: number): Promise<ThemeConfigJson>
async fetch(
layerId: string,
category: "layers" | "themes",
uid?: number
): Promise<LayerConfigJson | LayoutConfigJson> {
): Promise<LayerConfigJson | ThemeConfigJson> {
try {
return <any>await Utils.downloadJson(this.urlFor(layerId, category, uid))
} catch (e) {