refactor: Wortwahl im Einladungsdialog und am Logo-Knopf
"Höchstens einlösbar" war kein Satz und kein Begriff, sondern beides
halb. Aus den Feldern wird "Gültigkeit in Tagen" und "Anzahl der
Einlösungen", aus den Hinweisen darunter ganze Saetze statt
Gleichungen ("0 = beliebig oft").
Auch der Hinweis an jedem Link liest sich jetzt wie Sprache: "unbegrenzt
gueltig" statt "ohne Ablauf", "noch nicht eingeloest" statt "0x
genutzt".
Und der Knopf "Logo" sagt jetzt, was er tut.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P32KoesVtABd6xWsqMKzhr
This commit is contained in:
parent
ea4e0bd80a
commit
ed3d261a2d
1 changed files with 13 additions and 7 deletions
|
|
@ -338,10 +338,14 @@
|
||||||
if (!invites.isValid(invite)) parts.push('abgelaufen')
|
if (!invites.isValid(invite)) parts.push('abgelaufen')
|
||||||
else if (invite.expires) {
|
else if (invite.expires) {
|
||||||
parts.push(`gültig bis ${new Date(invite.expires).toLocaleDateString('de-DE')}`)
|
parts.push(`gültig bis ${new Date(invite.expires).toLocaleDateString('de-DE')}`)
|
||||||
} else parts.push('ohne Ablauf')
|
} else parts.push('unbegrenzt gültig')
|
||||||
|
|
||||||
const max = invite.max_uses ?? 0
|
const max = invite.max_uses ?? 0
|
||||||
parts.push(max > 0 ? `${invite.uses ?? 0} von ${max} genutzt` : `${invite.uses ?? 0}× genutzt`)
|
const used = invite.uses ?? 0
|
||||||
|
if (max > 0) parts.push(`${used} von ${max} Einlösungen`)
|
||||||
|
else if (used === 0) parts.push('noch nicht eingelöst')
|
||||||
|
else if (used === 1) parts.push('einmal eingelöst')
|
||||||
|
else parts.push(`${used}-mal eingelöst`)
|
||||||
|
|
||||||
return parts.join(' · ')
|
return parts.join(' · ')
|
||||||
}
|
}
|
||||||
|
|
@ -449,7 +453,7 @@
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" size="sm" onclick={() => openLogo(team)}>
|
<Button variant="outline" size="sm" onclick={() => openLogo(team)}>
|
||||||
<Image class="size-4 mr-1" />
|
<Image class="size-4 mr-1" />
|
||||||
Logo
|
Logo festlegen
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" size="sm" onclick={() => (inviteDialog = true)}>
|
<Button variant="outline" size="sm" onclick={() => (inviteDialog = true)}>
|
||||||
<Link2 class="size-4 mr-1" />
|
<Link2 class="size-4 mr-1" />
|
||||||
|
|
@ -866,14 +870,16 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
<Label for="i-days">Gültig für (Tage)</Label>
|
<Label for="i-days">Gültigkeit in Tagen</Label>
|
||||||
<Input id="i-days" type="number" min="0" bind:value={inviteForm.days} />
|
<Input id="i-days" type="number" min="0" bind:value={inviteForm.days} />
|
||||||
<p class="text-xs text-muted-foreground">0 = läuft nicht ab.</p>
|
<p class="text-xs text-muted-foreground">Bei 0 läuft der Link nicht ab.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
<Label for="i-max">Höchstens einlösbar</Label>
|
<Label for="i-max">Anzahl der Einlösungen</Label>
|
||||||
<Input id="i-max" type="number" min="0" bind:value={inviteForm.maxUses} />
|
<Input id="i-max" type="number" min="0" bind:value={inviteForm.maxUses} />
|
||||||
<p class="text-xs text-muted-foreground">0 = beliebig oft.</p>
|
<p class="text-xs text-muted-foreground">
|
||||||
|
Bei 0 lässt er sich beliebig oft einlösen.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if inviteError}
|
{#if inviteError}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue