Skip to content

Commit

Permalink
TMP simplify pages layout
Browse files Browse the repository at this point in the history
  • Loading branch information
tharvik committed Dec 21, 2024
1 parent 928ef56 commit 36997ea
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 25 deletions.
2 changes: 0 additions & 2 deletions webapp/src/components/progress_bars/TrainingBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
</ProgressIcon>
</div>
</div>
<TrainingButtons />
</div>
</template>

Expand All @@ -124,7 +123,6 @@ import TasksIcon from '@/assets/svg/TasksIcon.vue'
import PerformanceIcon from '@/assets/svg/PerformanceIcon.vue'
import DISCOllaboratives from '@/components/simple/DISCOllaboratives.vue'
import TrainingButtons from './TrainingButtons.vue'
const router = useRouter()
const route = useRoute()
Expand Down
72 changes: 49 additions & 23 deletions webapp/src/components/training/TrainingSteps.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,56 @@
<template>
<div v-if="task !== undefined">
<Description v-show="trainingStore.step === 1" :task="task" />

<div
v-show="trainingStore.step === 2"
class="flex flex-col space-y-4 md:space-y-8"
>
<LabeledDatasetInput :task v-model="dataset">
<template #header>
<DataDescription :task />
</template>
</LabeledDatasetInput>
</div>

<Trainer
v-show="trainingStore.step === 3"
:task
:dataset="unamedDataset"
@model="(m) => (trainedModel = m)"
/>

<Finished v-show="trainingStore.step === 4" :task :model="trainedModel" />
<div class="root">
<!-- TrainingBar -->

<TrainingButtons />

<template v-if="task !== undefined">
<div v-show="trainingStore.step === 1">
<Description :task />
</div>

<div v-show="trainingStore.step === 2">
<LabeledDatasetInput :task v-model="dataset">
<template #header>
<DataDescription :task />
</template>
</LabeledDatasetInput>
</div>

<div v-show="trainingStore.step === 3">
<Trainer
:task
:dataset="unamedDataset"
@model="(m) => (trainedModel = m)"
/>
</div>

<div v-show="trainingStore.step === 4">
<Finished :task :model="trainedModel" />
</div>

<TrainingButtons />
</template>
</div>
<TrainingButtons />
</template>

<style lang="css" scoped>
.root,
.root > *:not(:first-child, :last-child) {
display: flex;
flex-direction: column;
gap: 1rem;
}
/* tailwind "md" size */
@media (min-width: 768px) {
.root,
.root > *:not(:first-child, :last-child) {
gap: 2rem;
}
}
</style>

<script lang="ts" setup>
import { computed, onMounted, ref, toRaw, watch } from "vue";
import { useRouter, useRoute } from "vue-router";
Expand Down

0 comments on commit 36997ea

Please sign in to comment.