diff --git a/components/IscnRegisterForm.vue b/components/IscnRegisterForm.vue index 7fbc887c..815ce246 100644 --- a/components/IscnRegisterForm.vue +++ b/components/IscnRegisterForm.vue @@ -809,7 +809,7 @@ export default class IscnRegisterForm extends Vue { thumbnailUrl: string = '' authorName: string = '' authorUrl: string[] = [] - authorWalletAddress: string[] = [] + authorWalletAddress: any = [] sentArweaveTransactionHashes = new Map< string, { transactionHash?: string, arweaveId?: string } >() @@ -875,7 +875,12 @@ export default class IscnRegisterForm extends Vue { } get authorNames() { - return this.authors.map((a) => a.name) + return this.authors.map((a) => { + if (a.name === this.$t('iscn.meta.stakeholders.name.placeholder')) { + return 'ISCN Owner'; + } + return a.name; + }); } get authorUrls() { @@ -1109,21 +1114,38 @@ export default class IscnRegisterForm extends Vue { } async mounted() { - if (this.epubMetadata) { - this.name = this.epubMetadata.title; - this.description = this.extractText(this.epubMetadata.description); - this.author.name = this.epubMetadata.author; - this.language = this.epubMetadata.language - this.tags = this.epubMetadata.tags - this.thumbnailUrl = this.formatArweave(this.epubMetadata.thumbnailUrl) as string - if (this.author.name) { this.authors.push(this.author) } + if (this.epubMetadata) { + this.name = this.epubMetadata.title; + this.description = this.extractText(this.epubMetadata.description); + this.author.name = this.epubMetadata.author; + this.author.authorDescription = 'Author' + this.language = this.epubMetadata.language + this.tags = this.epubMetadata.tags + this.thumbnailUrl = this.formatArweave(this.epubMetadata.thumbnailUrl) as string + if (this.author.name) { + this.authors.push(this.author) } - - this.uploadStatus = 'loading' - // ISCN Fee needs Arweave fee to calculate - await this.calculateISCNFee() - this.uploadStatus = '' } + if (this.address) { + const iscnOwner = { + name: this.$t('iscn.meta.stakeholders.name.placeholder') as string, + wallet: [{ + content: 'like1qv66yzpgg9f8w46zj7gkuk9wd2nrpqmca3huxf', + id: 1, + type: 'like', + isOpenOptions: false, + }], + url: [], + likerId: '', + authorDescription: 'ISCN owner', + } + this.authors.push(iscnOwner) + } + this.uploadStatus = 'loading' + // ISCN Fee needs Arweave fee to calculate + await this.calculateISCNFee() + this.uploadStatus = '' +} addContentFingerprint() { this.customContentFingerprints.push(this.contentFingerprintInput) diff --git a/locales/en.json b/locales/en.json index 0878b09c..536eb396 100644 --- a/locales/en.json +++ b/locales/en.json @@ -163,6 +163,7 @@ "iscn.meta.stakeholders.id": "Stakeholder ID", "iscn.meta.stakeholders.likerId": "Liker ID", "iscn.meta.stakeholders.name": "Stakeholder Name", + "iscn.meta.stakeholders.name.placeholder": "{ your display name }", "iscn.meta.stakeholders.url": "URL", "iscn.meta.stakeholders.wallet.copied": "Copied", "iscn.meta.stakeholders.wallet.placeholder": "Wallet addresses", diff --git a/types/author.d.ts b/types/author.d.ts index 0319aa0c..3a567f82 100644 --- a/types/author.d.ts +++ b/types/author.d.ts @@ -1,7 +1,7 @@ export interface Author { name: string; url: string[]; - wallet: string[]; + wallet: any; likerId: string; authorDescription: string; }