feat(frontend): partial user lookup

This commit is contained in:
sam 2024-12-28 11:39:22 -05:00
parent 9d3d46bf33
commit db22e35f0d
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
7 changed files with 157 additions and 3 deletions

View file

@ -2,8 +2,8 @@
import { t } from "$lib/i18n";
import type { AuthMethod } from "$api/models";
type Props = { method: AuthMethod; canRemove: boolean };
let { method, canRemove }: Props = $props();
type Props = { method: AuthMethod; canRemove: boolean; showType?: boolean };
let { method, canRemove, showType }: Props = $props();
let name = $derived(
method.type === "EMAIL" ? method.remote_id : (method.remote_username ?? method.remote_id),
@ -14,6 +14,9 @@
<div class="list-group-item">
<div class="row">
<div class="col">
{#if showType}
<code>{method.type}</code>:
{/if}
{name}
{#if showId}({method.remote_id}){/if}
</div>