allow panels to hold commands

This commit is contained in:
2025-12-28 11:48:11 -05:00
parent 59a0c81eb4
commit c3253f3204
11 changed files with 385 additions and 51 deletions

View File

@@ -1,7 +1,10 @@
<script setup lang="ts">
import DynamicComponent from '@/components/DynamicComponent.vue';
import type { OptionalDynamicComponentData } from '@/composables/dynamic.ts';
import { computed, ref, watchEffect } from 'vue';
import type {
DynamicDataType,
OptionalDynamicComponentData,
} from '@/composables/dynamic.ts';
import { computed, provide, ref, watchEffect } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
@@ -12,6 +15,10 @@ const panel = ref<OptionalDynamicComponentData>({
type: 'none',
});
const inputs = ref<{ [id: string]: DynamicDataType }>({});
provide('inputs', inputs);
watchEffect(async () => {
const panel_data = await fetch(`/api/panel/${id.value}`);
const panel_json_value = await panel_data.json();