Skip to content

Commit

Permalink
🔀 Merge #496 into deploy/rinkeby
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Oct 31, 2024
2 parents 01ee4b8 + dfd1783 commit 14fc1fa
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
23 changes: 23 additions & 0 deletions components/IscnRegisterForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,24 @@
:placeholder="$t('IscnRegisterForm.placeholder.isbn')"
/>
</FormField>
<FormField
v-if="type === 'Book'"
:label="$t('IscnRegisterForm.label.publisher')"
>
<TextField
v-model="publisher"
:placeholder="$t('IscnRegisterForm.placeholder.publisher')"
/>
</FormField>
<FormField
v-if="type === 'Book'"
:label="$t('IscnRegisterForm.label.datePublished')"
>
<input
v-model="datePublished"
type="date"
/>
</FormField>
<FormField
v-if="shouldShowUploadToNumbers"
:label="$t('IscnRegisterForm.label.numbersProtocol')"
Expand Down Expand Up @@ -755,6 +773,8 @@ export default class IscnRegisterForm extends Vue {
authors: Author[] = []
name: string = ''
description: string = ''
publisher: string = ''
datePublished: null | string = null
tags: string[] = []
sameAs: string[] = []
url: string = ''
Expand Down Expand Up @@ -1031,6 +1051,8 @@ export default class IscnRegisterForm extends Vue {
contentFingerprints: this.contentFingerprintLinks,
inLanguage: this.language,
thumbnailUrl: this.thumbnailUrl,
publisher: this.publisher,
datePublished: this.datePublished ? new Date(this.datePublished).toISOString() : undefined,
}
}
Expand Down Expand Up @@ -1513,6 +1535,7 @@ estimation,
}
try {
this.uploadStatus = 'signing'
console.log(formatISCNTxPayload(this.payload));
const res = await signISCNTx(
formatISCNTxPayload(this.payload),
this.signer,
Expand Down
3 changes: 3 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
"IscnRegisterForm.fileSHA256.link": "hash://sha256/{hash}",
"IscnRegisterForm.label.author": "Author",
"IscnRegisterForm.label.stakeholder": "Stakeholders",
"IscnRegisterForm.label.datePublished": "Original Date Published",
"IscnRegisterForm.label.description": "Description",
"IscnRegisterForm.label.drm": "DRM Options",
"IscnRegisterForm.label.drm.details": "Use like.co API to protect Arweave link",
Expand All @@ -236,6 +237,7 @@
"IscnRegisterForm.label.fileName": "File name",
"IscnRegisterForm.label.fileType": "File type",
"IscnRegisterForm.label.originFile": "origin file: {name}",
"IscnRegisterForm.label.publisher": "Publisher",
"IscnRegisterForm.label.numbersProtocol": "Numbers Protocol",
"IscnRegisterForm.label.numbersProtocol.details": "Register your image asset in {link}",
"IscnRegisterForm.label.numbersProtocol.details.link": "Numbers Protocol",
Expand All @@ -254,6 +256,7 @@
"IscnRegisterForm.placeholder.name": "Name",
"IscnRegisterForm.placeholder.fileName": "File Name (en)",
"IscnRegisterForm.placeholder.fileType": "File Type",
"IscnRegisterForm.placeholder.publisher": "Publisher",
"IscnRegisterForm.placeholder.url": "URL",
"IscnRegisterForm.placeholder.isbn": "ISBN 10/ ISBN 13",
"IscnRegisterForm.placeholder.wallet": "Wallet Address",
Expand Down
1 change: 1 addition & 0 deletions utils/cosmos/iscn/iscn.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface ISCNRegisterPayload {
recordNotes?: string;
memo?: string;
inLanguage?: string;
datePublished?: string,
thumbnailUrl?: string;
isbn?: string;
}
Expand Down
1 change: 1 addition & 0 deletions utils/cosmos/iscn/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export function formatISCNTxPayload(payload: ISCNRegisterPayload): ISCNSignPaylo

return {
...data,
publisher: publisherInput,
author,
keywords: tagsString.split(','),
usageInfo: license,
Expand Down

0 comments on commit 14fc1fa

Please sign in to comment.