|
@@ -15,18 +15,14 @@
|
|
updateUserValvesById as updateFunctionUserValvesById
|
|
updateUserValvesById as updateFunctionUserValvesById
|
|
} from '$lib/apis/functions';
|
|
} from '$lib/apis/functions';
|
|
|
|
|
|
- import ManageModal from './Personalization/ManageModal.svelte';
|
|
|
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
|
import Spinner from '$lib/components/common/Spinner.svelte';
|
|
import Spinner from '$lib/components/common/Spinner.svelte';
|
|
- import Switch from '$lib/components/common/Switch.svelte';
|
|
|
|
import Valves from '$lib/components/common/Valves.svelte';
|
|
import Valves from '$lib/components/common/Valves.svelte';
|
|
|
|
|
|
const dispatch = createEventDispatcher();
|
|
const dispatch = createEventDispatcher();
|
|
|
|
|
|
const i18n = getContext('i18n');
|
|
const i18n = getContext('i18n');
|
|
|
|
|
|
- export let saveSettings: Function;
|
|
|
|
-
|
|
|
|
let tab = 'tools';
|
|
let tab = 'tools';
|
|
let selectedId = '';
|
|
let selectedId = '';
|
|
|
|
|
|
@@ -112,18 +108,12 @@
|
|
dispatch('save');
|
|
dispatch('save');
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <div class="flex flex-col pr-1.5 overflow-y-scroll max-h-[25rem]">
|
|
|
|
- <div>
|
|
|
|
- <div class="flex items-center justify-between mb-2">
|
|
|
|
- <Tooltip content="">
|
|
|
|
- <div class="text-sm font-medium">
|
|
|
|
- {$i18n.t('Manage Valves')}
|
|
|
|
- </div>
|
|
|
|
- </Tooltip>
|
|
|
|
-
|
|
|
|
- <div class=" self-end">
|
|
|
|
|
|
+ <div class="flex flex-col">
|
|
|
|
+ <div class="space-y-1">
|
|
|
|
+ <div class="flex gap-2">
|
|
|
|
+ <div class="flex-1">
|
|
<select
|
|
<select
|
|
- class=" dark:bg-gray-900 w-fit pr-8 rounded text-xs bg-transparent outline-none text-right"
|
|
|
|
|
|
+ class=" w-full rounded text-xs py-2 px-1 bg-transparent outline-none"
|
|
bind:value={tab}
|
|
bind:value={tab}
|
|
placeholder="Select"
|
|
placeholder="Select"
|
|
>
|
|
>
|
|
@@ -131,14 +121,10 @@
|
|
<option value="functions">{$i18n.t('Functions')}</option>
|
|
<option value="functions">{$i18n.t('Functions')}</option>
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
- <div class="space-y-1">
|
|
|
|
- <div class="flex gap-2">
|
|
|
|
<div class="flex-1">
|
|
<div class="flex-1">
|
|
<select
|
|
<select
|
|
- class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
|
|
|
|
|
|
+ class="w-full rounded py-2 px-1 text-xs bg-transparent outline-none"
|
|
bind:value={selectedId}
|
|
bind:value={selectedId}
|
|
on:change={async () => {
|
|
on:change={async () => {
|
|
await tick();
|
|
await tick();
|
|
@@ -167,9 +153,9 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{#if selectedId}
|
|
{#if selectedId}
|
|
- <hr class="dark:border-gray-800 my-3 w-full" />
|
|
|
|
|
|
+ <hr class="dark:border-gray-800 my-1 w-full" />
|
|
|
|
|
|
- <div>
|
|
|
|
|
|
+ <div class="my-2 text-xs">
|
|
{#if !loading}
|
|
{#if !loading}
|
|
<Valves {valvesSpec} bind:valves />
|
|
<Valves {valvesSpec} bind:valves />
|
|
{:else}
|
|
{:else}
|
|
@@ -178,13 +164,4 @@
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <div class="flex justify-end text-sm font-medium">
|
|
|
|
- <button
|
|
|
|
- class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg"
|
|
|
|
- type="submit"
|
|
|
|
- >
|
|
|
|
- {$i18n.t('Save')}
|
|
|
|
- </button>
|
|
|
|
- </div>
|
|
|
|
</form>
|
|
</form>
|