feat: Add game activity status (Experimental)
All checks were successful
Queue Release Build / prepare (push) Successful in 23s
Deploy Web Apps / deploy (push) Successful in 5m54s
Queue Release Build / build-windows (push) Successful in 16m19s
Queue Release Build / build-linux (push) Successful in 30m13s
Queue Release Build / finalize (push) Successful in 47s

This commit is contained in:
2026-04-27 05:46:33 +02:00
parent 3858beb28e
commit 53389ed3ad
50 changed files with 2007 additions and 104 deletions

View File

@@ -66,6 +66,26 @@
}
<p class="truncate text-sm text-muted-foreground">{{ profileUser.username }}</p>
@if (profileUser.gameActivity; as activity) {
<p class="mt-1 flex items-center gap-1 truncate text-xs text-muted-foreground">
<ng-icon
name="lucideGamepad2"
class="h-3 w-3 shrink-0"
/>
@if (activity.store?.url) {
<button
type="button"
class="truncate text-left hover:text-foreground hover:underline"
(click)="openGameStore(activity, $event)"
>
Playing {{ activity.name }}
</button>
} @else {
<span class="truncate">Playing {{ activity.name }}</span>
}
<span class="shrink-0">{{ gameActivityElapsed() }}</span>
</p>
}
</div>
<div>
@@ -92,11 +112,79 @@
</button>
}
</div>
@if (profileUser.gameActivity; as activity) {
<div class="flex items-center gap-2 rounded-md border border-border bg-background/40 px-2.5 py-2">
@if (activity.iconUrl) {
<img
class="h-9 w-9 rounded-md object-cover"
[src]="activity.iconUrl"
[alt]="activity.name"
/>
} @else {
<div class="grid h-9 w-9 place-items-center rounded-md bg-secondary text-muted-foreground">
<ng-icon
name="lucideGamepad2"
class="h-4 w-4"
/>
</div>
}
<div class="min-w-0 flex-1">
<p class="truncate text-xs text-muted-foreground">Playing</p>
@if (activity.store?.url) {
<button
type="button"
class="block max-w-full truncate text-left text-sm font-medium text-foreground hover:underline"
(click)="openGameStore(activity, $event)"
>
{{ activity.name }}
</button>
} @else {
<p class="truncate text-sm font-medium text-foreground">{{ activity.name }}</p>
}
<p class="text-xs text-muted-foreground">{{ gameActivityElapsed() }}</p>
</div>
</div>
}
</div>
} @else {
<p class="truncate text-base font-semibold text-foreground">{{ profileUser.displayName }}</p>
<p class="truncate text-sm text-muted-foreground">{{ profileUser.username }}</p>
@if (profileUser.gameActivity; as activity) {
<div class="mt-3 flex items-center gap-2 rounded-md border border-border bg-background/40 px-2.5 py-2">
@if (activity.iconUrl) {
<img
class="h-9 w-9 rounded-md object-cover"
[src]="activity.iconUrl"
[alt]="activity.name"
/>
} @else {
<div class="grid h-9 w-9 place-items-center rounded-md bg-secondary text-muted-foreground">
<ng-icon
name="lucideGamepad2"
class="h-4 w-4"
/>
</div>
}
<div class="min-w-0 flex-1">
<p class="truncate text-xs text-muted-foreground">Playing</p>
@if (activity.store?.url) {
<button
type="button"
class="block max-w-full truncate text-left text-sm font-medium text-foreground hover:underline"
(click)="openGameStore(activity, $event)"
>
{{ activity.name }}
</button>
} @else {
<p class="truncate text-sm font-medium text-foreground">{{ activity.name }}</p>
}
<p class="text-xs text-muted-foreground">{{ gameActivityElapsed() }}</p>
</div>
</div>
}
@if (profileUser.description) {
<p class="mt-2 whitespace-pre-line text-sm leading-5 text-muted-foreground">{{ profileUser.description }}</p>
}