feat: function toggle support

This commit is contained in:
Timothy J. Baek committed 2024-06-23 18:34:42 -07:00
1 parent 3034f3d310
commit d8c112d8b0
8 files changed
+338 -209

No files matched your search

@@ -13,7 +13,8 @@
deleteFunctionById,
exportFunctions,
getFunctionById,
getFunctions
getFunctions,
toggleFunctionById
} from '$lib/apis/functions';
import ArrowDownTray from '../icons/ArrowDownTray.svelte';
@@ -224,7 +225,12 @@
</FunctionMenu>
<div class=" self-center mx-1">
<Switch />
<Switch
bind:state={func.is_active}
on:change={(e) => {
toggleFunctionById(localStorage.token, func.id);
}}
/>
</div>
</div>
</div>