Files
nexus/frontend/index.html
T
andy db3f063530 fix: wire up frontend build pipeline for Wails v2
- embed.go: embed index.html + all:src directly instead of all:dist,
  so `go build` works without a prior npm build step
- index.html: add missing xterm.css vendor stylesheet link
- build.js: add buildDist() to assemble dist/ with index.html and the
  full src/ tree; update required-file paths to match dist/ layout
- Add placeholder xterm lib stubs in src/js/lib/ and src/css/lib/ so
  the app can start before `npm install` is run
- .gitignore: stop ignoring the lib placeholder files so they are
  available on a fresh clone
2026-04-15 00:00:00 +01:00

203 lines
9.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nexus Terminal</title>
<!-- Vendor styles -->
<link rel="stylesheet" href="/src/css/lib/xterm.css">
<!-- Design system -->
<link rel="stylesheet" href="/src/css/tokens.css">
<link rel="stylesheet" href="/src/css/base.css">
<link rel="stylesheet" href="/src/css/components.css">
<link rel="stylesheet" href="/src/css/layout.css">
<link rel="stylesheet" href="/src/css/sidebar.css">
<link rel="stylesheet" href="/src/css/tabs.css">
<link rel="stylesheet" href="/src/css/terminal.css">
<link rel="stylesheet" href="/src/css/forms.css">
<link rel="stylesheet" href="/src/css/modals.css">
</head>
<body>
<div id="app" class="app">
<!-- ============================================================
Sidebar — connection manager
============================================================ -->
<aside class="sidebar" id="sidebar">
<div class="sidebar-header wails-drag">
<div class="sidebar-logo">
<!-- Terminal prompt icon -->
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<polyline points="4 17 10 11 4 5"></polyline>
<line x1="12" y1="19" x2="20" y2="19"></line>
</svg>
<span class="sidebar-title">Nexus Terminal</span>
</div>
</div>
<div class="sidebar-search">
<div class="search-wrapper">
<input type="text"
class="search-input"
id="profile-search"
placeholder="Search connections…"
autocomplete="off"
spellcheck="false">
</div>
</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>
</nav>
<div class="sidebar-footer">
<button class="btn btn-ghost btn-sm" id="btn-new-connection" title="New Connection">
<span>+ New</span>
</button>
<button class="btn btn-ghost btn-icon btn-sm" id="btn-import" title="Import">
<!-- Upload icon -->
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="17 8 12 3 7 8"></polyline>
<line x1="12" y1="3" x2="12" y2="15"></line>
</svg>
</button>
<button class="btn btn-ghost btn-icon btn-sm" id="btn-settings" title="Settings">
<!-- Cog icon -->
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="3"></circle>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0
0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65
0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0
0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9
19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0
1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0
0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0
1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6
9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0
1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65
0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2
2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0
0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2
2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65
1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51
1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65
1.65 0 0 0-1.51 1z"></path>
</svg>
</button>
</div>
</aside>
<!-- ============================================================
Tab bar — session tabs
============================================================ -->
<div class="tab-bar" id="tab-bar">
<div class="tab-list" id="tab-list">
<!-- Tabs are injected dynamically by JS -->
</div>
<button class="tab-new" id="btn-new-tab" title="New Tab">+</button>
</div>
<!-- ============================================================
Workspace — terminal area
============================================================ -->
<main class="workspace" id="workspace">
<!-- Empty state — shown when no sessions are active -->
<div class="empty-state" id="empty-state">
<div class="empty-state-icon">
<!-- Terminal icon -->
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round">
<polyline points="4 17 10 11 4 5"></polyline>
<line x1="12" y1="19" x2="20" y2="19"></line>
</svg>
</div>
<h2>No active sessions</h2>
<p>Select a connection from the sidebar or create a new one to get started.</p>
<div class="empty-state-actions">
<button class="btn btn-primary" id="btn-empty-connect">New Connection</button>
<button class="btn btn-secondary" id="btn-empty-quick">Quick Connect</button>
</div>
</div>
<!-- Session containers are injected here dynamically -->
</main>
<!-- ============================================================
Status bar
============================================================ -->
<footer class="status-bar" id="status-bar">
<span id="status-connection">
<span class="status-dot is-disconnected"></span>
Disconnected
</span>
<span id="status-protocol"></span>
<span id="status-session-count">0 sessions</span>
<span class="status-spacer"></span>
<span id="status-vault">🔒 Locked</span>
</footer>
</div>
<!-- Modal container (dynamically populated) -->
<div id="modals"></div>
<!-- Notification toasts -->
<div id="notifications" class="notifications-container"></div>
<!-- Wails runtime (injected by the Wails framework) -->
<script src="/wails/ipc.js"></script>
<script src="/wails/runtime.js"></script>
<!-- Vendor libraries -->
<script src="/src/js/lib/xterm.min.js"></script>
<script src="/src/js/lib/xterm-addon-fit.min.js"></script>
<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>
</body>
</html>