Convert ES modules to plain scripts using window.NexusTerminal namespace
Replace ES module import/export with a global namespace pattern to avoid silent failures in the Wails v2 WKWebView which does not reliably support <script type="module"> tags. - Remove all import/export statements from JS files - Register each module's exports on window.NexusTerminal - Destructure dependencies from window.NexusTerminal at file top - Load all scripts in dependency order in index.html as plain <script> tags
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
* and SSH host-key verification confirmations.
|
||||
*/
|
||||
|
||||
import { createElement, escapeHtml } from './utils.js';
|
||||
const { createElement, escapeHtml } = window.NexusTerminal;
|
||||
|
||||
export class SecretPrompt {
|
||||
class SecretPrompt {
|
||||
constructor(app) {
|
||||
/** @type {import('./app.js').App} */
|
||||
this.app = app;
|
||||
@@ -298,3 +298,6 @@ export class SecretPrompt {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.NexusTerminal = window.NexusTerminal || {};
|
||||
window.NexusTerminal.SecretPrompt = SecretPrompt;
|
||||
|
||||
Reference in New Issue
Block a user