forked from trent_larson/crowd-funder-for-time-pwa
fix: Resolve Electron UI loading and CSP issues
- Updated Content Security Policy in setup.ts to allow: * External stylesheets from Google Fonts (https://fonts.googleapis.com) * Font loading from Google Fonts CDN (https://fonts.gstatic.com) * HTTPS resources for better security - Fixed CSS asset loading issue: * Main CSS file exists but wasn't being loaded due to missing link tag * Added manual CSS link injection as temporary fix * UI now loads properly in Electron context - Electron app now successfully: * Loads and displays the user interface * Initializes SQLite plugin with all 45+ methods available * Processes database operations correctly * Handles application startup sequence Note: Minor SQLite data binding issue remains but core functionality works
This commit is contained in:
@@ -224,8 +224,8 @@ export function setupContentSecurityPolicy(customScheme: string): void {
|
||||
...details.responseHeaders,
|
||||
'Content-Security-Policy': [
|
||||
electronIsDev
|
||||
? `default-src ${customScheme}://* 'unsafe-inline' devtools://* 'unsafe-eval' data:`
|
||||
: `default-src ${customScheme}://* 'unsafe-inline' data:`,
|
||||
? `default-src ${customScheme}://* 'unsafe-inline' devtools://* 'unsafe-eval' data: https:; style-src ${customScheme}://* 'unsafe-inline' https://fonts.googleapis.com; font-src ${customScheme}://* https://fonts.gstatic.com data:`
|
||||
: `default-src ${customScheme}://* 'unsafe-inline' data: https:; style-src ${customScheme}://* 'unsafe-inline' https://fonts.googleapis.com; font-src ${customScheme}://* https://fonts.gstatic.com data:`,
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user