From 96697b7c3a48c93c85bf06fa7a7d5a1ee54c01c1 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Tue, 20 Feb 2024 10:35:40 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=9A=B8=20Adjust=20field=20order?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/IscnRegisterForm.vue | 176 ++++++++++++++------------------ 1 file changed, 79 insertions(+), 97 deletions(-) diff --git a/components/IscnRegisterForm.vue b/components/IscnRegisterForm.vue index 49f2d75c..61df379b 100644 --- a/components/IscnRegisterForm.vue +++ b/components/IscnRegisterForm.vue @@ -136,88 +136,19 @@ {{ $t('IscnRegisterForm.label.emptyFile') }} - + - - - -
- - -
-
- - - - - {{ $t('IscnRegisterForm.label.numbersProtocol.details.link') }} - - - - - - - - - - - - + +
@@ -346,14 +277,6 @@ - - - - - - + + + + + +
+ + +
+
+ + + + + {{ $t('IscnRegisterForm.label.numbersProtocol.details.link') }} + + + + + + + + + + Date: Tue, 20 Feb 2024 20:59:33 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=8E=A8=20Move=20sameAs=20list=20to=20?= =?UTF-8?q?upper=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/IscnRegisterForm.vue | 89 ++++--------------------------- components/SameAsFieldList.vue | 92 +++++++++++++-------------------- locales/en.json | 2 +- 3 files changed, 48 insertions(+), 135 deletions(-) diff --git a/components/IscnRegisterForm.vue b/components/IscnRegisterForm.vue index 61df379b..30db1d3e 100644 --- a/components/IscnRegisterForm.vue +++ b/components/IscnRegisterForm.vue @@ -247,36 +247,17 @@ /> - - - - + - - - - - - { + return this.sameAsList?.filter( + (items: any) => items.filename && items.url, + )?.map((sameAs: { filename: any; filetype: any; url: any }) => { if (sameAs.filename && sameAs.filetype) { return `${sameAs.url}?name=${sameAs.filename}.${sameAs.filetype}`; } @@ -1264,16 +1207,6 @@ export default class IscnRegisterForm extends Vue { return this.$t('IscnRegisterForm.arweave.link', { arweaveId }) } - handleOpenSameAsDialog() { - this.isOpenSameAsDialog = true - } - - confirmSameAsChange(value: any) { - logTrackerEvent(this, 'ISCNCreate', 'ConfirmSameAsChange', '', 1); - this.sameAsList = value - this.isOpenSameAsDialog = false - } - async getLikerIdsAddresses() { let likerIdsAddresses: any[] = []; try { diff --git a/components/SameAsFieldList.vue b/components/SameAsFieldList.vue index 9222d67e..918a61d5 100644 --- a/components/SameAsFieldList.vue +++ b/components/SameAsFieldList.vue @@ -6,15 +6,6 @@ class="flex items-center gap-[12px] p-[8px] rounded-[8px] border-2 border-shade-gray mb-[12px]" >
- -
- -
-
-
-
+ +
+ +
+
- -
diff --git a/components/SameAsFieldList.vue b/components/SameAsFieldList.vue index 4846197f..f490ed9e 100644 --- a/components/SameAsFieldList.vue +++ b/components/SameAsFieldList.vue @@ -7,13 +7,19 @@ >
- + - +
- -
+ +
-
- +
@@ -190,46 +175,6 @@
- - - - - - - @@ -292,7 +237,6 @@ export default class EditIscnPage extends Vue { step: number = 1 customContentFingerprints: string[] = [] contentFingerprintInput: string = '' - isOpenSameAsDialog: boolean = false isSubmitLoading: boolean = false shouldShowAlert: boolean = false errorMessage: string = '' @@ -390,16 +334,6 @@ export default class EditIscnPage extends Vue { this.contentFingerprintInput = '' } - handleOpenSameAsDialog() { - this.isOpenSameAsDialog = true - } - - confirmSameAsChange(value: any) { - logTrackerEvent(this, 'ISCNEdit', 'ConfirmSameAsChange', '', 1) - this.sameAsList = value - this.isOpenSameAsDialog = false - } - onSubmitUpload({ fileRecords }: { fileRecords: any[] }) { this.contentFingerprints = [] if (fileRecords && fileRecords.length) { From 37aad8ca2a3278e26aa6bccd9c78448d679c4135 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Fri, 23 Feb 2024 18:04:55 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=8E=A8=20Define=20the=20return=20type?= =?UTF-8?q?=20of=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/SameAsFieldList.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/components/SameAsFieldList.vue b/components/SameAsFieldList.vue index f490ed9e..7b2a4497 100644 --- a/components/SameAsFieldList.vue +++ b/components/SameAsFieldList.vue @@ -192,14 +192,14 @@ export default class SameAsFieldList extends Vue { } // eslint-disable-next-line class-methods-use-this - extractFilename(fullFilename: string) { - if (!fullFilename) return '' - const parts = fullFilename.split('.') - if (parts.length === 1) { - return fullFilename + extractFilename(fullFilename: string): string { + if (!fullFilename) return ''; + const parts = fullFilename.split('.'); + if (parts.length === 1 || (parts[0] === '' && parts.length === 2)) { + return fullFilename; } - return parts.slice(0, -1) - } + return parts.slice(0, -1).join('.'); +} // eslint-disable-next-line class-methods-use-this formatFileType(fileType: string) {