chore: save progress before layout changes

This commit is contained in:
Joan
2026-02-10 10:48:53 +01:00
parent 70dc35b4b2
commit bba5d1d9dd
48 changed files with 1535 additions and 690 deletions

View File

@@ -3,7 +3,7 @@
*
* Resolves asset paths based on runtime environment:
* - Electron: Returns relative path (assets bundled with app, using ./)
* - Browser: Returns full server URL
* - Browser: Returns absolute path (served by PWA nginx)
*/
// Detect if running in Electron - check at runtime, not module load time
@@ -12,10 +12,6 @@ function checkIsElectron(): boolean {
window.location.protocol === 'file:'
}
// Base URL for remote assets (browser mode)
const ASSET_BASE_URL = import.meta.env.VITE_ASSET_URL ||
(import.meta.env.PROD ? 'https://api-staging.echoesoftheash.com' : '')
/**
* Resolves an asset path for the current environment
* @param path - The asset path (e.g., "images/items/knife.webp" or "/images/items/knife.webp")
@@ -32,8 +28,8 @@ export function getAssetPath(path: string): string {
return `./${cleanPath}`
}
// In browser, prepend the server URL
return `${ASSET_BASE_URL}/${cleanPath}`
// In browser, use absolute path - PWA nginx serves images at /images/
return `/${cleanPath}`
}
/**