Apply linen design system across app
This commit is contained in:
@@ -107,10 +107,10 @@ export function DutyManager({
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>
|
||||
<Button variant="ghost" size="sm" className="h-8 gap-1">
|
||||
<Shield className="h-4 w-4" />
|
||||
<Shield className="h-3.5 w-3.5" />
|
||||
<span className="hidden sm:inline">Ämter</span>
|
||||
{userAssignments.length > 0 && (
|
||||
<Badge variant="secondary" className="ml-1 px-1 py-0 h-4">
|
||||
<Badge variant="secondary" className="ml-1 h-4 px-1 py-0 tabular-nums">
|
||||
{userAssignments.length}
|
||||
</Badge>
|
||||
)}
|
||||
@@ -127,16 +127,20 @@ export function DutyManager({
|
||||
<div className="flex flex-col gap-6 py-4">
|
||||
{/* Current Assignments */}
|
||||
<div className="flex flex-col gap-2">
|
||||
<h4 className="text-sm font-semibold">Aktuelle Ämter</h4>
|
||||
<h4 className="text-[11px] font-semibold uppercase text-[var(--ink-muted)] [letter-spacing:0.12em]">
|
||||
Aktuelle Ämter
|
||||
</h4>
|
||||
{userAssignments.length === 0 ? (
|
||||
<p className="text-sm text-muted-foreground italic">Keine Ämter zugewiesen.</p>
|
||||
<p className="rounded-lg border border-dashed border-[var(--hairline)] bg-[var(--surface-2)] px-4 py-5 text-sm italic text-[var(--ink-faint)]">
|
||||
Keine Ämter zugewiesen.
|
||||
</p>
|
||||
) : (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{userAssignments.map((assignment) => (
|
||||
<Badge key={assignment.id} variant="default" className="gap-1 pr-1 bg-primary">
|
||||
<Badge key={assignment.id} variant="default" className="gap-1 pr-1">
|
||||
{assignment.duty.name}
|
||||
<button
|
||||
className="ml-1 rounded-full hover:bg-primary-foreground/20 p-0.5"
|
||||
className="ml-1 rounded-full p-0.5 transition-colors hover:bg-[oklch(0.98_0.005_45_/_0.18)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[oklch(0.98_0.005_45)]"
|
||||
onClick={() => handleRemove(assignment.id)}
|
||||
disabled={isPending}
|
||||
>
|
||||
@@ -149,17 +153,21 @@ export function DutyManager({
|
||||
</div>
|
||||
|
||||
{/* Assign new duty */}
|
||||
<div className="flex flex-col gap-2 border-t pt-4">
|
||||
<h4 className="text-sm font-semibold">Vorhandenes Amt zuweisen</h4>
|
||||
<div className="flex flex-col gap-2 border-t border-[var(--hairline-soft)] pt-4">
|
||||
<h4 className="text-[11px] font-semibold uppercase text-[var(--ink-muted)] [letter-spacing:0.12em]">
|
||||
Vorhandenes Amt zuweisen
|
||||
</h4>
|
||||
{unassignedDuties.length === 0 ? (
|
||||
<p className="text-sm text-muted-foreground italic">Keine weiteren Ämter verfügbar.</p>
|
||||
<p className="text-sm italic text-[var(--ink-faint)]">
|
||||
Keine weiteren Ämter verfügbar.
|
||||
</p>
|
||||
) : (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{unassignedDuties.map((duty) => (
|
||||
<Badge
|
||||
key={duty.id}
|
||||
variant="outline"
|
||||
className="cursor-pointer hover:bg-muted gap-1 pr-1 group relative"
|
||||
className="group relative cursor-pointer gap-1 pr-1 hover:border-[var(--accent-mid)] hover:bg-[var(--accent-soft)] hover:text-[var(--accent-deep)]"
|
||||
onClick={() => handleAssign(duty.id)}
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
@@ -168,7 +176,7 @@ export function DutyManager({
|
||||
{/* Only show delete if no one is assigned to it across the entire DB */}
|
||||
{duty.assignments.length === 0 && (
|
||||
<button
|
||||
className="ml-1 rounded-full hover:bg-destructive/20 text-destructive p-0.5 opacity-0 group-hover:opacity-100 transition-opacity"
|
||||
className="ml-1 rounded-full p-0.5 text-[var(--danger)] opacity-0 transition-opacity hover:bg-[var(--danger-soft)] group-hover:opacity-100"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleDeleteDuty(duty.id);
|
||||
@@ -186,8 +194,10 @@ export function DutyManager({
|
||||
</div>
|
||||
|
||||
{/* Create new duty */}
|
||||
<div className="flex flex-col gap-2 border-t pt-4">
|
||||
<h4 className="text-sm font-semibold">Neues Amt anlegen</h4>
|
||||
<div className="flex flex-col gap-2 border-t border-[var(--hairline-soft)] pt-4">
|
||||
<h4 className="text-[11px] font-semibold uppercase text-[var(--ink-muted)] [letter-spacing:0.12em]">
|
||||
Neues Amt anlegen
|
||||
</h4>
|
||||
<form action={handleCreateDuty} className="flex gap-2">
|
||||
<Input name="name" placeholder="z.B. Wäschedienst" className="h-8" required />
|
||||
<Button size="sm" className="h-8" disabled={isPending}>
|
||||
|
||||
Reference in New Issue
Block a user