refac
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
|
||||
export let onShowValves: Function;
|
||||
export let onClose: Function;
|
||||
export let onWebSearchToggle: Function = () => {};
|
||||
export let closeOnOutsideClick = true;
|
||||
|
||||
let show = false;
|
||||
@@ -270,9 +271,12 @@
|
||||
<button
|
||||
class="flex w-full justify-between gap-2 items-center px-3 py-1.5 text-sm cursor-pointer rounded-xl hover:bg-gray-50 dark:hover:bg-gray-800/50"
|
||||
aria-pressed={webSearchEnabled}
|
||||
aria-label={webSearchEnabled ? $i18n.t('Disable Web Search') : $i18n.t('Enable Web Search')}
|
||||
aria-label={webSearchEnabled
|
||||
? $i18n.t('Disable Web Search')
|
||||
: $i18n.t('Enable Web Search')}
|
||||
on:click={() => {
|
||||
webSearchEnabled = !webSearchEnabled;
|
||||
onWebSearchToggle(webSearchEnabled);
|
||||
}}
|
||||
>
|
||||
<div class="flex-1 truncate">
|
||||
@@ -303,7 +307,9 @@
|
||||
<button
|
||||
class="flex w-full justify-between gap-2 items-center px-3 py-1.5 text-sm cursor-pointer rounded-xl hover:bg-gray-50 dark:hover:bg-gray-800/50"
|
||||
aria-pressed={imageGenerationEnabled}
|
||||
aria-label={imageGenerationEnabled ? $i18n.t('Disable Image Generation') : $i18n.t('Enable Image Generation')}
|
||||
aria-label={imageGenerationEnabled
|
||||
? $i18n.t('Disable Image Generation')
|
||||
: $i18n.t('Enable Image Generation')}
|
||||
on:click={() => {
|
||||
imageGenerationEnabled = !imageGenerationEnabled;
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user