fix: put quick ask feature toggle under experimental feature (#2338)

This commit is contained in:
Louis 2024-03-13 10:18:20 +07:00 committed by GitHub
parent fb893b89f3
commit bff20ab87b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -437,33 +437,35 @@ const Advanced = () => {
/> />
</div> </div>
<div className="flex w-full items-start justify-between border-b border-border py-4 first:pt-0 last:border-none"> {experimentalEnabled && (
<div className="flex-shrink-0 space-y-1.5"> <div className="flex w-full items-start justify-between border-b border-border py-4 first:pt-0 last:border-none">
<div className="flex gap-x-2"> <div className="flex-shrink-0 space-y-1.5">
<h6 className="text-sm font-semibold capitalize"> <div className="flex gap-x-2">
Jan Quick Ask <h6 className="text-sm font-semibold capitalize">
</h6> Jan Quick Ask
</h6>
</div>
<p className="leading-relaxed">
Enable Quick Ask to be triggered via the default hotkey{' '}
<div className="inline-flex items-center justify-center rounded-full bg-secondary px-1 py-0.5 text-xs font-bold text-muted-foreground">
<span className="font-bold">{isMac ? '⌘' : 'Ctrl'} + J</span>
</div>{' '}
(reload needed).
</p>
</div> </div>
<p className="leading-relaxed"> <Switch
Enable Quick Ask to be triggered via the default hotkey{' '} checked={quickAskEnabled}
<div className="inline-flex items-center justify-center rounded-full bg-secondary px-1 py-0.5 text-xs font-bold text-muted-foreground"> onCheckedChange={() => {
<span className="font-bold">{isMac ? '⌘' : 'Ctrl'} + J</span> toaster({
</div>{' '} title: 'Reload',
(reload needed). description:
</p> 'Quick Ask settings updated. Reload now to apply the changes.',
})
updateQuickAskEnabled(!quickAskEnabled)
}}
/>
</div> </div>
<Switch )}
checked={quickAskEnabled}
onCheckedChange={() => {
toaster({
title: 'Reload',
description:
'Quick Ask settings updated. Reload now to apply the changes.',
})
updateQuickAskEnabled(!quickAskEnabled)
}}
/>
</div>
{/* Clear log */} {/* Clear log */}
<div className="flex w-full items-start justify-between border-b border-border py-4 first:pt-0 last:border-none"> <div className="flex w-full items-start justify-between border-b border-border py-4 first:pt-0 last:border-none">