- Removed the unused `serve_html` handler and its import. - Added a fallback static file service that serves `index.html` for any unmatched path, enabling proper SPA routing. - Reordered service registration to place the fallback before the explicit index route. - Cleaned up redundant blank lines and imports in `mod.rs`. **Client-side (chat.js) updates** - Renamed the message input variable from `input` to `messageInputEl` for clarity. - Introduced `pendingContextChange` placeholder for future context handling. - Switched initialization event from `document 'ready'` to `window 'load'`. - Updated DOM element assignments and focus calls to use the new variable name. - Removed unused sidebar auto‑close logic and obsolete session loading functions (`loadSessions`, `loadSessionHistory`). - Minor refactoring and comment adjustments to improve readability and eliminate dead code.
43 lines
No EOL
1.6 KiB
HTML
43 lines
No EOL
1.6 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>General Bots</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
<link rel="stylesheet" href="css/app.css" />
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/livekit-client/dist/livekit-client.umd.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
|
|
<script defer src="js/alpine.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<nav x-data="{ current: 'chat' }">
|
|
<div class="logo">⚡ General Bots</div>
|
|
<a href="#chat" @click.prevent="current = 'chat'; window.switchSection('chat')"
|
|
:class="{ active: current === 'chat' }">💬 Chat</a>
|
|
|
|
<a href="#drive" @click.prevent="current = 'drive'; window.switchSection('drive')"
|
|
:class="{ active: current === 'drive' }">📁 Drive</a>
|
|
<a href="#tasks" @click.prevent="current = 'tasks'; window.switchSection('tasks')"
|
|
:class="{ active: current === 'tasks' }">✓ Tasks</a>
|
|
<a href="#mail" @click.prevent="current = 'mail'; window.switchSection('mail')"
|
|
:class="{ active: current === 'mail' }">✉ Mail</a>
|
|
</nav>
|
|
|
|
<div id="main-content">
|
|
<!-- Sections will be loaded dynamically -->
|
|
</div>
|
|
|
|
<!-- Load Module Scripts -->
|
|
<script src="js/layout.js"></script>
|
|
<script src="chat/chat.js"></script>
|
|
<script src="drive/drive.js"></script>
|
|
<script src="tasks/tasks.js"></script>
|
|
<script src="mail/mail.js"></script>
|
|
|
|
</body>
|
|
|
|
</html> |