From 1b30c3655331db0596dfd7963222cab0e7666281 Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 27 Apr 2026 15:31:14 +0200 Subject: [PATCH] feat(settings): Community-Section mit Klarname-Toggle + Avatar/Karma-Preview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings → Community zeigt Pseudonym + Avatar + Tier-Badge + Karma, plus Switch für 'Klarname neben Eule zeigen'. Optimistic-Update mit Rollback bei Fehler. Suchindex + 5 Locales aktualisiert. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../lib/components/settings/searchIndex.ts | 15 +- .../settings/sections/CommunitySection.svelte | 323 ++++++++++++++++++ .../web/src/lib/i18n/locales/settings/de.json | 12 + .../web/src/lib/i18n/locales/settings/en.json | 12 + .../web/src/lib/i18n/locales/settings/es.json | 12 + .../web/src/lib/i18n/locales/settings/fr.json | 12 + .../web/src/lib/i18n/locales/settings/it.json | 12 + .../src/lib/modules/settings/ListView.svelte | 3 + 8 files changed, 399 insertions(+), 2 deletions(-) create mode 100644 apps/mana/apps/web/src/lib/components/settings/sections/CommunitySection.svelte diff --git a/apps/mana/apps/web/src/lib/components/settings/searchIndex.ts b/apps/mana/apps/web/src/lib/components/settings/searchIndex.ts index 824016940..673f423ac 100644 --- a/apps/mana/apps/web/src/lib/components/settings/searchIndex.ts +++ b/apps/mana/apps/web/src/lib/components/settings/searchIndex.ts @@ -8,9 +8,16 @@ * `getSearchIndex()` so components stay reactive to locale changes. */ import type { Component } from 'svelte'; -import { Gear, Robot, ShieldCheck, Cloud, Tag } from '@mana/shared-icons'; +import { Gear, Robot, ShieldCheck, Cloud, Tag, Megaphone } from '@mana/shared-icons'; -export type CategoryId = 'general' | 'ai' | 'security' | 'privacy' | 'data' | 'tag-presets'; +export type CategoryId = + | 'general' + | 'ai' + | 'security' + | 'privacy' + | 'community' + | 'data' + | 'tag-presets'; export interface Category { id: CategoryId; @@ -39,6 +46,7 @@ const CATEGORY_DEFS: Record = { i18nKey: 'security', }, privacy: { icon: ShieldCheck, anchors: ['privacy'], i18nKey: 'privacy' }, + community: { icon: Megaphone, anchors: ['community-identity'], i18nKey: 'community' }, data: { icon: Cloud, anchors: [ @@ -110,6 +118,9 @@ const SEARCH_ENTRY_DEFS: SearchEntryDef[] = [ // Privacy { i18nKey: 'privacy_overview', category: 'privacy', anchor: 'privacy' }, { i18nKey: 'reset_all_private', category: 'privacy', anchor: 'privacy' }, + // Community + { i18nKey: 'community_show_real_name', category: 'community', anchor: 'community-identity' }, + { i18nKey: 'community_karma', category: 'community', anchor: 'community-identity' }, // Data { i18nKey: 'cloud_sync', category: 'data', anchor: 'cloud-sync' }, { i18nKey: 'data_export', category: 'data', anchor: 'my-data' }, diff --git a/apps/mana/apps/web/src/lib/components/settings/sections/CommunitySection.svelte b/apps/mana/apps/web/src/lib/components/settings/sections/CommunitySection.svelte new file mode 100644 index 000000000..acfde129c --- /dev/null +++ b/apps/mana/apps/web/src/lib/components/settings/sections/CommunitySection.svelte @@ -0,0 +1,323 @@ + + + + + + + {#if loading} +
Lade…
+ {:else} +
+ +
+
+ + {profile.displayName ?? 'Wachsame Eule (noch unbenutzt)'} + {#if authStore.user?.name && profile.communityShowRealName} + · {authStore.user.name} + {/if} +
+
+ + {tierCfg.label}-Eule + + {karma} Karma +
+

+ Dein Pseudonym ist deterministisch aus deiner User-ID abgeleitet — es bleibt dasselbe, + solange du derselbe Account bist. Niemand außer dem Mana-Team kann es zurückführen. +

+
+
+ +
+
+
Klarnamen neben dem Pseudonym zeigen
+
+ Wenn aktiv, sehen eingeloggte Mana-User in der Community deinen Namen ({authStore.user + ?.name ?? 'kein Name'}) neben deiner Eule. Auf der öffentlichen community.mana.how-Seite + (ohne Login) wird der Klarname nie gezeigt. +
+
+ +
+ + {#if error} +

{error}

+ {/if} + {/if} +
+ + diff --git a/apps/mana/apps/web/src/lib/i18n/locales/settings/de.json b/apps/mana/apps/web/src/lib/i18n/locales/settings/de.json index 137991f57..68fb564c1 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/settings/de.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/settings/de.json @@ -10,6 +10,10 @@ "label": "Privatsphäre", "description": "Was ist gerade öffentlich oder per Link geteilt — mit Kill-Switch." }, + "community": { + "label": "Community", + "description": "Wie du in der Community auftauchst — Eulen-Pseudonym, Klarname, Karma." + }, "data": { "label": "Daten & Sync", "description": "Cloud-Sync, Export, Backup & DSGVO" }, "tag_presets": { "label": "Tag-Presets", "description": "Tag-Sets für neue Spaces" } }, @@ -47,6 +51,14 @@ "label": "Alle auf privat zurücksetzen", "keywords": "kill-switch, kill switch, reset, privat, widerrufen" }, + "community_show_real_name": { + "label": "Klarname in der Community", + "keywords": "name, eule, pseudonym, klarname, anonym" + }, + "community_karma": { + "label": "Karma & Tier", + "keywords": "karma, tier, bronze, silver, gold, platin, eule" + }, "cloud_sync": { "label": "Cloud Sync", "keywords": "sync, geräte" }, "data_export": { "label": "Daten exportieren", "keywords": "export, dsgvo, gdpr, json" }, "auth_data": { "label": "Authentifizierung", "keywords": "sessions, 2fa, login" }, diff --git a/apps/mana/apps/web/src/lib/i18n/locales/settings/en.json b/apps/mana/apps/web/src/lib/i18n/locales/settings/en.json index 572cd709d..ac1ca1991 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/settings/en.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/settings/en.json @@ -7,6 +7,10 @@ "label": "Privacy", "description": "What is currently public or shared via link — with kill switch." }, + "community": { + "label": "Community", + "description": "How you appear in the community — owl pseudonym, real name, karma." + }, "data": { "label": "Data & Sync", "description": "Cloud sync, export, backup & GDPR" }, "tag_presets": { "label": "Tag presets", "description": "Tag sets for new spaces" } }, @@ -41,6 +45,14 @@ "label": "Reset all to private", "keywords": "kill-switch, kill switch, reset, private, revoke" }, + "community_show_real_name": { + "label": "Real name in community", + "keywords": "name, owl, pseudonym, anonymous, identity" + }, + "community_karma": { + "label": "Karma & Tier", + "keywords": "karma, tier, bronze, silver, gold, platinum, owl" + }, "cloud_sync": { "label": "Cloud Sync", "keywords": "sync, devices" }, "data_export": { "label": "Export data", "keywords": "export, dsgvo, gdpr, json" }, "auth_data": { "label": "Authentication", "keywords": "sessions, 2fa, login" }, diff --git a/apps/mana/apps/web/src/lib/i18n/locales/settings/es.json b/apps/mana/apps/web/src/lib/i18n/locales/settings/es.json index 55ba44997..15ace40f7 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/settings/es.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/settings/es.json @@ -7,6 +7,10 @@ "label": "Privacidad", "description": "Qué es público o compartido por enlace ahora mismo — con interruptor de emergencia." }, + "community": { + "label": "Comunidad", + "description": "Cómo apareces en la comunidad — pseudónimo de búho, nombre real, karma." + }, "data": { "label": "Datos y sincronización", "description": "Cloud sync, exportación, copia de seguridad y RGPD" @@ -47,6 +51,14 @@ "label": "Restablecer todo a privado", "keywords": "kill-switch, reset, privado, revocar" }, + "community_show_real_name": { + "label": "Nombre real en la comunidad", + "keywords": "nombre, búho, pseudónimo, anónimo, identidad" + }, + "community_karma": { + "label": "Karma y nivel", + "keywords": "karma, nivel, bronce, plata, oro, platino, búho" + }, "cloud_sync": { "label": "Cloud Sync", "keywords": "sync, dispositivos" }, "data_export": { "label": "Exportar datos", "keywords": "export, rgpd, gdpr, json" }, "auth_data": { "label": "Autenticación", "keywords": "sesiones, 2fa, login" }, diff --git a/apps/mana/apps/web/src/lib/i18n/locales/settings/fr.json b/apps/mana/apps/web/src/lib/i18n/locales/settings/fr.json index b853c9573..869a75122 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/settings/fr.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/settings/fr.json @@ -7,6 +7,10 @@ "label": "Confidentialité", "description": "Ce qui est public ou partagé par lien actuellement — avec interrupteur d'urgence." }, + "community": { + "label": "Communauté", + "description": "Comment tu apparais dans la communauté — pseudonyme de chouette, vrai nom, karma." + }, "data": { "label": "Données et synchro", "description": "Cloud sync, export, sauvegarde et RGPD" @@ -47,6 +51,14 @@ "label": "Tout repasser en privé", "keywords": "kill-switch, reset, privé, révoquer" }, + "community_show_real_name": { + "label": "Vrai nom dans la communauté", + "keywords": "nom, chouette, pseudonyme, anonyme, identité" + }, + "community_karma": { + "label": "Karma & niveau", + "keywords": "karma, niveau, bronze, argent, or, platine, chouette" + }, "cloud_sync": { "label": "Cloud Sync", "keywords": "sync, appareils" }, "data_export": { "label": "Exporter les données", "keywords": "export, rgpd, gdpr, json" }, "auth_data": { "label": "Authentification", "keywords": "sessions, 2fa, login" }, diff --git a/apps/mana/apps/web/src/lib/i18n/locales/settings/it.json b/apps/mana/apps/web/src/lib/i18n/locales/settings/it.json index f2b821a64..51068e2f9 100644 --- a/apps/mana/apps/web/src/lib/i18n/locales/settings/it.json +++ b/apps/mana/apps/web/src/lib/i18n/locales/settings/it.json @@ -7,6 +7,10 @@ "label": "Privacy", "description": "Cosa è pubblico o condiviso tramite link adesso — con interruttore di emergenza." }, + "community": { + "label": "Community", + "description": "Come appari nella community — pseudonimo di gufo, nome reale, karma." + }, "data": { "label": "Dati e sincronizzazione", "description": "Cloud sync, esportazione, backup e GDPR" @@ -44,6 +48,14 @@ "label": "Riporta tutto a privato", "keywords": "kill-switch, reset, privato, revocare" }, + "community_show_real_name": { + "label": "Nome reale nella community", + "keywords": "nome, gufo, pseudonimo, anonimo, identità" + }, + "community_karma": { + "label": "Karma e tier", + "keywords": "karma, tier, bronzo, argento, oro, platino, gufo" + }, "cloud_sync": { "label": "Cloud Sync", "keywords": "sync, dispositivi" }, "data_export": { "label": "Esporta i dati", "keywords": "export, gdpr, json" }, "auth_data": { "label": "Autenticazione", "keywords": "sessioni, 2fa, login" }, diff --git a/apps/mana/apps/web/src/lib/modules/settings/ListView.svelte b/apps/mana/apps/web/src/lib/modules/settings/ListView.svelte index 369215f59..e307f2a08 100644 --- a/apps/mana/apps/web/src/lib/modules/settings/ListView.svelte +++ b/apps/mana/apps/web/src/lib/modules/settings/ListView.svelte @@ -16,6 +16,7 @@ import AiSection from '$lib/components/settings/sections/AiSection.svelte'; import SecuritySection from '$lib/components/settings/sections/SecuritySection.svelte'; import PrivacySection from '$lib/components/settings/sections/PrivacySection.svelte'; + import CommunitySection from '$lib/components/settings/sections/CommunitySection.svelte'; import DataSection from '$lib/components/settings/sections/DataSection.svelte'; import TagPresetsSection from '$lib/components/settings/sections/TagPresetsSection.svelte'; @@ -79,6 +80,8 @@ {:else if activeCategory === 'privacy'} + {:else if activeCategory === 'community'} + {:else if activeCategory === 'data'} {:else if activeCategory === 'tag-presets'}