feat(git): add stash push with optional paths and per-file scope
The stash push feature now supports limiting the stash to selected files via an optional paths parameter. The UI passes file paths to stash_push and adds a per-file context menu for scoped stash operations. - Extend stash API to accept optional paths for scoped stashes - Implement per-file stash actions via a status panel context menu - Update tests and docs to reflect scoped stash behavior
This commit is contained in:
+131
@@ -2327,6 +2327,7 @@
|
||||
.branch-context-menu,
|
||||
.history-context-menu,
|
||||
.explorer-context-menu,
|
||||
.status-context-menu,
|
||||
.repo-tab-context-menu {
|
||||
z-index: 120;
|
||||
display: grid;
|
||||
@@ -2346,11 +2347,102 @@
|
||||
}
|
||||
.history-context-menu { position: absolute; }
|
||||
.explorer-context-menu,
|
||||
.status-context-menu,
|
||||
.repo-tab-context-menu { position: fixed; }
|
||||
|
||||
.status-context-menu {
|
||||
width: min(280px, calc(100vw - 16px));
|
||||
padding: 6px;
|
||||
border-color: color-mix(in srgb, var(--color-border) 78%, #5a8cf8);
|
||||
background:
|
||||
linear-gradient(180deg, rgba(90,140,248,0.045), transparent 70px),
|
||||
var(--color-surface-solid);
|
||||
}
|
||||
|
||||
.status-context-label {
|
||||
display: grid;
|
||||
grid-template-columns: 32px minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
min-width: 0;
|
||||
margin: -1px -1px 5px;
|
||||
padding: 8px 8px 10px;
|
||||
border-bottom: 1px solid var(--color-border-subtle);
|
||||
}
|
||||
|
||||
.status-context-object-icon,
|
||||
.status-context-action-icon {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
flex: 0 0 auto;
|
||||
color: #83adff;
|
||||
background: rgba(90,140,248,0.12);
|
||||
border: 1px solid rgba(90,140,248,0.2);
|
||||
}
|
||||
|
||||
.status-context-object-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.status-context-object-copy,
|
||||
.status-context-action-copy {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.status-context-kind {
|
||||
margin-bottom: 2px;
|
||||
color: var(--color-ink-faint);
|
||||
font-size: 8.5px;
|
||||
font-weight: 800;
|
||||
letter-spacing: .1em;
|
||||
line-height: 1;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.status-context-object-copy > strong {
|
||||
overflow: hidden;
|
||||
color: var(--color-ink);
|
||||
font-size: 12.5px;
|
||||
line-height: 1.25;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status-context-path {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
margin-top: 2px;
|
||||
overflow: hidden;
|
||||
color: var(--color-ink-faint);
|
||||
font: 9.5px/1.2 var(--font-mono);
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status-context-path svg { flex: 0 0 auto; }
|
||||
|
||||
.status-context-count {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
min-width: 20px;
|
||||
height: 20px;
|
||||
padding: 0 5px;
|
||||
border: 1px solid rgba(90,140,248,0.18);
|
||||
border-radius: 5px;
|
||||
color: #83adff;
|
||||
background: rgba(90,140,248,0.1);
|
||||
font: 700 9.5px/1 var(--font-mono);
|
||||
}
|
||||
|
||||
.branch-context-menu button,
|
||||
.history-context-menu button,
|
||||
.explorer-context-menu button,
|
||||
.status-context-menu button,
|
||||
.repo-tab-context-menu button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -2368,15 +2460,52 @@
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.status-context-menu button {
|
||||
min-height: 42px;
|
||||
gap: 9px;
|
||||
padding: 6px 7px;
|
||||
}
|
||||
|
||||
.status-context-action-icon {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border-color: transparent;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--color-ink-dim);
|
||||
}
|
||||
|
||||
.status-context-action-copy { gap: 1px; }
|
||||
.status-context-action-copy strong {
|
||||
color: var(--color-ink-muted);
|
||||
font-size: 11.5px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
.status-context-action-copy span {
|
||||
color: var(--color-ink-faint);
|
||||
font-size: 9.5px;
|
||||
font-weight: 500;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.branch-context-menu button:hover:not(:disabled),
|
||||
.history-context-menu button:hover:not(:disabled),
|
||||
.explorer-context-menu button:hover:not(:disabled),
|
||||
.status-context-menu button:hover:not(:disabled),
|
||||
.repo-tab-context-menu button:hover:not(:disabled) {
|
||||
border-color: var(--color-border-subtle);
|
||||
background: rgba(255,255,255,0.06);
|
||||
color: var(--color-ink);
|
||||
}
|
||||
|
||||
.status-context-menu button:hover:not(:disabled) .status-context-action-icon {
|
||||
color: #9bbcff;
|
||||
background: rgba(90,140,248,0.1);
|
||||
}
|
||||
.status-context-menu button:hover:not(:disabled) .status-context-action-copy strong {
|
||||
color: var(--color-ink);
|
||||
}
|
||||
|
||||
.branch-context-menu .menu-separator,
|
||||
.history-context-menu .menu-separator,
|
||||
.repo-tab-context-menu .menu-separator {
|
||||
@@ -2398,6 +2527,7 @@
|
||||
.branch-context-menu button:disabled,
|
||||
.history-context-menu button:disabled,
|
||||
.explorer-context-menu button:disabled,
|
||||
.status-context-menu button:disabled,
|
||||
.repo-tab-context-menu button:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.48;
|
||||
@@ -7651,6 +7781,7 @@ input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px color-mix(in s
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-rows: minmax(0, 1fr) 25px minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.status-flow-divider::before {
|
||||
inset-block: auto;
|
||||
inset-inline: 0;
|
||||
|
||||
Reference in New Issue
Block a user