This commit is contained in:
@@ -8,6 +8,15 @@ import {
|
||||
renderSecurePdf,
|
||||
renderSecureText,
|
||||
} from './examViewer.js';
|
||||
import * as GoApp from '../wailsjs/go/main/App.js';
|
||||
|
||||
// Map Wails bindings to window.go.main.App for backward compatibility with obfuscated builds
|
||||
window.go = window.go || {};
|
||||
window.go.main = window.go.main || {};
|
||||
if (typeof window.go.main.App === 'undefined') {
|
||||
window.go.main.App = GoApp;
|
||||
window.go.main._custom = true;
|
||||
}
|
||||
|
||||
const brandLogoHtml = `<img src="${logoUrl}" alt="Simple Care" class="brand-logo-img" />`;
|
||||
|
||||
@@ -54,7 +63,10 @@ webcamCanvas.style.display = 'none';
|
||||
document.body.appendChild(webcamCanvas);
|
||||
|
||||
function init() {
|
||||
if (typeof window.go === 'undefined' || typeof window.go.main === 'undefined') {
|
||||
const ready = (typeof window.ObfuscatedCall === 'function') ||
|
||||
(typeof window.go !== 'undefined' && typeof window.go.main !== 'undefined' && !window.go.main._custom);
|
||||
|
||||
if (!ready || typeof window.runtime === 'undefined') {
|
||||
setTimeout(init, 200);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user