{$t.nav?.dashboards }

{#if error}
{error}
{/if} {#if isLoading}
{#each Array(5) as _}
{/each}
{:else if dashboards.length === 0}

{$t.dashboard?.empty }

{:else}
{#if selectedIds.size > 0} {( $t.dashboard?.selected_count ).replace("{count}", String(selectedIds.size))} {/if}
{$t.dashboard?.title }
{$t.dashboard?.git_status }
{$t.dashboard?.last_task }
{$t.dashboard?.actions }
{#each dashboards as dashboard}
handleCheckboxChange(dashboard, e)} />
{dashboard.git?.hasRepo ? ($t.dashboard?.status_repo || "Repo") : ($t.dashboard?.status_no_repo || "No Repo")} {#if dashboard.git?.hasRepo} {dashboard.git?.hasChangesForCommit ? ($t.dashboard?.status_changes || "Diff") : ($t.dashboard?.status_no_changes || "Synced")} {/if}
{#if dashboard.lastTask}
handleTaskStatusClick(dashboard)} on:keydown={(e) => (e.key === "Enter" || e.key === " ") && handleTaskStatusClick(dashboard)} role="button" tabindex="0" aria-label={$t.dashboard?.view_task } > {@html getTaskStatusIcon(dashboard.lastTask.status)} {#if dashboard.lastTask.status.toLowerCase() === "running"} {$t.dashboard?.task_running } {:else if dashboard.lastTask.status.toLowerCase() === "success"} {$t.dashboard?.task_done } {:else if dashboard.lastTask.status.toLowerCase() === "error"} {$t.dashboard?.task_failed } {:else if dashboard.lastTask.status.toLowerCase() === "waiting_input"} {$t.dashboard?.task_waiting } {/if}
{:else} - {/if}
{#if !dashboard.git?.hasRepo} {:else} {/if}
{/each}
{#if totalPages > 1}
{($t.dashboard?.showing ) .replace("{start}", String((currentPage - 1) * pageSize + 1)) .replace("{end}", String(Math.min(currentPage * pageSize, total))) .replace("{total}", String(total))}
{#each getPaginationRange(currentPage, totalPages) as pageNum} {#if pageNum === "..."} ... {:else} {/if} {/each}
{/if} {#if selectedIds.size > 0}
✓ {( $t.dashboard?.selected_count ).replace("{count}", String(selectedIds.size))}
{/if} {/if} {#if showMigrateModal}
(showMigrateModal = false)} on:keydown={(e) => e.key === "Escape" && (showMigrateModal = false)} role="presentation" >
{/if} {#if showBackupModal}
(showBackupModal = false)} on:keydown={(e) => e.key === "Escape" && (showBackupModal = false)} role="presentation" >
{/if}