diff --git a/src/lib/client/ui/modal/SaveTargetModal.svelte b/src/lib/client/ui/modal/SaveTargetModal.svelte index c400b21..b9dcea7 100644 --- a/src/lib/client/ui/modal/SaveTargetModal.svelte +++ b/src/lib/client/ui/modal/SaveTargetModal.svelte @@ -3,12 +3,25 @@ import { X, User, GitBranch } from 'lucide-svelte'; export let open = false; + export let mode: 'save' | 'delete' = 'save'; const dispatch = createEventDispatcher<{ select: 'user' | 'base'; cancel: void; }>(); + $: title = mode === 'save' ? 'Where to save?' : 'Where to delete from?'; + $: userLabel = mode === 'save' ? 'Personal Override' : 'Remove Personal Override'; + $: userDescription = + mode === 'save' + ? "Save locally only. Changes won't sync upstream and stay on this machine." + : 'Remove your local override. The base database version will apply.'; + $: baseLabel = mode === 'save' ? 'Contribute to Database' : 'Delete from Database'; + $: baseDescription = + mode === 'save' + ? "Add to base operations. You'll need to commit and push manually." + : "Create a delete operation. You'll need to commit and push manually."; + function handleSelect(layer: 'user' | 'base') { dispatch('select', layer); } @@ -54,7 +67,7 @@ >
No uncommitted changes
+| + + | ++ Operation + | ++ Entity + | ++ Name + | ++ File + | +
|---|---|---|---|---|
|
+
+ {#if selected.has(op.filepath)}
+
+ |
+ + + {formatOperation(op.operation)} + + | ++ {op.entity || '-'} + | ++ {#if op.previousName && op.previousName !== op.name} + {op.previousName} + → + {op.name || '-'} + {:else} + {op.name || '-'} + {/if} + | ++ + {op.filename} + + | +
+ {repoInfo.owner}/{repoInfo.repo}
+
+
+ {repoInfo.stars.toLocaleString()}
+
+
+ {repoInfo.forks.toLocaleString()}
+
+
+ {repoInfo.openIssues.toLocaleString()}
+
+ {status.ahead}
+ {status.behind}
+ Commits
+
+