Files
OliveTin/frontend/resources/vue/components/DashboardComponent.vue
jamesread 39009fcdd1
Some checks failed
Build & Release pipeline / build (push) Has been cancelled
Buf CI / buf (push) Has been cancelled
Codestyle checks / codestyle (push) Has been cancelled
chore: code fmt
2025-12-01 01:59:10 +00:00

35 lines
1.2 KiB
Vue

<template>
<ActionButton v-if="component.type == 'link'" :actionData="component.action" :key="component.title" />
<DashboardComponentDirectory v-else-if="component.type == 'directory'" :component="component" />
<DashboardComponentDisplay v-else-if="component.type == 'display'" :component="component" />
<DashboardComponentMostRecentExecution v-else-if="component.type == 'stdout-most-recent-execution'" :component="component" />
<template v-else-if="component.type == 'fieldset'">
<template v-for="subcomponent in component.contents" :key="subcomponent.title">
<DashboardComponent :component="subcomponent" />
</template>
</template>
<div v-else>
OTHER: {{ component.type }}
{{ component }}
</div>
</template>
<script setup>
import ActionButton from '../ActionButton.vue'
import DashboardComponentMostRecentExecution from './DashboardComponentMostRecentExecution.vue'
import DashboardComponentDirectory from './DashboardComponentDirectory.vue'
import DashboardComponentDisplay from './DashboardComponentDisplay.vue'
const props = defineProps({
component: {
type: Object,
required: true
}
})
</script>