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:
+17
-37
@@ -51,40 +51,8 @@
|
||||
</div>
|
||||
|
||||
<nav class="sidebar-nav" id="sidebar-nav">
|
||||
<!-- Favourites -->
|
||||
<div class="sidebar-section" id="favourites-section">
|
||||
<button class="sidebar-section-header" data-section="favourites">
|
||||
<span class="section-icon">★</span>
|
||||
<span>Favourites</span>
|
||||
<span class="section-count" id="favourites-count">0</span>
|
||||
</button>
|
||||
<div class="sidebar-list" id="favourites-list">
|
||||
<div class="sidebar-list-empty">No favourites yet</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recent -->
|
||||
<div class="sidebar-section" id="recent-section">
|
||||
<button class="sidebar-section-header" data-section="recent">
|
||||
<span class="section-icon">⟳</span>
|
||||
<span>Recent</span>
|
||||
</button>
|
||||
<div class="sidebar-list" id="recent-list">
|
||||
<div class="sidebar-list-empty">No recent sessions</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- All Connections -->
|
||||
<div class="sidebar-section" id="all-section">
|
||||
<button class="sidebar-section-header" data-section="all">
|
||||
<span class="section-icon">⊞</span>
|
||||
<span>All Connections</span>
|
||||
<span class="section-count" id="all-count">0</span>
|
||||
</button>
|
||||
<div class="sidebar-list" id="all-list">
|
||||
<div class="sidebar-list-empty">No saved connections</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Dynamically managed by sidebar.js -->
|
||||
<div id="sidebar-profiles" class="sidebar-profiles"></div>
|
||||
</nav>
|
||||
|
||||
<div class="sidebar-footer">
|
||||
@@ -162,7 +130,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Session containers are injected here dynamically -->
|
||||
<!-- Session panels are injected here dynamically by tabs.js -->
|
||||
<div id="panel-container" class="panel-container"></div>
|
||||
</main>
|
||||
|
||||
<!-- ============================================================
|
||||
@@ -192,7 +161,18 @@
|
||||
<script src="/src/js/lib/xterm-addon-search.min.js"></script>
|
||||
<script src="/src/js/lib/xterm-addon-web-links.min.js"></script>
|
||||
|
||||
<!-- Application entry point -->
|
||||
<script type="module" src="/src/js/app.js"></script>
|
||||
<!-- Application scripts (loaded in dependency order) -->
|
||||
<script src="/src/js/utils.js"></script>
|
||||
<script src="/src/js/state.js"></script>
|
||||
<script src="/src/js/notifications.js"></script>
|
||||
<script src="/src/js/sidebar.js"></script>
|
||||
<script src="/src/js/tabs.js"></script>
|
||||
<script src="/src/js/terminal.js"></script>
|
||||
<script src="/src/js/profiles.js"></script>
|
||||
<script src="/src/js/raw.js"></script>
|
||||
<script src="/src/js/settings.js"></script>
|
||||
<script src="/src/js/commands.js"></script>
|
||||
<script src="/src/js/secrets.js"></script>
|
||||
<script src="/src/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user