fix: resolve background not loading due deploymend into folder

This commit is contained in:
2026-02-05 10:46:25 +05:00
parent 56b2cde8c4
commit a91c59cc9e
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ export const PANEL_SETTINGS = {
PANEL_HEIGHT_MAX: 1000, PANEL_HEIGHT_MAX: 1000,
// Default values // Default values
DEFAULT_BACKGROUND_IMAGE: "/backgrounds/b1.jpg", DEFAULT_BACKGROUND_IMAGE: "./backgrounds/b1.jpg",
} as const; } as const;
// ===== TYPOGRAPHY ===== // ===== TYPOGRAPHY =====
+2 -1
View File
@@ -1,3 +1,4 @@
import { PANEL_SETTINGS } from "../lib/constants";
import { setCurrentStep } from "../stores/uiStore"; import { setCurrentStep } from "../stores/uiStore";
export class ImageService { export class ImageService {
@@ -13,7 +14,7 @@ export class ImageService {
} }
async loadDefaultBackground(): Promise<string> { async loadDefaultBackground(): Promise<string> {
const defaultBackground = "/backgrounds/b1.jpg"; const defaultBackground = PANEL_SETTINGS.DEFAULT_BACKGROUND_IMAGE;
const response = await fetch(defaultBackground); const response = await fetch(defaultBackground);
if (!response.ok) throw new Error("Не удалось загрузить фоновое изображение"); if (!response.ok) throw new Error("Не удалось загрузить фоновое изображение");
const blob = await response.blob(); const blob = await response.blob();