Hide /share if disabled (#4215)

This commit is contained in:
Aiden Cline
2025-11-11 12:47:39 -08:00
committed by GitHub
parent e5bc4cbbcf
commit e1fc4a756b
2 changed files with 35 additions and 28 deletions

View File

@@ -217,12 +217,6 @@ export function Autocomplete(props: {
description: "compact the session",
onSelect: () => command.trigger("session.compact"),
},
{
display: "/share",
disabled: !!s.share?.url,
description: "share a session",
onSelect: () => command.trigger("session.share"),
},
{
display: "/unshare",
disabled: !s.share,
@@ -250,7 +244,16 @@ export function Autocomplete(props: {
onSelect: () => command.trigger("session.timeline"),
},
)
if (sync.data.config.share !== "disabled") {
results.push({
display: "/share",
disabled: !!s.share?.url,
description: "share a session",
onSelect: () => command.trigger("session.share"),
})
}
}
results.push(
{
display: "/new",