22 <div id =" metroline" >
33 <Stepper />
44 </div >
5-
65 <div id =" form" >
76 <div id =" form-title" >
8- <h1 class =" finish-title" >
7+ <h1
8+ class =" finish-title"
9+ v-if =" isValid"
10+ >
911 Congratulations
1012 </h1 >
13+ <h1
14+ class =" finish-title"
15+ v-else
16+ >
17+ Uh-oh!
18+ </h1 >
1119 </div >
1220
1321 <div id =" form-content" >
14- <p class =" finish-paragraph" >
15- Now you have a CITATION.cff file and you get the credits you deserve.
16- </p >
17- <p class =" finish-paragraph" >
18- Share a reference to your software.
19- </p >
22+ <div v-if =" isValid" >
23+ <p class =" finish-paragraph" >
24+ Use the buttons below to download your CITATION.cff file, or reset the form to start over.
25+ </p >
26+ <div class =" row" >
27+ <DownloadButton class="col-4 q-ma-lg" />
28+ <q-btn
29+ class =" col-4 q-ma-lg"
30+ color =" primary"
31+ icon =" refresh"
32+ label =" Reset form"
33+ no-caps
34+ size =" xl"
35+ v-on:click =" createAnother"
36+ />
37+ </div >
2038
21- <div
22- class =" text-primary q-gutter-md q-mb-xl"
23- style =" font-size : 2em "
24- >
25- <q-icon
26- name =" ion-logo-twitter"
27- size =" xl"
28- />
29- <q-icon
30- name =" ion-logo-linkedin"
31- size =" xl"
32- />
33- <q-icon
34- name =" ion-logo-reddit"
35- size =" xl"
36- />
39+ <p
40+ class =" finish-paragraph"
41+ style =" margin-top : 120px "
42+ >
43+ Share a reference to your software.
44+ </p >
45+
46+ <div
47+ class =" text-primary q-gutter-md q-mb-xl"
48+ style =" font-size : 2em "
49+ >
50+ <q-icon
51+ name =" ion-logo-twitter"
52+ size =" xl"
53+ />
54+ <q-icon
55+ name =" ion-logo-linkedin"
56+ size =" xl"
57+ />
58+ <q-icon
59+ name =" ion-logo-reddit"
60+ size =" xl"
61+ />
62+ </div >
63+ </div >
64+ <div v-else >
65+ <p class =" finish-paragraph" >
66+ Your CITATION.cff is not valid just yet. Go back to the form to make some changes.
67+ </p >
3768 </div >
38- <q-card-actions
39- align =" center"
40- class =" q-gutter-md"
41- >
42- <q-btn
43- class =" q-ml-xl"
44- color =" primary"
45- icon =" refresh"
46- label =" Create another"
47- no-caps
48- v-on:click =" createAnother"
49- />
50- </q-card-actions >
5169 </div >
5270
5371 <div id =" form-button-bar" >
5775</template >
5876
5977<script lang="ts">
60- import { defineComponent } from ' vue'
78+ import { defineComponent , computed } from ' vue'
6179import { useApp } from ' ../store/app'
6280import { useCff } from ' ../store/cff'
6381import Stepper from ' components/Stepper.vue'
6482import StepperActions from ' components/StepperActions.vue'
83+ import { isValidCffFile } from ' src/validator'
84+ import DownloadButton from ' components/DownloadButton.vue'
6585
6686export default defineComponent ({
6787 name: ' ScreenFinishAdvanced' ,
6888 components: {
89+ DownloadButton ,
6990 Stepper ,
7091 StepperActions
7192 },
@@ -74,6 +95,7 @@ export default defineComponent({
7495 const { reset } = useCff ()
7596
7697 return {
98+ isValid: computed (isValidCffFile ),
7799 createAnother : async () => {
78100 reset ()
79101 setShowAdvanced (false )
@@ -88,7 +110,9 @@ export default defineComponent({
88110 </script >
89111
90112<style scoped>
91- .download-button {
92- margin-top : 150px ;
113+ .row {
114+ display : flex ;
115+ flex-direction : row ;
116+ justify-content : center
93117}
94118 </style >
0 commit comments