fix(ui): Emoji-Reste im Profil-Modal + Wunschliste-Icon → Kochtopf
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 1m18s
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 1m18s
Profil-Modal: - Default-Emoji '🍳' im "Neues Profil"-Input entfernt (war ein ver- sehentlicher Platzhalter, den die meisten nicht überschrieben haben → alle Profile sahen gleich aus). Jetzt leer, mit 🙂 als Hint im placeholder. - Profil-Liste: avatar_emoji wird nur gezeigt, wenn wirklich gesetzt. Sonst CircleUser-Lucide statt 🙂-Fallback. Migration 006_clear_default_profile_emoji.sql räumt bestehende DB- Einträge auf: UPDATE profile SET avatar_emoji = NULL WHERE avatar_emoji = '🍳'. User, die wirklich einen Pfannen-Avatar wollten, können das in /admin/profiles neu setzen. Wunschliste-Header-Icon: Heart → CookingPot. Der Kontext ist "was wir essen wollen", also passt ein Topf besser als ein Herz. Heart bleibt im Rezept als "Favorit" und in der Wunschliste als "ich will auch"- Toggle, keine Kollision. Ungenutzten Heart-Import aus +layout.svelte entfernt.
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
let showModal = $state(false);
|
let showModal = $state(false);
|
||||||
let newName = $state('');
|
let newName = $state('');
|
||||||
let newEmoji = $state('🍳');
|
let newEmoji = $state('');
|
||||||
|
|
||||||
async function createAndSelect() {
|
async function createAndSelect() {
|
||||||
if (!newName.trim()) return;
|
if (!newName.trim()) return;
|
||||||
@@ -57,7 +57,11 @@
|
|||||||
showModal = false;
|
showModal = false;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span class="emoji-lg">{p.avatar_emoji ?? '🙂'}</span>
|
{#if p.avatar_emoji}
|
||||||
|
<span class="emoji-lg">{p.avatar_emoji}</span>
|
||||||
|
{:else}
|
||||||
|
<span class="icon-lg"><CircleUser size={28} strokeWidth={1.5} /></span>
|
||||||
|
{/if}
|
||||||
<span>{p.name}</span>
|
<span>{p.name}</span>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
@@ -69,7 +73,8 @@
|
|||||||
<div class="new-row">
|
<div class="new-row">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Emoji"
|
placeholder="🙂"
|
||||||
|
aria-label="Emoji (optional)"
|
||||||
bind:value={newEmoji}
|
bind:value={newEmoji}
|
||||||
maxlength="8"
|
maxlength="8"
|
||||||
class="emoji-input"
|
class="emoji-input"
|
||||||
@@ -171,6 +176,11 @@
|
|||||||
.emoji-lg {
|
.emoji-lg {
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
|
.icon-lg {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #2b6a3d;
|
||||||
|
}
|
||||||
hr {
|
hr {
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid #e4eae7;
|
border-top: 1px solid #e4eae7;
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
-- Frühere Versionen haben '🍳' als Default im "Neues Profil"-Emoji-Feld
|
||||||
|
-- vorausgefüllt — die meisten User haben das einfach so stehen lassen,
|
||||||
|
-- ohne bewusst ein Emoji zu wählen. Ergebnis: alle Profile sehen gleich aus.
|
||||||
|
-- Wir räumen das auf: alle avatar_emoji='🍳'-Einträge werden zu NULL,
|
||||||
|
-- was die UI als "kein Emoji, Lucide-Icon nehmen" interpretiert.
|
||||||
|
UPDATE profile SET avatar_emoji = NULL WHERE avatar_emoji = '🍳';
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { goto, afterNavigate } from '$app/navigation';
|
import { goto, afterNavigate } from '$app/navigation';
|
||||||
import { Heart, Settings, CookingPot, Globe, Utensils } from 'lucide-svelte';
|
import { Settings, CookingPot, Globe, Utensils } from 'lucide-svelte';
|
||||||
import { profileStore } from '$lib/client/profile.svelte';
|
import { profileStore } from '$lib/client/profile.svelte';
|
||||||
import { wishlistStore } from '$lib/client/wishlist.svelte';
|
import { wishlistStore } from '$lib/client/wishlist.svelte';
|
||||||
import ProfileSwitcher from '$lib/components/ProfileSwitcher.svelte';
|
import ProfileSwitcher from '$lib/components/ProfileSwitcher.svelte';
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
? `Wunschliste (${wishlistStore.count})`
|
? `Wunschliste (${wishlistStore.count})`
|
||||||
: 'Wunschliste'}
|
: 'Wunschliste'}
|
||||||
>
|
>
|
||||||
<Heart size={20} strokeWidth={2} />
|
<CookingPot size={20} strokeWidth={2} />
|
||||||
{#if wishlistStore.count > 0}
|
{#if wishlistStore.count > 0}
|
||||||
<span class="badge">{wishlistStore.count}</span>
|
<span class="badge">{wishlistStore.count}</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user