From 40bad24864e85f78441323fb39e05271f4fdefbd Mon Sep 17 00:00:00 2001 From: newcat Date: Sun, 7 Jan 2024 12:54:55 +0100 Subject: [PATCH] Change location of self-hosted OFL data to support different base URL --- public/.gitkeep | 0 src/stage/fixtures/dmx/fixtureLibrary.ts | 4 +++- .../stage/fixtures/dmx}/ofl_export_ofl.zip | Bin src/stage/visualization/stageRenderer.ts | 1 - 4 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 public/.gitkeep rename {public => src/stage/fixtures/dmx}/ofl_export_ofl.zip (100%) diff --git a/public/.gitkeep b/public/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/stage/fixtures/dmx/fixtureLibrary.ts b/src/stage/fixtures/dmx/fixtureLibrary.ts index 7c09005..b948ecf 100644 --- a/src/stage/fixtures/dmx/fixtureLibrary.ts +++ b/src/stage/fixtures/dmx/fixtureLibrary.ts @@ -3,6 +3,8 @@ import { useLocalStorage } from "@vueuse/core"; import { defineStore } from "pinia"; import { Fixture, OFLManufacturers } from "./open-fixture"; +import SelfHostedOfl from "./ofl_export_ofl.zip?url"; + export interface Manufacturer { name: string; fixtures: Fixture[]; @@ -29,7 +31,7 @@ export const useFixtureLibrary = defineStore("fixtureLibrary", () => { try { updating.value = true; const axios = (await import("axios")).default; - const response = await axios.get("/ofl_export_ofl.zip", { + const response = await axios.get(SelfHostedOfl, { responseType: "blob", }); return response.data; diff --git a/public/ofl_export_ofl.zip b/src/stage/fixtures/dmx/ofl_export_ofl.zip similarity index 100% rename from public/ofl_export_ofl.zip rename to src/stage/fixtures/dmx/ofl_export_ofl.zip diff --git a/src/stage/visualization/stageRenderer.ts b/src/stage/visualization/stageRenderer.ts index fe7102b..268e489 100644 --- a/src/stage/visualization/stageRenderer.ts +++ b/src/stage/visualization/stageRenderer.ts @@ -97,7 +97,6 @@ export class StageRenderer { } public onFixtureConfigUpdate(fixtureId: string, config: FixtureRendererConfig) { - console.log("Updating fixture config", fixtureId, config); const fixtureRenderer = this.fixtureRenderers.get(fixtureId); if (fixtureRenderer) { fixtureRenderer.onConfigUpdate(config);