Skip to content

Commit bcfdc6f

Browse files
authored
Merge pull request #685 from citation-file-format/662-info-keywords
2 parents ee4d5a4 + 1a3f9bb commit bcfdc6f

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

src/components/ScreenKeywords.vue

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
<div id="form-content">
99
<h2 class="question">
1010
What keywords describe the work?
11-
<SchemaGuideLink anchor="#keywords" />
11+
<q-icon
12+
name="ion-information-circle-outline"
13+
size="24px"
14+
color="primary"
15+
v-on:click="showKeywordsHelp = true"
16+
style="cursor:pointer;"
17+
/>
1218
</h2>
1319
<div class="scroll-to-bottom-container">
1420
<span class="bottom" />
@@ -48,15 +54,19 @@
4854
{{ screenMessage }}
4955
</div>
5056
</q-banner>
57+
<InfoDialog
58+
v-model="showKeywordsHelp"
59+
v-bind:data="helpData.keywords"
60+
/>
5161
</div>
5262
</template>
5363

5464
<script lang="ts">
5565
import { byError, keywordsQueries } from 'src/error-filtering'
56-
import { computed, defineComponent, nextTick, onUpdated } from 'vue'
66+
import { computed, defineComponent, nextTick, onUpdated, ref } from 'vue'
5767
import { moveDown, moveUp } from 'src/updown'
68+
import InfoDialog from 'components/InfoDialog.vue'
5869
import Keyword from 'components/Keyword.vue'
59-
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
6070
import { scrollToBottom } from 'src/scroll-to-bottom'
6171
import { useCff } from 'src/store/cff'
6272
import { useStepperErrors } from 'src/store/stepper-errors'
@@ -65,7 +75,7 @@ import { useValidation } from 'src/store/validation'
6575
export default defineComponent({
6676
name: 'ScreenKeywords',
6777
components: {
68-
SchemaGuideLink,
78+
InfoDialog,
6979
Keyword
7080
},
7181
setup () {
@@ -110,15 +120,29 @@ export default defineComponent({
110120
.filter(byError(errors.value))
111121
.map(query => query.replace.message)
112122
})
123+
const helpData = {
124+
keywords: {
125+
title: 'keywords',
126+
url: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#keywords',
127+
description: 'Keywords that describe the work.',
128+
examples: [
129+
'keyword',
130+
'other-keyword',
131+
'Yet Another Keyword'
132+
]
133+
}
134+
}
113135
return {
114136
addKeyword,
115137
keywords,
116138
keywordsErrors,
139+
helpData,
117140
moveDown,
118141
moveUp,
119142
removeKeyword,
120143
setKeyword,
121-
setKeywords
144+
setKeywords,
145+
showKeywordsHelp: ref(false)
122146
}
123147
}
124148
})

0 commit comments

Comments
 (0)