diff --git a/frontend/src/lib/components/Avatar.svelte b/frontend/src/lib/components/Avatar.svelte
new file mode 100644
index 0000000..459b9bd
--- /dev/null
+++ b/frontend/src/lib/components/Avatar.svelte
@@ -0,0 +1,78 @@
+
+
+{#if src}
+
+{:else}
+
+ {initials}
+
+{/if}
diff --git a/frontend/src/routes/dashboard/+layout.svelte b/frontend/src/routes/dashboard/+layout.svelte
index 41162cb..20cf648 100644
--- a/frontend/src/routes/dashboard/+layout.svelte
+++ b/frontend/src/routes/dashboard/+layout.svelte
@@ -15,6 +15,7 @@
import { Separator } from '@/components/ui/separator'
import Logo from '$lib/components/Logo.svelte'
import TeamSwitcher from '$lib/components/TeamSwitcher.svelte'
+ import Avatar from '$lib/components/Avatar.svelte'
import RunningTimesToast from '$lib/components/RunningTimesToast.svelte'
import { Home, Calendar, LogOut, Menu, X, Moon, Sun, Route, Settings, Bike } from 'lucide-svelte'
import { toggleMode, mode } from 'mode-watcher'
@@ -123,7 +124,10 @@
Zeile, das Team-Dropdown darunter. -->
-
+
+
+
+
{auth.user.name || auth.user.email}
@@ -187,9 +191,12 @@
-
- {auth.user.name || auth.user.email}
-
+
+
+
+ {auth.user.name || auth.user.email}
+
+
diff --git a/frontend/src/routes/dashboard/settings/+page.svelte b/frontend/src/routes/dashboard/settings/+page.svelte
index 26bb038..923e6f6 100644
--- a/frontend/src/routes/dashboard/settings/+page.svelte
+++ b/frontend/src/routes/dashboard/settings/+page.svelte
@@ -4,11 +4,12 @@
* Datensatz (updateRule `id = @request.auth.id`) — was hier steht, kann
* also niemand für jemand anderen ändern.
*/
- import { api, auth, getFileURL } from '$lib/stores/pocketbase.svelte'
+ import { api, auth } from '$lib/stores/pocketbase.svelte'
import { Button } from '@/components/ui/button'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
+ import Avatar from '$lib/components/Avatar.svelte'
import { KeyRound, User } from 'lucide-svelte'
let name = $state(auth.user?.name ?? '')
@@ -17,10 +18,6 @@
let profileMessage = $state
(null)
let profileError = $state(null)
- const avatarUrl = $derived(
- auth.user?.avatar ? getFileURL(auth.user as object, auth.user.avatar as string) : null,
- )
-
async function saveProfile() {
if (!auth.user) return
@@ -108,13 +105,7 @@
- {#if avatarUrl}
-

- {:else}
-
-
-
- {/if}
+
diff --git a/frontend/src/routes/dashboard/settings/team/+page.svelte b/frontend/src/routes/dashboard/settings/team/+page.svelte
index cbb24a9..9c791ee 100644
--- a/frontend/src/routes/dashboard/settings/team/+page.svelte
+++ b/frontend/src/routes/dashboard/settings/team/+page.svelte
@@ -11,6 +11,7 @@
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import * as Dialog from '@/components/ui/dialog'
+ import Avatar from '$lib/components/Avatar.svelte'
import { Crown, LogOut, Plus, Shield, Trash2, UserMinus, UserPlus, Users } from 'lucide-svelte'
import type { TeamsResponse } from '$lib/types'
@@ -204,6 +205,7 @@
{@const isAdm = (t.admins ?? []).includes(userId)}
+
{teams.userLabel(userId)}
{#if isOwner}