Skip to content

Commit 53398d6

Browse files
authored
Merge pull request #680 from citation-file-format/663-info-license
2 parents ffd8c95 + e274838 commit 53398d6

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

src/components/ScreenLicense.vue

Lines changed: 28 additions & 4 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 license of the work?
11-
<SchemaGuideLink anchor="#license" />
11+
<q-icon
12+
name="ion-information-circle-outline"
13+
size="24px"
14+
color="primary"
15+
v-on:click="showLicenseHelp = true"
16+
style="cursor:pointer;"
17+
/>
1218
</h2>
1319
<q-select
1420
bg-color="white"
@@ -33,27 +39,44 @@
3339
</q-item>
3440
</template>
3541
</q-select>
42+
<InfoDialog
43+
v-model="showLicenseHelp"
44+
v-bind:data="helpData.license"
45+
/>
3646
</div>
3747
</template>
3848

3949
<script lang="ts">
4050
import { defineComponent, ref } from 'vue'
51+
import InfoDialog from 'components/InfoDialog.vue'
4152
import { QSelect } from 'quasar'
42-
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
4353
import schema from 'src/schemas/1.2.0/schema.json'
4454
import { useCff } from 'src/store/cff'
4555
4656
export default defineComponent({
4757
name: 'ScreenLicense',
4858
components: {
49-
SchemaGuideLink
59+
InfoDialog
5060
},
5161
setup () {
5262
const { license, setLicense } = useCff()
5363
const licenses = schema.definitions['license-enum'].enum
5464
const options = ref(licenses)
65+
const helpData = {
66+
license: {
67+
title: 'license',
68+
url: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#license',
69+
description: 'The SPDX license identifier for the license under which the work is available.',
70+
examples: [
71+
'Apache-2.0',
72+
'MIT',
73+
'GPL-3.0'
74+
]
75+
}
76+
}
5577
5678
return {
79+
helpData,
5780
license,
5881
options,
5982
setLicense,
@@ -72,7 +95,8 @@ export default defineComponent({
7295
ref.moveOptionSelection(1, true)
7396
}
7497
})
75-
}
98+
},
99+
showLicenseHelp: ref(false)
76100
}
77101
}
78102
})

0 commit comments

Comments
 (0)