chore: save progress before layout changes
This commit is contained in:
@@ -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}`
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user