refac
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import { settings } from '$lib/stores';
|
import { settings } from '$lib/stores';
|
||||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
|
import Switch from '$lib/components/common/Switch.svelte';
|
||||||
import SensitiveInput from '$lib/components/common/SensitiveInput.svelte';
|
import SensitiveInput from '$lib/components/common/SensitiveInput.svelte';
|
||||||
import Cog6 from '$lib/components/icons/Cog6.svelte';
|
import Cog6 from '$lib/components/icons/Cog6.svelte';
|
||||||
import AddConnectionModal from '$lib/components/AddConnectionModal.svelte';
|
import AddConnectionModal from '$lib/components/AddConnectionModal.svelte';
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div class="flex gap-1">
|
<div class="flex gap-1 items-center">
|
||||||
<Tooltip content={$i18n.t('Configure')} className="self-start">
|
<Tooltip content={$i18n.t('Configure')} className="self-start">
|
||||||
<button
|
<button
|
||||||
aria-label={$i18n.t('Open modal to configure connection')}
|
aria-label={$i18n.t('Open modal to configure connection')}
|
||||||
@@ -88,5 +89,15 @@
|
|||||||
<Cog6 />
|
<Cog6 />
|
||||||
</button>
|
</button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
|
<Tooltip content={(config?.enable ?? true) ? $i18n.t('Enabled') : $i18n.t('Disabled')}>
|
||||||
|
<Switch
|
||||||
|
bind:state={config.enable}
|
||||||
|
on:change={() => {
|
||||||
|
config.enable = config.enable ?? false;
|
||||||
|
onSubmit({ url, key, config });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user