diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 6086331..37733fd 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '343'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '344'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { diff --git a/backend/static/js/pages/social.js b/backend/static/js/pages/social.js index 5d796a9..bd1b5ba 100644 --- a/backend/static/js/pages/social.js +++ b/backend/static/js/pages/social.js @@ -43,9 +43,11 @@ window.Page_social = (() => { function _render() { const lvlBar = _stats ? _levelBar(_stats) : ''; _el.innerHTML = ` -
-
- 📱 +
+
+ 📱
Social Media
Luna ist dein KI-Coach
@@ -60,7 +62,7 @@ window.Page_social = (() => {
+ margin-bottom:var(--space-4)"> ${[['idee','✨ Ideen'],['archiv','📂 Archiv'],['bewerten','🔍 Prüfen']].map(([t,l]) => `
-
-
+
+
`; } @@ -105,14 +107,15 @@ window.Page_social = (() => { el.innerHTML = ` -
- 🌙 +
+ 🌙
-
+
Hey, ich bin Luna 👋
-
+
Ich schlage dir Ideen vor und erkläre warum sie funktionieren. Lern Social Media richtig — nicht nur kopieren!
@@ -120,9 +123,9 @@ window.Page_social = (() => { ${_diversity?.warning ? ` -
-
+
+
⚠️
+
-
💡 Was könntest du heute posten?
+ margin-bottom:var(--space-3)"> +
💡 Was könntest du heute posten?
+ style="font-size:11px;padding:4px 12px;min-height:32px; + border-radius:var(--radius-full)">↻ Neue
${_lunaThinking('Klein...')}
-
-
✏️ Oder eigenes Thema
+
+
+
✏️ Oder eigenes Thema
+
-
+
-
+
Plattform
${['both','instagram','tiktok'].map((p,i) => ` `).join('')}
-
+
Format
${['post','reel','story','carousel'].map((f,i) => ` `).join('')}
-
+
Thema
-
+
Foto / Video (optional)
+ max-width:100px;max-height:100px;border-radius:var(--radius-md);overflow:hidden">
-
+
Rasse (optional)
${_unusedBreeds.length ? ` -
+
🌙 Noch nicht gezeigt: +
${_unusedBreeds.map(b => ``).join('')} +
` : ''} @@ -245,35 +261,63 @@ window.Page_social = (() => {
- - - - + + +
+ + -
+
`; // Platform toggle @@ -497,13 +541,15 @@ window.Page_social = (() => { await new Promise(r => setTimeout(r, 400)); const stilLabel = {tutorial:'📹 Tutorial', community:'🙋 Community', aspirational:'💪 Aspirational'}[data.stil] || ''; res.innerHTML = ` -
- 🎾 +
+ 🎾
-
+
Trainingstipp · ${_esc(data.exercise_kat||'')} · ${stilLabel}
-
+
${_esc(data.exercise_name||'')}
@@ -535,14 +581,16 @@ window.Page_social = (() => { _progressDone(res); await new Promise(r => setTimeout(r, 400)); res.innerHTML = ` -
- 🛁 +
+ 🛁
-
+
Pflegetipp · ${_esc(data.pflege_kat||'')} ${data.rasse_name ? ` · speziell für ${_esc(data.rasse_name)}` : ''}
-
+
${_esc(data.pflege_titel||'')}
@@ -572,14 +620,18 @@ window.Page_social = (() => { // Foto anzeigen wenn vorhanden const mediaUrl = data.breed_foto || data.media_url || null; res.innerHTML = ` -
+
${mediaUrl ? `` : '🐶'} + style="width:60px;height:60px;border-radius:var(--radius-md);object-fit:cover;flex-shrink:0" + onerror="this.style.display='none'">` : '🐶'}
-
Rasse des Tages
-
${_esc(data.topic?.replace('Rasse des Tages: ',''))}
+
+ Rasse des Tages
+
+ ${_esc(data.topic?.replace('Rasse des Tages: ',''))}
${_renderResult(data, mediaUrl)}`; @@ -724,33 +776,43 @@ window.Page_social = (() => { return ` ${data.coaching ? ` -
-
- 🌙 +
+
+ 🌙
-
- Luna sagt:
-
${_esc(data.coaching)}
+
Luna sagt:
+
${_esc(data.coaching)}
` : ''} -
- ✓ Gespeichert - ${score ? `${score}` : ''} -
+ + +
+ - +
+ +
${mediaUrl ? ` -
+
📎 Dein Medien-Upload
- +
` : ''} ${_resultBlock('📝 Caption', data.caption, true)} ${data.hashtags ? ` -
+
🏷 Hashtags
-
+
${data.hashtags.split(',').map(h=>`#${h.trim()}`).join(' ')}
${_copyBtn(data.hashtags.split(',').map(h=>`#${h.trim()}`).join(' '))}
` : ''} ${(data.hook||data.cta) ? ` -
+
${data.hook ? `
🎣 Hook
-
+
"${_esc(data.hook)}"
` : ''} ${data.cta ? `
📣 Call-to-Action
-
${_esc(data.cta)}
` : ''} +
${_esc(data.cta)}
` : ''}
` : ''} ${_resultBlock('📸 Was du filmen/fotografieren solltest', data.visual_brief, false)} ${data.script ? ` -
+
🎬 Video-Aufbau
${_esc(data.script)}
+ line-height:1.7">${_esc(data.script)}
` : ''} ${(data.image_prompt||data.canva_notes||unsplash) ? ` -
+
🛠 Wenn du kein eigenes Bild hast
${data.image_prompt ? ` -
+
DALL-E / Midjourney:
-
${_esc(data.image_prompt)}
+
${_esc(data.image_prompt)}
${_copyBtn(data.image_prompt)}` : ''} ${data.canva_notes ? ` -
Canva:
-
${_esc(data.canva_notes)}
` : ''} +
Canva:
+
${_esc(data.canva_notes)}
` : ''} ${unsplash ? ` 🔍 Kostenlose Fotos auf Unsplash →` : ''} @@ -833,10 +908,12 @@ window.Page_social = (() => { function _resultBlock(label, text, copyable) { if (!text) return ''; - return `
+ return `
${label}
-
${_esc(text)}
+
${_esc(text)}
${copyable ? _copyBtn(text) : ''}
`; } @@ -844,7 +921,8 @@ window.Page_social = (() => { function _copyBtn(text) { return ``; } @@ -1023,10 +1101,11 @@ window.Page_social = (() => { Tippe auf 📤 wenn du einen Post abgesetzt hast — so lernt Luna was wirklich live ging.
` : ''} -
+
${['alle','idea','draft','scheduled','published','archived'].map(s => ` `).join('')}
${!items.length @@ -1139,19 +1218,22 @@ window.Page_social = (() => { function _renderBewerten(el) { let selPlatform = 'instagram'; el.innerHTML = ` -
- 🌙 -
+
+ 🌙 +
Zeig mir deinen Entwurf — ich sage dir was gut ist und wie du ihn noch besser machen kannst!
-
-
+
+
${['instagram','tiktok','both'].map((p,i) => ` `).join('')}
-
+
`; el.querySelectorAll('.sm-ep').forEach(b => b.addEventListener('click', () => { @@ -1188,15 +1271,16 @@ window.Page_social = (() => { _progressDone(res); await new Promise(r => setTimeout(r, 400)); res.innerHTML = ` - ${data.notes ? `
-
- 🌙 + ${data.notes ? `
+
+ 🌙
-
+
Lunas Feedback:
-
${_esc(data.notes)}
+
${_esc(data.notes)}
` : ''} @@ -1237,6 +1321,14 @@ window.Page_social = (() => { .sm-label{font-size:11px;font-weight:700;color:var(--c-text-muted); text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px;display:block} @keyframes luna-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.15)}} + #sm-breed-day:hover,#sm-training-tip:hover,#sm-pflege-tip:hover{ + transform:translateY(-2px);box-shadow:var(--shadow-md)!important} + #sm-breed-day:active,#sm-training-tip:active,#sm-pflege-tip:active{ + transform:translateY(0)} + #sm-show-exercises:hover{background:var(--c-surface-2)!important; + border-color:var(--c-border)!important;color:var(--c-text-secondary)!important} + .sm-breed-chip:hover{background:var(--c-primary-subtle)!important; + border-color:var(--c-primary)!important;color:var(--c-primary-dark)!important} `; document.head.appendChild(style); diff --git a/backend/static/sw.js b/backend/static/sw.js index 0338124..3eed143 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v357'; +const CACHE_VERSION = 'by-v359'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten