summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'packages/app/src/pages')
-rw-r--r--packages/app/src/pages/layout.tsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/app/src/pages/layout.tsx b/packages/app/src/pages/layout.tsx
index fe8618b73..ba888a280 100644
--- a/packages/app/src/pages/layout.tsx
+++ b/packages/app/src/pages/layout.tsx
@@ -1139,6 +1139,29 @@ export default function Layout(props: ParentProps) {
},
},
{
+ id: "workspace.toggle",
+ title: language.t("command.workspace.toggle"),
+ description: language.t("command.workspace.toggle.description"),
+ category: language.t("command.category.workspace"),
+ slash: "workspace",
+ disabled: !currentProject() || currentProject()?.vcs !== "git",
+ onSelect: () => {
+ const project = currentProject()
+ if (!project) return
+ if (project.vcs !== "git") return
+ const wasEnabled = layout.sidebar.workspaces(project.worktree)()
+ layout.sidebar.toggleWorkspaces(project.worktree)
+ showToast({
+ title: wasEnabled
+ ? language.t("toast.workspace.disabled.title")
+ : language.t("toast.workspace.enabled.title"),
+ description: wasEnabled
+ ? language.t("toast.workspace.disabled.description")
+ : language.t("toast.workspace.enabled.description"),
+ })
+ },
+ },
+ {
id: "theme.cycle",
title: language.t("command.theme.cycle"),
category: language.t("command.category.theme"),