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:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { Archive, Download, Trash2, Upload } from "@lucide/svelte";
|
||||
import { Archive, ChevronDown, ChevronRight, Download, Trash2, Upload } from "@lucide/svelte";
|
||||
import type { GitStash } from "../types";
|
||||
|
||||
interface Props {
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
let message = $state("");
|
||||
let includeUntracked = $state(true);
|
||||
let open = $state(false);
|
||||
|
||||
function submitPush() {
|
||||
onPush(message, includeUntracked);
|
||||
@@ -37,16 +38,33 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<section class="panel stash-panel overflow-hidden" aria-label="Git stash">
|
||||
<section class="panel stash-panel overflow-hidden" class:collapsed={!open} aria-label="Git stash">
|
||||
<div class="section-head">
|
||||
<div>
|
||||
<span class="eyebrow">Stash</span>
|
||||
<h2 class="mt-0.5 text-ink text-base font-bold leading-tight">Shelved changes</h2>
|
||||
</div>
|
||||
<span class="pill pill-count">{stashes.length}</span>
|
||||
<div class="stash-head-actions">
|
||||
<button
|
||||
class="stash-toggle"
|
||||
type="button"
|
||||
onclick={() => { open = !open; }}
|
||||
aria-expanded={open}
|
||||
title={open ? "Collapse stash panel" : "Expand stash panel"}
|
||||
>
|
||||
{#if open}
|
||||
<ChevronDown size={14} aria-hidden="true" />
|
||||
{:else}
|
||||
<ChevronRight size={14} aria-hidden="true" />
|
||||
{/if}
|
||||
</button>
|
||||
<span class="pill pill-count">{stashes.length}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if !hasRepository}
|
||||
{#if !open}
|
||||
<!-- collapsed -->
|
||||
{:else if !hasRepository}
|
||||
<div class="blank-state">No repository loaded.</div>
|
||||
{:else}
|
||||
<div class="stash-create">
|
||||
|
||||
Reference in New Issue
Block a user