fix blank page, icons, add logging and EVM balance chart

- Fix blank page: set viewsRoot, base:'', history.replaceState in index.html
- Fix chain icons: add dist/icons→views/mainview/icons copy rule
- Add file-based logger (src/bun/lib/logger.ts) with logToFile RPC
- Add frontend error overlay + global error listeners in index.svelte
- Add EVM balance chart with time range filters (EvmDashboard.svelte)
- Replace console.log with file logger throughout backend
- Improve get-env.ts to read version.json for channel detection
This commit is contained in:
2026-06-27 16:59:15 +08:00
parent 0b6df331ee
commit f46e61ed5e
11 changed files with 297 additions and 39 deletions
+11
View File
@@ -23,3 +23,14 @@ const rpc = Electroview.defineRPC<RPC>({
},
})
export const electrobun = new Electroview({ rpc })
export async function frontendLog(message: string) {
try {
await electrobun.rpc?.request.logToFile({ message: `[FE] ${message}` })
} catch {}
}
export async function frontendLogError(message: string, err?: unknown) {
const detail = err instanceof Error ? err.stack || err.message : String(err ?? '')
await frontendLog(`[ERROR] ${message} — ${detail}`)
}