Skip to content

Commit

Permalink
feat: web: display exercise label (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
crlssn authored Dec 19, 2024
1 parent e642f3b commit 9696df2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/src/ui/exercises/CreateExercise.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ const onSubmit = async () => {
/>
</AppList>

<AppButton text="Create" type="submit" colour="primary"> Save Exercise </AppButton>
<AppButton text="Create" type="submit" colour="primary">Save Exercise</AppButton>
</form>
</template>
5 changes: 4 additions & 1 deletion web/src/ui/exercises/ListExercises.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ const fetchExercises = async () => {
:key="exercise.id"
:to="`/exercises/${exercise.id}`"
>
{{ exercise.name }}
<p>
{{ exercise.name }}
<small v-if="exercise.label" class="text-sm text-gray-500">{{ exercise.label }}</small>
</p>
<ChevronRightIcon class="size-8 text-gray-500" />
</AppListItemLink>
</AppList>
Expand Down
5 changes: 4 additions & 1 deletion web/src/ui/routines/CreateRoutine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ const onCreateRoutine = async () => {
<AppList :can-fetch="hasMorePages" @fetch="fetchExercises">
<AppListItem v-for="exercise in exercises" :key="exercise.id">
<div class="flex justify-between items-center w-full">
{{ exercise.name }}
<div>
{{ exercise.name }}
<small v-if="exercise.label" class="text-sm text-gray-500">{{ exercise.label }}</small>
</div>
<Switch
:class="[
exerciseIDs.includes(exercise.id) ? 'bg-indigo-600' : 'bg-gray-200',
Expand Down

0 comments on commit 9696df2

Please sign in to comment.