This commit is contained in:
2026-06-28 00:34:43 +02:00
parent 433085a895
commit 5a0a8bdecb
2 changed files with 108 additions and 63 deletions
+8 -6
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import { onDestroy, onMount } from "svelte";
import { AlertCircle, Check, GitMerge, LoaderCircle } from "@lucide/svelte";
import { AlertCircle, Check, GitBranch, GitMerge, LoaderCircle } from "@lucide/svelte";
import TitleBar from "./lib/TitleBar.svelte";
import BranchPanel from "./lib/components/BranchPanel.svelte";
@@ -639,13 +639,15 @@
<!-- Center: summary + status + commit + file history + compare -->
<section class="main-panel" aria-label="Repository status">
<div class="repo-summary">
<div>
<span class="eyebrow">Current repo</span>
<h1>{status?.current_branch ?? "No repository"}</h1>
<p>{activeRepoPath || "Enter a path and open a repository."}</p>
<div class="repo-meta">
<GitBranch size={13} aria-hidden="true" />
<strong class="repo-branch">{status?.current_branch ?? "No repository"}</strong>
{#if activeRepoPath}
<span class="repo-path" title={activeRepoPath}>{activeRepoPath}</span>
{/if}
</div>
<div class="sync-stats" aria-label="Sync state">
<span title="Upstream">{status?.upstream ?? "No upstream"}</span>
{#if status?.upstream}<span title="Upstream">{status.upstream}</span>{/if}
<strong>{status?.ahead ?? 0} ahead</strong>
<strong>{status?.behind ?? 0} behind</strong>
</div>
+95 -52
View File
@@ -104,11 +104,11 @@
align-items: center;
justify-content: space-between;
gap: 12px;
min-height: 58px;
padding: 12px;
min-height: 46px;
padding: 8px 12px;
border-bottom: 1px solid var(--color-border-subtle);
}
.section-head h2 { margin: 1px 0 0; color: var(--color-ink); font-size: 16px; line-height: 1.2; }
.section-head h2 { margin: 1px 0 0; color: var(--color-ink); font-size: 14px; line-height: 1.2; }
.eyebrow {
display: block;
@@ -134,8 +134,8 @@
.blank-state {
display: grid;
place-items: center;
min-height: 120px;
padding: 18px;
min-height: 72px;
padding: 14px;
color: var(--color-ink-faint);
font-size: 13px;
text-align: center;
@@ -174,8 +174,8 @@
flex-direction: column;
flex: 1 1 0;
min-height: 0;
padding: 0 12px 12px;
gap: 10px;
padding: 0 10px 10px;
gap: 8px;
}
/* --- Titlebar --- */
@@ -277,7 +277,7 @@
/* --- Top bar (repo form) --- */
.topbar { padding: 10px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.topbar { padding: 7px 10px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.repo-form {
display: grid;
@@ -293,11 +293,12 @@
display: flex;
align-items: center;
gap: 8px;
min-height: 36px;
padding: 8px 11px;
min-height: 32px;
padding: 5px 11px;
border: 1px solid;
border-radius: 8px;
font-size: 13px;
flex-shrink: 0;
}
.notice.error { border-color: #e8aaa4; color: #8e2d27; background: #fff4f2; }
.notice.busy { border-color: #a7cfe2; color: #245d78; background: #edf8fd; }
@@ -317,19 +318,19 @@
.workspace {
display: grid;
grid-template-columns: clamp(240px, 22vw, 320px) minmax(0, 1fr) clamp(300px, 30vw, 440px);
grid-template-columns: clamp(220px, 20vw, 300px) minmax(0, 1fr) clamp(280px, 28vw, 420px);
flex: 1 1 0;
min-height: 0;
gap: 10px;
gap: 8px;
}
.history-aside { display: grid; min-height: 0; }
.left-sidebar {
display: grid;
grid-template-rows: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
grid-template-rows: minmax(200px, 0.9fr) minmax(240px, 1.1fr);
min-height: 0;
gap: 10px;
gap: 8px;
}
/* --- Main panel --- */
@@ -341,36 +342,71 @@
border: 1px solid var(--color-border);
border-radius: 8px;
background: var(--color-surface);
overflow: auto;
overflow: hidden;
}
.repo-summary {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 16px;
height: 46px;
padding: 0 14px;
border-bottom: 1px solid var(--color-border-subtle);
overflow: hidden;
flex-shrink: 0;
}
.repo-summary h1 { margin: 1px 0 0; font-size: 24px; line-height: 1.15; }
.repo-summary p { overflow: hidden; margin: 5px 0 0; color: var(--color-ink-dim); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sync-stats, .status-counts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.repo-meta {
display: flex;
align-items: center;
gap: 7px;
min-width: 0;
overflow: hidden;
}
.repo-meta svg { color: var(--color-accent); flex-shrink: 0; }
.repo-branch {
font-size: 13px;
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex-shrink: 0;
max-width: 220px;
}
.repo-path {
color: var(--color-ink-dim);
font-size: 11.5px;
font-family: var(--font-mono);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sync-stats, .status-counts { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; flex-shrink: 0; }
.sync-stats strong, .sync-stats span {
padding: 2px 7px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
white-space: nowrap;
}
.sync-stats strong:first-of-type { color: #8a4c0e; background: #fff2d7; }
.sync-stats strong:last-of-type { color: #255b8b; background: #e7f1fb; }
.sync-stats span { color: #4f5d66; background: #edf0f2; }
.top-section {
display: grid;
grid-template-columns: minmax(0, 1fr) 360px;
grid-template-columns: minmax(0, 1fr) 340px;
min-height: 0;
gap: 10px;
padding: 10px;
gap: 8px;
padding: 8px;
overflow: hidden;
}
.file-history-section {
min-height: 0;
padding: 0 10px 10px;
padding: 0 8px 8px;
overflow: hidden;
display: grid;
}
@@ -1018,47 +1054,54 @@
/* --- Responsive breakpoints --- */
/* Large desktop */
@media (min-width: 1800px) {
.workspace { grid-template-columns: 340px minmax(0, 1fr) 480px; }
.top-section { grid-template-columns: minmax(0, 1fr) 400px; }
}
/* Medium-large: compress sidebars a bit */
@media (max-width: 1400px) {
.workspace { grid-template-columns: clamp(220px, 20vw, 300px) minmax(0, 1fr) clamp(280px, 28vw, 400px); }
.workspace { grid-template-columns: clamp(200px, 18vw, 280px) minmax(0, 1fr) clamp(260px, 26vw, 380px); }
}
@media (max-width: 1180px) {
.workspace { grid-template-columns: clamp(200px, 18vw, 260px) minmax(0, 1fr) clamp(260px, 26vw, 340px); }
.top-section { grid-template-columns: minmax(0, 1fr); }
.file-history-section { padding: 0 10px 10px; }
.repo-summary h1 { font-size: 20px; }
/* Medium: stack CommitPanel below StatusPanel */
@media (max-width: 1100px) {
.workspace { grid-template-columns: clamp(190px, 17vw, 240px) minmax(0, 1fr) clamp(230px, 22vw, 300px); }
.top-section { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
}
@media (max-width: 980px) {
.workspace { grid-template-columns: 200px minmax(0, 1fr) 240px; }
.left-sidebar { grid-template-rows: minmax(180px, 0.8fr) minmax(220px, 1.2fr); }
.section-head { min-height: 50px; padding: 10px; }
.repo-summary { padding: 12px; }
/* Compact: very narrow sidebars, reduce chrome */
@media (max-width: 960px) {
.workspace { grid-template-columns: 190px minmax(0, 1fr) 190px; gap: 6px; }
.shell-body { gap: 6px; }
.left-sidebar { gap: 6px; grid-template-rows: minmax(180px, 0.8fr) minmax(200px, 1.2fr); }
.section-head { min-height: 40px; padding: 6px 10px; }
.repo-summary { height: 40px; padding: 0 10px; }
.repo-branch { max-width: 160px; }
.repo-path { display: none; }
.sync-stats span { display: none; }
.branch-actions { flex-direction: column; align-items: flex-end; gap: 4px; }
.branch-actions button { width: 100%; }
.tb-action-label { display: none; }
}
@media (max-width: 860px) {
/* Narrow: single column, vertical scroll */
@media (max-width: 740px) {
body { overflow: auto; }
.shell-body { min-height: 100%; }
.shell-body { min-height: 100%; gap: 6px; }
.workspace { grid-template-columns: 1fr; gap: 6px; }
.left-sidebar { grid-template-rows: minmax(200px, 1fr) minmax(240px, 1.2fr); min-height: 440px; }
.history-aside { min-height: 320px; }
.top-section { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.repo-form { grid-template-columns: 1fr; }
.workspace { grid-template-columns: 1fr; }
.repo-summary { grid-template-columns: 1fr; }
.change-lanes, .compare-form { grid-template-columns: 1fr; }
.repo-path { display: none; }
.repo-summary { height: 40px; }
.change-lanes { grid-template-columns: 1fr; }
.compare-form { grid-template-columns: 1fr; }
.compare-arrow { display: none; }
.dialog-body { grid-template-columns: 1fr; grid-template-rows: minmax(120px, 0.4fr) minmax(0, 1fr); }
.dialog-files { border-right: none; border-bottom: 1px solid var(--color-border-subtle); }
.sync-stats { justify-content: flex-start; }
.branch-actions { flex-direction: row; justify-content: flex-start; }
.tb-action-label { display: none; }
.history-aside { min-height: 480px; }
.branches { min-height: 260px; }
.left-sidebar { min-height: 560px; }
.change-lane { grid-template-columns: auto auto; }
.lane-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (min-width: 1800px) {
.workspace { grid-template-columns: 360px minmax(0, 1fr) 500px; }
.top-section { grid-template-columns: minmax(0, 1fr) 420px; }
}