Skip to content

Commit 31a4fc3

Browse files
authored
Merge pull request #676 from citation-file-format/664-info-version-specific
2 parents 53398d6 + 2d910a7 commit 31a4fc3

File tree

1 file changed

+67
-7
lines changed

1 file changed

+67
-7
lines changed

src/components/ScreenVersionSpecific.vue

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
<div id="form-content">
99
<h2 class="question">
1010
What is the commit identifier of the work?
11-
<SchemaGuideLink anchor="#commit" />
11+
<q-icon
12+
name="ion-information-circle-outline"
13+
size="24px"
14+
color="primary"
15+
v-on:click="showCommitHelp = true"
16+
style="cursor:pointer;"
17+
/>
1218
</h2>
1319
<q-input
1420
bg-color="white"
@@ -21,7 +27,13 @@
2127

2228
<h2 class="question">
2329
What is the version of the work?
24-
<SchemaGuideLink anchor="#version" />
30+
<q-icon
31+
name="ion-information-circle-outline"
32+
size="24px"
33+
color="primary"
34+
v-on:click="showVersionHelp = true"
35+
style="cursor:pointer;"
36+
/>
2537
</h2>
2638
<q-input
2739
bg-color="white"
@@ -34,7 +46,13 @@
3446

3547
<h2 class="question">
3648
When was the version released?
37-
<SchemaGuideLink anchor="#date-released" />
49+
<q-icon
50+
name="ion-information-circle-outline"
51+
size="24px"
52+
color="primary"
53+
v-on:click="showDateReleasedHelp = true"
54+
style="cursor:pointer;"
55+
/>
3856
</h2>
3957
<q-input
4058
bg-color="white"
@@ -78,21 +96,33 @@
7896
</q-icon>
7997
</template>
8098
</q-input>
99+
<InfoDialog
100+
v-model="showCommitHelp"
101+
v-bind:data="helpData.commit"
102+
/>
103+
<InfoDialog
104+
v-model="showVersionHelp"
105+
v-bind:data="helpData.version"
106+
/>
107+
<InfoDialog
108+
v-model="showDateReleasedHelp"
109+
v-bind:data="helpData.dateReleased"
110+
/>
81111
</div>
82112
</template>
83113

84114
<script lang="ts">
85115
import { byError, dateReleasedQueries } from 'src/error-filtering'
86-
import { computed, defineComponent, onUpdated } from 'vue'
87-
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
116+
import { computed, defineComponent, onUpdated, ref } from 'vue'
117+
import InfoDialog from 'components/InfoDialog.vue'
88118
import { useCff } from 'src/store/cff'
89119
import { useStepperErrors } from 'src/store/stepper-errors'
90120
import { useValidation } from 'src/store/validation'
91121
92122
export default defineComponent({
93123
name: 'ScreenVersionSpecific',
94124
components: {
95-
SchemaGuideLink
125+
InfoDialog
96126
},
97127
setup () {
98128
onUpdated(() => {
@@ -113,15 +143,45 @@ export default defineComponent({
113143
.filter(byError(errors.value))
114144
.map(query => query.replace.message)
115145
})
146+
const helpData = {
147+
commit: {
148+
title: 'commit',
149+
url: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#commit',
150+
description: 'The commit hash or revision number of the software version.',
151+
examples: [
152+
'1ff847d81f29c45a3a1a5ce73d38e45c2f319bba',
153+
'Revision: 8612'
154+
]
155+
},
156+
version: {
157+
title: 'version',
158+
url: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#version',
159+
description: 'The version of the software or dataset.',
160+
examples: [
161+
'1.2.0',
162+
'1.2',
163+
'21.10 (Impish Indri)'
164+
]
165+
},
166+
dateReleased: {
167+
title: 'date-released',
168+
url: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#date-released',
169+
description: 'The date the work has been released.'
170+
}
171+
}
116172
return {
117173
commit,
118174
dateReleased,
119175
dateReleasedErrors,
176+
helpData,
120177
initializeDate,
121178
version,
122179
setCommit,
123180
setDateReleased,
124-
setVersion
181+
setVersion,
182+
showCommitHelp: ref(false),
183+
showVersionHelp: ref(false),
184+
showDateReleasedHelp: ref(false)
125185
}
126186
}
127187
})

0 commit comments

Comments
 (0)