DashboardComponent.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <ActionButton v-if="component.type == 'link'" :actionData="component.action" :cssClass="component.cssClass" :key="component.title" />
  3. <DashboardComponentDirectory v-else-if="component.type == 'directory'" :component="component" />
  4. <DashboardComponentDisplay v-else-if="component.type == 'display'" :component="component" />
  5. <DashboardComponentMostRecentExecution v-else-if="component.type == 'stdout-most-recent-execution'" :component="component" />
  6. <template v-else-if="component.type == 'fieldset'">
  7. <template v-for="subcomponent in component.contents" :key="subcomponent.title">
  8. <DashboardComponent :component="subcomponent" />
  9. </template>
  10. </template>
  11. <div v-else>
  12. OTHER: {{ component.type }}
  13. {{ component }}
  14. </div>
  15. </template>
  16. <script setup>
  17. import ActionButton from '../ActionButton.vue'
  18. import DashboardComponentMostRecentExecution from './DashboardComponentMostRecentExecution.vue'
  19. import DashboardComponentDirectory from './DashboardComponentDirectory.vue'
  20. import DashboardComponentDisplay from './DashboardComponentDisplay.vue'
  21. const props = defineProps({
  22. component: {
  23. type: Object,
  24. required: true
  25. }
  26. })
  27. </script>