Skip to content

Commit 3efc7d5

Browse files
committed
apply suggestions from @spaaks
1 parent 4269d29 commit 3efc7d5

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

src/components/IdentifierCardEditing.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</div>
1919
<div class="q-gutter-md q-mt-md items-center no-wrap">
2020
<p class="question">
21-
What is the value of the {{ getLinkLabel }}?
21+
What is the value of the {{ label }}?
2222
<SchemaGuideLink v-bind:anchor="anchor" />
2323
</p>
2424
<q-input
@@ -35,7 +35,7 @@
3535
</div>
3636
<div class="q-gutter-md q-mt-md items-center no-wrap">
3737
<p class="question">
38-
What is the description for the {{ getLinkLabel }}?
38+
What is the description for the {{ label }}?
3939
<SchemaGuideLink anchor="#definitionsidentifier-description" />
4040
</p>
4141
<q-input
@@ -86,7 +86,7 @@
8686
</template>
8787

8888
<script lang="ts">
89-
import { IdentifierTypeType, linkInfoType } from '../types'
89+
import { IdentifierTypeType } from '../types'
9090
import { computed, defineComponent, PropType } from 'vue'
9191
import { getMyErrors } from 'src/store/validator'
9292
import { identifierErrors } from 'src/identifier-errors'
@@ -100,11 +100,11 @@ export default defineComponent({
100100
required: true
101101
},
102102
type: {
103-
type: String,
103+
type: String as PropType<IdentifierTypeType>,
104104
default: ''
105105
},
106106
value: {
107-
type: String as PropType<IdentifierTypeType>,
107+
type: String,
108108
default: ''
109109
},
110110
description: {
@@ -120,14 +120,14 @@ export default defineComponent({
120120
SchemaGuideLink
121121
},
122122
setup (props) {
123-
const linkInfo: linkInfoType = {
124-
doi: { linkLabel: 'DOI', linkUrl: '#definitionsdoi' },
125-
url: { linkLabel: 'URL', linkUrl: '#definitionsurl' },
123+
const linkInfo = {
124+
doi: { label: 'DOI', anchor: '#definitionsdoi' },
125+
url: { label: 'URL', anchor: '#definitionsurl' },
126126
swh: {
127-
linkLabel: 'Software Heritage identifier',
128-
linkUrl: '#definitionsswh-identifier'
127+
label: 'Software Heritage identifier',
128+
anchor: '#definitionsswh-identifier'
129129
},
130-
other: { linkLabel: 'identifier', linkUrl: '#definitionsidentifier' }
130+
other: { label: 'identifier', anchor: '#definitionsidentifier' }
131131
}
132132
133133
return {

src/types/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ export type IdentifiersType = Array<IdentifierType> | undefined
2121

2222
export type KeywordsType = Array<string> | undefined
2323

24-
export type linkInfoType = Record<string, Record<string, string>>
25-
2624
export type TypeType = 'software' | 'dataset'
2725

2826
export type CffType = {

0 commit comments

Comments
 (0)