refac
This commit is contained in:
1 parent
a0195cd5ae
commit
990c638f6c
2 files changed
+24
-2
No files matched your search
@@ -3,6 +3,7 @@
|
|||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
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 AddConnectionModal from '$lib/components/AddConnectionModal.svelte';
|
import AddConnectionModal from '$lib/components/AddConnectionModal.svelte';
|
||||||
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div class="flex gap-1">
|
<div class="flex gap-1 items-center">
|
||||||
<Tooltip content={$i18n.t('Manage')} className="self-start">
|
<Tooltip content={$i18n.t('Manage')} className="self-start">
|
||||||
<button
|
<button
|
||||||
class="self-center p-1 bg-transparent hover:bg-gray-100 dark:bg-gray-900 dark:hover:bg-gray-850 rounded-lg transition"
|
class="self-center p-1 bg-transparent hover:bg-gray-100 dark:bg-gray-900 dark:hover:bg-gray-850 rounded-lg transition"
|
||||||
@@ -99,5 +100,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?.key ?? '', config });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
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';
|
||||||
@@ -98,7 +99,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
|
||||||
class="self-center p-1 bg-transparent hover:bg-gray-100 dark:bg-gray-900 dark:hover:bg-gray-850 rounded-lg transition"
|
class="self-center p-1 bg-transparent hover:bg-gray-100 dark:bg-gray-900 dark:hover:bg-gray-850 rounded-lg transition"
|
||||||
@@ -110,5 +111,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