diff --git a/components/IscnRegisterForm.vue b/components/IscnRegisterForm.vue index 897cb8d8..026f5c9e 100644 --- a/components/IscnRegisterForm.vue +++ b/components/IscnRegisterForm.vue @@ -122,14 +122,25 @@ - - - +
+ + + + + + +
+
@@ -691,19 +702,24 @@ export default class IscnRegisterForm extends Vue { @walletModule.Action('initIfNecessary') initIfNecessary!: () => Promise typeOptions = [ -'Book', -'Photo', -'Image', -'CreativeWork', -] + 'Book', + 'Photo', + 'Image', + 'CreativeWork', + ] fileTypeOptions = [ -'epub', -'pdf', -'audio', -'jpg', -'png', -] + 'epub', + 'pdf', + 'audio', + 'jpg', + 'png', + ] + + languageOptions = [ + 'zh', + 'en', + ] licenseMap: { [key: string]: string | null } = { 'Copyright. All rights reserved.': 'All Rights Reserved', @@ -850,6 +866,10 @@ export default class IscnRegisterForm extends Vue { return 'CreativeWork' } + get defaultLanguage() { + return this.epubMetadata?.language || 'zh' + } + get authorDialogTitle() { return this.currentAuthorDialogType === AuthorDialogType.author ? this.$t('IscnRegisterForm.title.editAuthor') @@ -1053,6 +1073,10 @@ export default class IscnRegisterForm extends Vue { return arweaveIdList } + get isBookType() { + return this.type === 'Book' + } + @Watch('payload', { immediate: true, deep: true }) change() { this.debouncedCalculateISCNFee() @@ -1237,6 +1261,10 @@ export default class IscnRegisterForm extends Vue { this.type = value } + setLanguage(value: string) { + this.language = value + } + setLicense(value: string) { this.license = value } diff --git a/locales/en.json b/locales/en.json index 7a6d497b..275821e5 100644 --- a/locales/en.json +++ b/locales/en.json @@ -239,6 +239,7 @@ "IscnRegisterForm.label.registrant": "Registrant", "IscnRegisterForm.label.tags": "Tags", "IscnRegisterForm.label.type": "Type", + "IscnRegisterForm.label.language": "Language", "IscnRegisterForm.label.content": "Content Info", "IscnRegisterForm.label.uploading": "Loading files...", "IscnRegisterForm.label.url": "URL",