feat: densificar TaskItem con emoji y contador; mantener 0 responsables

Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
webui
borja 2 weeks ago
parent 3db4154499
commit 9e26f0c05c

@ -38,10 +38,10 @@
let showAssignees = false; let showAssignees = false;
let assigneesButtonEl: HTMLButtonElement | null = null; let assigneesButtonEl: HTMLButtonElement | null = null;
$: assigneesCount = Array.isArray(assignees) ? assignees.length : 0; $: assigneesCount = Array.isArray(assignees) ? assignees.length : 0;
$: assigneesLabel = $: assigneesAria =
assigneesCount === 0 assigneesCount === 0
? "Sin responsable" ? "Sin responsables"
: `Responsables: ${assigneesCount}${isAssigned ? " (tú)" : ""}`; : `${assigneesCount} responsable${assigneesCount === 1 ? "" : "s"}${isAssigned ? "; tú incluido" : ""}`;
onDestroy(() => { onDestroy(() => {
// Cerrar popover si se desmonta el item (por navegación o filtrado) // Cerrar popover si se desmonta el item (por navegación o filtrado)
@ -286,7 +286,7 @@
</span> </span>
{/if} {/if}
</div> </div>
<div class="assignees"> <div class="actions">
{#if assigneesCount === 0} {#if assigneesCount === 0}
<button <button
class="assignees-badge empty" class="assignees-badge empty"
@ -294,7 +294,7 @@
aria-haspopup="dialog" aria-haspopup="dialog"
aria-expanded="false" aria-expanded="false"
aria-controls={"assignees-popover-" + id} aria-controls={"assignees-popover-" + id}
title="Sin responsable" title="Sin responsables"
disabled disabled
bind:this={assigneesButtonEl} bind:this={assigneesButtonEl}
> >
@ -307,15 +307,15 @@
aria-haspopup="dialog" aria-haspopup="dialog"
aria-expanded={showAssignees} aria-expanded={showAssignees}
aria-controls={"assignees-popover-" + id} aria-controls={"assignees-popover-" + id}
title="Ver responsables" title={assigneesAria}
aria-label={assigneesAria}
on:click|preventDefault={() => (showAssignees = true)} on:click|preventDefault={() => (showAssignees = true)}
bind:this={assigneesButtonEl} bind:this={assigneesButtonEl}
> >
👥 {assigneesLabel} <span class="icon" aria-hidden="true">👥</span>
<span class="count">{assigneesCount}</span>
</button> </button>
{/if} {/if}
</div>
<div class="actions">
{#if !completed} {#if !completed}
{#if !isAssigned} {#if !isAssigned}
<button <button
@ -496,12 +496,6 @@
.date-badge.soon { .date-badge.soon {
border-color: var(--color-warning); border-color: var(--color-warning);
} }
.assignees {
grid-row: 3/4;
grid-column: 1/2;
text-align: left;
align-self: end;
}
.assignee { .assignee {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
@ -514,15 +508,15 @@
} }
.actions { .actions {
justify-self: center; justify-self: stretch;
grid-column: 2/3; grid-column: 1/3;
grid-row: 3/4; grid-row: 3/4;
margin-bottom: 4px; margin: 2px 0 4px 0;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 6px; gap: 6px;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-start;
} }
.btn { .btn {
padding: 4px 8px; padding: 4px 8px;
@ -606,6 +600,14 @@
font-size: 12px; font-size: 12px;
cursor: pointer; cursor: pointer;
} }
.assignees-badge .icon {
font-size: 16px;
line-height: 1;
}
.assignees-badge .count {
font-size: 12px;
line-height: 1;
}
.assignees-badge[aria-expanded="true"] { .assignees-badge[aria-expanded="true"] {
border-color: var(--color-primary); border-color: var(--color-primary);
} }

@ -106,7 +106,7 @@
color: var(--color-text); color: var(--color-text);
border: 1px solid var(--color-border); border: 1px solid var(--color-border);
border-radius: 10px; border-radius: 10px;
box-shadow: var(--shadow-lg); box-shadow: var(--shadow-md);
padding: 12px; padding: 12px;
outline: none; outline: none;
} }

Loading…
Cancel
Save