We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d2a1264 + f155752 commit 523038bCopy full SHA for 523038b
1 file changed
src/components/Preview.vue
@@ -36,7 +36,16 @@
36
wrap="hard"
37
/>
38
<div class="validation-msg">
39
- <p v-bind:class="isValidCFF ? '' : 'invalid'">
+ <p
40
+ v-if="doesNotHaveRequiredFields"
41
+ class="invalid"
42
+ >
43
+ Your CITATION.cff does not have the minimum fields
44
+ </p>
45
46
+ v-else
47
+ v-bind:class="isValidCFF ? '' : 'invalid'"
48
49
Your CITATION.cff is {{ isValidCFF ? "valid" : "not valid" }}
50
</p>
51
</div>
@@ -66,6 +75,9 @@ export default defineComponent({
66
75
return {
67
76
cffstr,
68
77
copyToClipboard,
78
+ doesNotHaveRequiredFields: computed(() => errors.value
79
+ .map((v) => v.instancePath)
80
+ .some((i) => i.includes('title') || i.includes('authors') || i.includes('message'))),
69
81
isValidCFF: computed(() => errors.value.length === 0),
70
82
showTooltip
71
83
}
0 commit comments