Spaces:
Paused
Paused
Savestate: Ensure default background is standard, not fluid-dark
Browse files- index.html +1 -1
- src/app.js +2 -2
- src/views/chat/chat-view.js +10 -2
- src/views/settings/settings-view.js +1 -1
index.html
CHANGED
|
@@ -65,7 +65,7 @@
|
|
| 65 |
</head>
|
| 66 |
<body class="dark-theme in-chat-view">
|
| 67 |
|
| 68 |
-
<div id="live-version-badge" style="position: fixed; top: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-secondary); opacity: 0.6; z-index: 99999; pointer-events: none; font-weight: 500; font-family: monospace; letter-spacing: 1px; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);">BUILD 1.8.
|
| 69 |
|
| 70 |
<!-- SVG Filters for Liquid Glass Refraction -->
|
| 71 |
<svg width="0" height="0" style="position: absolute; pointer-events: none;">
|
|
|
|
| 65 |
</head>
|
| 66 |
<body class="dark-theme in-chat-view">
|
| 67 |
|
| 68 |
+
<div id="live-version-badge" style="position: fixed; top: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-secondary); opacity: 0.6; z-index: 99999; pointer-events: none; font-weight: 500; font-family: monospace; letter-spacing: 1px; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);">BUILD 1.8.186</div>
|
| 69 |
|
| 70 |
<!-- SVG Filters for Liquid Glass Refraction -->
|
| 71 |
<svg width="0" height="0" style="position: absolute; pointer-events: none;">
|
src/app.js
CHANGED
|
@@ -195,8 +195,8 @@ const initApp = async () => {
|
|
| 195 |
|
| 196 |
// Load background style
|
| 197 |
await db.initPromise;
|
| 198 |
-
const bgStyle = db.getSetting('background_style') || '
|
| 199 |
-
document.body.
|
| 200 |
|
| 201 |
// Scale up UI on web (HuggingFace) to match Capacitor native scale
|
| 202 |
const isNative = window.Capacitor && window.Capacitor.isNativePlatform && window.Capacitor.isNativePlatform();
|
|
|
|
| 195 |
|
| 196 |
// Load background style
|
| 197 |
await db.initPromise;
|
| 198 |
+
const bgStyle = db.getSetting('background_style') || 'standard';
|
| 199 |
+
document.body.setAttribute('data-bg-style', bgStyle);
|
| 200 |
|
| 201 |
// Scale up UI on web (HuggingFace) to match Capacitor native scale
|
| 202 |
const isNative = window.Capacitor && window.Capacitor.isNativePlatform && window.Capacitor.isNativePlatform();
|
src/views/chat/chat-view.js
CHANGED
|
@@ -12,8 +12,16 @@ import { initImageEditor } from './image-editor.js';
|
|
| 12 |
|
| 13 |
window.youtubeSearchCache = window.youtubeSearchCache || {};
|
| 14 |
|
| 15 |
-
// Initialize image editor overlay
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
function formatImageGeneration(prompt) {
|
| 19 |
const encodedPrompt = encodeURIComponent(prompt.trim());
|
|
|
|
| 12 |
|
| 13 |
window.youtubeSearchCache = window.youtubeSearchCache || {};
|
| 14 |
|
| 15 |
+
// Initialize image editor overlay safely
|
| 16 |
+
try {
|
| 17 |
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
| 18 |
+
initImageEditor();
|
| 19 |
+
} else {
|
| 20 |
+
document.addEventListener('DOMContentLoaded', initImageEditor);
|
| 21 |
+
}
|
| 22 |
+
} catch (e) {
|
| 23 |
+
console.error("Failed to init image editor", e);
|
| 24 |
+
}
|
| 25 |
|
| 26 |
function formatImageGeneration(prompt) {
|
| 27 |
const encodedPrompt = encodeURIComponent(prompt.trim());
|
src/views/settings/settings-view.js
CHANGED
|
@@ -21,7 +21,7 @@ export class SettingsView {
|
|
| 21 |
const deepseekApiKey = db.getSetting('deepseek_api_key') || '';
|
| 22 |
const ollamaUrl = db.getSetting('ollama_url') || 'http://localhost:11434';
|
| 23 |
const startBehavior = db.getSetting('start_behavior') || 'new';
|
| 24 |
-
const bgStyle = db.getSetting('background_style') || '
|
| 25 |
|
| 26 |
this.container.innerHTML = `
|
| 27 |
<div style="padding: 24px; padding-bottom: 100px; display: flex; flex-direction: column; gap: 32px; max-width: 600px; margin: 0 auto;">
|
|
|
|
| 21 |
const deepseekApiKey = db.getSetting('deepseek_api_key') || '';
|
| 22 |
const ollamaUrl = db.getSetting('ollama_url') || 'http://localhost:11434';
|
| 23 |
const startBehavior = db.getSetting('start_behavior') || 'new';
|
| 24 |
+
const bgStyle = db.getSetting('background_style') || 'standard';
|
| 25 |
|
| 26 |
this.container.innerHTML = `
|
| 27 |
<div style="padding: 24px; padding-bottom: 100px; display: flex; flex-direction: column; gap: 32px; max-width: 600px; margin: 0 auto;">
|