feat: valves

This commit is contained in:
Timothy J. Baek
2024-06-23 19:02:27 -07:00
parent 3a629ffe00
commit 627705a347
7 changed files with 377 additions and 92 deletions

View File

@@ -24,6 +24,7 @@
import FunctionMenu from './Functions/FunctionMenu.svelte';
import EllipsisHorizontal from '../icons/EllipsisHorizontal.svelte';
import Switch from '../common/Switch.svelte';
import ValvesModal from './ValvesModal.svelte';
const i18n = getContext('i18n');
@@ -33,6 +34,9 @@
let showConfirm = false;
let query = '';
let showValvesModal = false;
let selectedFunction = null;
const shareHandler = async (tool) => {
console.log(tool);
};
@@ -175,6 +179,10 @@
<button
class="self-center w-fit text-sm px-2 py-2 dark:text-gray-300 dark:hover:text-white hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
type="button"
on:click={() => {
selectedFunction = func;
showValvesModal = true;
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -352,6 +360,8 @@
</a>
</div>
<ValvesModal bind:show={showValvesModal} type="function" id={selectedFunction?.id ?? null} />
<ConfirmDialog
bind:show={showConfirm}
on:confirm={() => {