Update index.html
Browse files- index.html +27 -0
index.html
CHANGED
|
@@ -212,6 +212,25 @@ tailwind.config = {
|
|
| 212 |
</head>
|
| 213 |
<body class="h-screen flex overflow-hidden text-pearl">
|
| 214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
<!-- SIDEBAR OVERLAY (mobile) -->
|
| 216 |
<div id="overlay" class="fixed inset-0 bg-black/60 z-20 hidden opacity-0" onclick="closeSidebar()"></div>
|
| 217 |
|
|
@@ -591,6 +610,8 @@ let chats = {}; // { id: { id, title, messages: [], createdAt } }
|
|
| 591 |
|
| 592 |
// ββ Init βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 593 |
function init() {
|
|
|
|
|
|
|
| 594 |
if (localStorage.getItem('nexus_theme') === 'light') toggleTheme(); // β add this
|
| 595 |
|
| 596 |
loadSettings();
|
|
@@ -598,6 +619,12 @@ function init() {
|
|
| 598 |
updateModelBadge();
|
| 599 |
newChat();
|
| 600 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 601 |
function toggleTheme() {
|
| 602 |
const isLight = document.body.classList.toggle('light');
|
| 603 |
document.getElementById('theme-icon-dark').classList.toggle('hidden', isLight);
|
|
|
|
| 212 |
</head>
|
| 213 |
<body class="h-screen flex overflow-hidden text-pearl">
|
| 214 |
|
| 215 |
+
<!-- Privacy notice -->
|
| 216 |
+
<div id="privacy-modal" class="fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm">
|
| 217 |
+
<div class="bg-smoke border border-ash rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl">
|
| 218 |
+
<div class="flex items-start gap-3 mb-4">
|
| 219 |
+
<svg class="w-5 h-5 text-amber flex-shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
| 220 |
+
<h2 class="text-cream font-display italic text-lg font-bold">Before you start</h2>
|
| 221 |
+
</div>
|
| 222 |
+
<p class="text-ghost text-xs font-mono leading-relaxed mb-2">
|
| 223 |
+
Your API key, messages, and settings are saved as <span class="text-amber">plaintext in your browser's localStorage</span> β not sent anywhere except directly to OpenRouter when you chat.
|
| 224 |
+
</p>
|
| 225 |
+
<p class="text-ghost text-xs font-mono leading-relaxed mb-5">
|
| 226 |
+
Do not use this on a shared or public computer if you want to keep your API key private.
|
| 227 |
+
</p>
|
| 228 |
+
<button onclick="dismissPrivacyNotice()" class="w-full px-4 py-2.5 bg-amber hover:bg-ember text-ink text-sm font-mono rounded-md transition-colors">
|
| 229 |
+
Got it, let's go
|
| 230 |
+
</button>
|
| 231 |
+
</div>
|
| 232 |
+
</div>
|
| 233 |
+
|
| 234 |
<!-- SIDEBAR OVERLAY (mobile) -->
|
| 235 |
<div id="overlay" class="fixed inset-0 bg-black/60 z-20 hidden opacity-0" onclick="closeSidebar()"></div>
|
| 236 |
|
|
|
|
| 610 |
|
| 611 |
// ββ Init βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 612 |
function init() {
|
| 613 |
+
if (localStorage.getItem('nexus_privacy_seen')) dismissPrivacyNotice();
|
| 614 |
+
|
| 615 |
if (localStorage.getItem('nexus_theme') === 'light') toggleTheme(); // β add this
|
| 616 |
|
| 617 |
loadSettings();
|
|
|
|
| 619 |
updateModelBadge();
|
| 620 |
newChat();
|
| 621 |
}
|
| 622 |
+
|
| 623 |
+
function dismissPrivacyNotice() {
|
| 624 |
+
document.getElementById('privacy-modal').remove();
|
| 625 |
+
localStorage.setItem('nexus_privacy_seen', '1');
|
| 626 |
+
}
|
| 627 |
+
|
| 628 |
function toggleTheme() {
|
| 629 |
const isLight = document.body.classList.toggle('light');
|
| 630 |
document.getElementById('theme-icon-dark').classList.toggle('hidden', isLight);
|