diff --git a/src/lib/components/CommandPalette/CommandPalette.svelte b/src/lib/components/CommandPalette/CommandPalette.svelte index 9f8b0367c..6c4028ead 100644 --- a/src/lib/components/CommandPalette/CommandPalette.svelte +++ b/src/lib/components/CommandPalette/CommandPalette.svelte @@ -7,6 +7,7 @@ import Commit from './Commit.svelte'; import Replay from './Replay.svelte'; import Branch from './Branch.svelte'; + import { currentProject } from '$lib/current_project'; let dialog: ComponentType | undefined; @@ -49,13 +50,19 @@ window, { c: () => { - dialog === Commit ? (dialog = undefined) : (dialog = Commit); + if ($currentProject) { + dialog === Commit ? (dialog = undefined) : (dialog = Commit); + } }, r: () => { - dialog === Replay ? (dialog = undefined) : (dialog = Replay); + if ($currentProject) { + dialog === Replay ? (dialog = undefined) : (dialog = Replay); + } }, b: () => { - dialog === Branch ? (dialog = undefined) : (dialog = Branch); + if ($currentProject) { + dialog === Branch ? (dialog = undefined) : (dialog = Branch); + } } }, true // disabled when an input is focused diff --git a/src/lib/components/CommandPalette/Replay.svelte b/src/lib/components/CommandPalette/Replay.svelte index 59f12ef8c..7ca8279fa 100644 --- a/src/lib/components/CommandPalette/Replay.svelte +++ b/src/lib/components/CommandPalette/Replay.svelte @@ -1,7 +1,104 @@ -

Replay Working History

+
+

+ Replay working history from... +

+ + +