feat(git): add rebase workflow with UI state handling
This introduces Git rebase commands (start, continue, abort) and exposes whether a rebase is currently in progress via the status payload. The UI now blocks committing during an active rebase and shows a dedicated rebase notice with continue/abort actions. - Add tauri commands for rebase operations and status detection - Update frontend to render rebase state and controls - Adjust conflict/resolution messaging and related UI styling
This commit is contained in:
+54
-1
@@ -862,6 +862,8 @@
|
||||
.notice.error { border-color: rgba(232,96,90,0.3); color: #f09090; background: rgba(232,96,90,0.08); }
|
||||
.notice.busy { border-color: rgba(90,140,248,0.28); color: #8ab0f8; background: rgba(90,140,248,0.07); }
|
||||
.notice.conflict { border-color: rgba(224,160,64,0.3); color: #e8b060; background: rgba(224,160,64,0.07); }
|
||||
.notice.rebase { flex-wrap: wrap; border-color: rgba(186,130,255,0.3); color: #c9a8ff; background: rgba(186,130,255,0.075); }
|
||||
.notice.rebase span { min-width: 0; flex: 1 1 auto; }
|
||||
.notice.conflict button {
|
||||
margin-left: auto;
|
||||
min-height: 26px;
|
||||
@@ -877,6 +879,20 @@
|
||||
border-color: rgba(224,160,64,0.45);
|
||||
color: #f0c070;
|
||||
}
|
||||
.notice.rebase button {
|
||||
min-height: 26px;
|
||||
padding: 0 10px;
|
||||
border-color: rgba(186,130,255,0.28);
|
||||
color: #d5bdff;
|
||||
background: rgba(186,130,255,0.1);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.notice.rebase button:hover:not(:disabled) {
|
||||
background: rgba(186,130,255,0.18);
|
||||
border-color: rgba(186,130,255,0.45);
|
||||
color: #eadfff;
|
||||
}
|
||||
|
||||
/* --- Update toast --- */
|
||||
|
||||
@@ -1110,6 +1126,10 @@
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.left-sidebar:has(.stash-panel.collapsed) {
|
||||
grid-template-rows: minmax(170px, 0.85fr) auto minmax(220px, 1.15fr);
|
||||
}
|
||||
|
||||
/* --- Main panel --- */
|
||||
|
||||
.main-panel {
|
||||
@@ -1276,6 +1296,36 @@
|
||||
grid-template-rows: auto auto minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.stash-panel.collapsed {
|
||||
grid-template-rows: auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.stash-head-actions {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.stash-toggle {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 26px;
|
||||
min-width: 26px;
|
||||
min-height: 26px;
|
||||
padding: 0;
|
||||
border-color: rgba(94,110,156,0.18);
|
||||
border-radius: 7px;
|
||||
color: var(--color-ink-dim);
|
||||
background: rgba(255,255,255,0.035);
|
||||
}
|
||||
|
||||
.stash-toggle:hover:not(:disabled) {
|
||||
border-color: rgba(65,209,255,0.28);
|
||||
color: var(--color-ink);
|
||||
background: rgba(65,209,255,0.08);
|
||||
}
|
||||
|
||||
.stash-create {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||
@@ -1585,7 +1635,8 @@
|
||||
.branch-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--color-ink); }
|
||||
.branch-info span { display: block; margin-top: 2px; color: var(--color-ink-dim); font-size: 11px; }
|
||||
|
||||
.branch-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
|
||||
.branch-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
|
||||
.branch-actions .btn-sm { min-height: 24px; padding: 0 6px; font-size: 11px; }
|
||||
|
||||
.branch-context-menu,
|
||||
.explorer-context-menu {
|
||||
@@ -3687,6 +3738,7 @@
|
||||
.history-resize-handle { display: none; }
|
||||
.shell-body { gap: 6px; }
|
||||
.left-sidebar { gap: 6px; grid-template-rows: minmax(150px, 0.7fr) minmax(145px, 0.55fr) minmax(190px, 1fr); }
|
||||
.left-sidebar:has(.stash-panel.collapsed) { grid-template-rows: minmax(150px, 0.8fr) auto minmax(190px, 1.1fr); }
|
||||
.section-head { min-height: 40px; padding: 6px 10px; }
|
||||
.repo-summary { height: 40px; padding: 0 10px; }
|
||||
.repo-branch { max-width: 160px; }
|
||||
@@ -3704,6 +3756,7 @@
|
||||
.workspace { grid-template-columns: 1fr; gap: 6px; }
|
||||
.history-aside { grid-template-columns: 1fr; grid-template-rows: minmax(200px, 1fr) minmax(150px, 0.5fr); min-height: 380px; }
|
||||
.left-sidebar { grid-template-rows: minmax(180px, 0.9fr) minmax(150px, 0.55fr) minmax(220px, 1fr); min-height: 560px; }
|
||||
.left-sidebar:has(.stash-panel.collapsed) { grid-template-rows: minmax(180px, 1fr) auto minmax(220px, 1.1fr); }
|
||||
.top-section { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 14px var(--commit-panel-height, 190px); }
|
||||
.repo-form { grid-template-columns: 1fr; }
|
||||
.repo-tabbar { grid-template-columns: minmax(0, 1fr) auto; }
|
||||
|
||||
Reference in New Issue
Block a user