fix: resolve SVG loading error and improve TypeScript typing
- Fix EntityIcon.vue to import blank-square.svg as module instead of using relative path - Update template to use imported SVG path for proper Electron compatibility - Make contact prop optional in EntityIcon component to fix TypeScript error - Add proper Settings type imports and method signatures in PlatformServiceMixin.ts - Replace console statements with logger calls across multiple files - Resolves SVG loading failures in Electron builds while maintaining web compatibility - Reduces TypeScript 'any' type warnings from 81 to 53
This commit is contained in:
@@ -938,6 +938,10 @@ export async function importFromMnemonic(
|
||||
* transformImageUrlForCors('https://image.timesafari.app/abc123.jpg')
|
||||
* // Returns: '/image-proxy/abc123.jpg' in development
|
||||
* // Returns: 'https://image.timesafari.app/abc123.jpg' in production
|
||||
*
|
||||
* transformImageUrlForCors('https://live.staticflickr.com/2853/9194403742_c8297b965b_b.jpg')
|
||||
* // Returns: '/flickr-proxy/2853/9194403742_c8297b965b_b.jpg' in development
|
||||
* // Returns: 'https://live.staticflickr.com/2853/9194403742_c8297b965b_b.jpg' in production
|
||||
*/
|
||||
export function transformImageUrlForCors(
|
||||
imageUrl: string | undefined | null,
|
||||
@@ -961,5 +965,17 @@ export function transformImageUrlForCors(
|
||||
return `/image-proxy/${imagePath}`;
|
||||
}
|
||||
|
||||
// Transform Flickr URLs to use proxy
|
||||
if (imageUrl.startsWith("https://live.staticflickr.com/")) {
|
||||
const imagePath = imageUrl.replace("https://live.staticflickr.com/", "");
|
||||
return `/flickr-proxy/${imagePath}`;
|
||||
}
|
||||
|
||||
// Transform other Flickr subdomains if needed
|
||||
if (imageUrl.includes(".staticflickr.com/")) {
|
||||
const imagePath = imageUrl.split(".staticflickr.com/")[1];
|
||||
return `/flickr-proxy/${imagePath}`;
|
||||
}
|
||||
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user