Skip to content

Commit db83390

Browse files
authored
Merge pull request #672 from citation-file-format/660-info-related-resources
2 parents 31a4fc3 + fceb77f commit db83390

File tree

1 file changed

+87
-8
lines changed

1 file changed

+87
-8
lines changed

src/components/ScreenRelatedResources.vue

Lines changed: 87 additions & 8 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 URL of the work in a source code repository?
11-
<SchemaGuideLink anchor="#repository-code" />
11+
<q-icon
12+
name="ion-information-circle-outline"
13+
size="24px"
14+
color="primary"
15+
v-on:click="showRepositoryCodeHelp = true"
16+
style="cursor:pointer;"
17+
/>
1218
</h2>
1319
<q-input
1420
bg-color="white"
@@ -24,7 +30,13 @@
2430

2531
<h2 class="question">
2632
What is the URL of a landing page/website for the work?
27-
<SchemaGuideLink anchor="#url" />
33+
<q-icon
34+
name="ion-information-circle-outline"
35+
size="24px"
36+
color="primary"
37+
v-on:click="showUrlHelp = true"
38+
style="cursor:pointer;"
39+
/>
2840
</h2>
2941
<q-input
3042
bg-color="white"
@@ -40,7 +52,13 @@
4052

4153
<h2 class="question">
4254
What is the URL of the work in a repository?
43-
<SchemaGuideLink anchor="#repository" />
55+
<q-icon
56+
name="ion-information-circle-outline"
57+
size="24px"
58+
color="primary"
59+
v-on:click="showRepositoryHelp = true"
60+
style="cursor:pointer;"
61+
/>
4462
</h2>
4563
<q-input
4664
bg-color="white"
@@ -56,7 +74,13 @@
5674

5775
<h2 class="question">
5876
What is the URL of the work in a build artifact/binary repository?
59-
<SchemaGuideLink anchor="#repository-artifact" />
77+
<q-icon
78+
name="ion-information-circle-outline"
79+
size="24px"
80+
color="primary"
81+
v-on:click="showRepositoryArtifactHelp = true"
82+
style="cursor:pointer;"
83+
/>
6084
</h2>
6185
<q-input
6286
bg-color="white"
@@ -69,21 +93,37 @@
6993
v-bind:error-message="repositoryArtifactErrors.join(', ')"
7094
v-on:update:modelValue="setRepositoryArtifact"
7195
/>
96+
<InfoDialog
97+
v-model="showRepositoryHelp"
98+
v-bind:data="helpData.repository"
99+
/>
100+
<InfoDialog
101+
v-model="showRepositoryArtifactHelp"
102+
v-bind:data="helpData.repositoryArtifact"
103+
/>
104+
<InfoDialog
105+
v-model="showRepositoryCodeHelp"
106+
v-bind:data="helpData.repositoryCode"
107+
/>
108+
<InfoDialog
109+
v-model="showUrlHelp"
110+
v-bind:data="helpData.url"
111+
/>
72112
</div>
73113
</template>
74114

75115
<script lang="ts">
76116
import { byError, repositoryArtifactQueries, repositoryCodeQueries, repositoryQueries, urlQueries } from 'src/error-filtering'
77-
import { computed, defineComponent, onUpdated } from 'vue'
78-
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
117+
import { computed, defineComponent, onUpdated, ref } from 'vue'
118+
import InfoDialog from 'components/InfoDialog.vue'
79119
import { useCff } from 'src/store/cff'
80120
import { useStepperErrors } from 'src/store/stepper-errors'
81121
import { useValidation } from 'src/store/validation'
82122
83123
export default defineComponent({
84124
name: 'ScreenRelatedResources',
85125
components: {
86-
SchemaGuideLink
126+
InfoDialog
87127
},
88128
setup () {
89129
onUpdated(() => {
@@ -115,7 +155,42 @@ export default defineComponent({
115155
.filter(byError(errors.value))
116156
.map(query => query.replace.message)
117157
})
158+
const helpData = {
159+
repository: {
160+
title: 'repository',
161+
url: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#repository',
162+
description: 'URL of the work in a repository/archive that is neither a source code repository nor a build artifact repository',
163+
examples: [
164+
'https://ascl.net/2105.013'
165+
]
166+
},
167+
repositoryArtifact: {
168+
title: 'repository-artifact',
169+
url: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#repository-artifact',
170+
description: 'URL of the work in a build artifact/binary repository',
171+
examples: [
172+
'https://search.maven.org/artifact/org.corpus-tools/cff-maven-plugin/0.4.0/maven-plugin'
173+
]
174+
},
175+
repositoryCode: {
176+
title: 'repository-code',
177+
url: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#repository-code',
178+
description: 'URL of the work in a source code repository',
179+
examples: [
180+
'https://github.com/citation-file-format/citation-file-format'
181+
]
182+
},
183+
url: {
184+
title: 'url',
185+
url: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#url',
186+
description: 'URL of the landing page/website for the work',
187+
examples: [
188+
'https://citation-file-format.github.io/'
189+
]
190+
}
191+
}
118192
return {
193+
helpData,
119194
repository,
120195
repositoryErrors,
121196
repositoryArtifact,
@@ -127,7 +202,11 @@ export default defineComponent({
127202
setRepository,
128203
setRepositoryArtifact,
129204
setRepositoryCode,
130-
setUrl
205+
setUrl,
206+
showRepositoryHelp: ref(false),
207+
showRepositoryArtifactHelp: ref(false),
208+
showRepositoryCodeHelp: ref(false),
209+
showUrlHelp: ref(false)
131210
}
132211
}
133212
})

0 commit comments

Comments
 (0)