feat(UI): Always show the selected focus mode

This commit is contained in:
Willie Zutz 2025-05-19 23:31:29 -06:00
parent 5b1c3a4970
commit 67287b0604

View file

@ -75,20 +75,13 @@ const Focus = ({
type="button" type="button"
className=" text-black/50 dark:text-white/50 rounded-xl hover:bg-light-secondary dark:hover:bg-dark-secondary active:scale-95 transition duration-200 hover:text-black dark:hover:text-white" className=" text-black/50 dark:text-white/50 rounded-xl hover:bg-light-secondary dark:hover:bg-dark-secondary active:scale-95 transition duration-200 hover:text-black dark:hover:text-white"
> >
{focusMode !== 'webSearch' ? ( <div className="flex flex-row items-center space-x-1">
<div className="flex flex-row items-center space-x-1"> {focusModes.find((mode) => mode.key === focusMode)?.icon}
{focusModes.find((mode) => mode.key === focusMode)?.icon} <p className="text-xs font-medium hidden lg:block">
<p className="text-xs font-medium hidden lg:block"> {focusModes.find((mode) => mode.key === focusMode)?.title}
{focusModes.find((mode) => mode.key === focusMode)?.title} </p>
</p> <ChevronDown size={20} className="-translate-x-1" />
<ChevronDown size={20} className="-translate-x-1" /> </div>
</div>
) : (
<div className="flex flex-row items-center space-x-1">
<ScanEye size={20} />
<p className="text-xs font-medium hidden lg:block">Focus</p>
</div>
)}
</PopoverButton> </PopoverButton>
<Transition <Transition
as={Fragment} as={Fragment}