Skip to content

Commit 8d92eee

Browse files
authored
Merge pull request #568 from citation-file-format/393-previous-button
2 parents ccee5c6 + a80ef01 commit 8d92eee

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/components/StepperActions.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<template>
22
<q-btn
3-
color=""
4-
flat
53
label="Previous"
64
no-caps
75
v-bind:class="cannotGoBack ? 'hidden' : ''"
6+
v-bind:color="boldPrevious ? 'primary' : ''"
7+
v-bind:flat="!boldPrevious"
8+
v-bind:unelevated="boldPrevious"
89
v-on:click="navigatePrevious"
910
/>
1011
<span class="spacer" />
@@ -25,21 +26,26 @@
2526
color="primary"
2627
label="Next"
2728
no-caps
29+
unelevated
2830
v-on:click="navigateNext"
2931
/>
3032
</q-btn-group>
3133
</template>
3234

3335
<script lang="ts">
34-
import { defineComponent } from 'vue'
36+
import { computed, defineComponent } from 'vue'
3537
import { useApp } from 'src/store/app'
38+
import { useValidation } from 'src/store/validation'
3639
3740
export default defineComponent({
3841
name: 'StepperActions',
3942
4043
setup () {
4144
const { showAdvanced, cannotGoBack, cannotGoForward, navigateNext, navigatePrevious } = useApp()
45+
const { errors } = useValidation()
46+
4247
return {
48+
boldPrevious: computed(() => cannotGoForward.value && (errors.value.length > 0)),
4349
cannotGoBack,
4450
cannotGoForward,
4551
showAdvanced,

0 commit comments

Comments
 (0)