From aeb5f1dfb1fbe750bc6f0c05c302fe48bda88c55 Mon Sep 17 00:00:00 2001 From: sultanmyrza-numbersprotocol Date: Fri, 13 May 2022 19:08:16 +0800 Subject: [PATCH 1/5] fix: inivtation share referral code text --- src/app/shared/share/share.service.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/shared/share/share.service.ts b/src/app/shared/share/share.service.ts index 9736d63c7..b4687ffad 100644 --- a/src/app/shared/share/share.service.ts +++ b/src/app/shared/share/share.service.ts @@ -43,9 +43,7 @@ export class ShareService { 'invitation.myReferralCodeAtCaptureAppIs', { referralCode: referralCode } ); - return Share.share({ - text: text, - url: 'https://www.numbersprotocol.io/#products', - }); + const urlToDownloadApp = 'https://www.numbersprotocol.io/#products'; + return Share.share({ text: text + '\n' + urlToDownloadApp }); } } From 9e71060aef0cfa21d2b4c87937407116147b758f Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Thu, 26 May 2022 16:33:48 +0800 Subject: [PATCH 2/5] fix text for share referal code --- src/app/shared/share/share.service.ts | 9 ++++----- src/assets/i18n/en-us.json | 2 +- src/assets/i18n/zh-tw.json | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/shared/share/share.service.ts b/src/app/shared/share/share.service.ts index 9736d63c7..0c9b2c7e3 100644 --- a/src/app/shared/share/share.service.ts +++ b/src/app/shared/share/share.service.ts @@ -40,12 +40,11 @@ export class ShareService { async shareReferralCode(referralCode: string) { const text = this.translocoService.translate( - 'invitation.myReferralCodeAtCaptureAppIs', + 'invitation.useMyReferralCodeToSignUpForCaptureAppPassVerificationAndWeBothGetNumPointsReward', { referralCode: referralCode } ); - return Share.share({ - text: text, - url: 'https://www.numbersprotocol.io/#products', - }); + const url = 'https://www.numbersprotocol.io/#products'; + + return Share.share({ text: text + '\n\n' + url }); } } diff --git a/src/assets/i18n/en-us.json b/src/assets/i18n/en-us.json index c46a93ae8..7bb8521e6 100644 --- a/src/assets/i18n/en-us.json +++ b/src/assets/i18n/en-us.json @@ -280,7 +280,7 @@ "invitation": "Invitation", "shareInvitationCode": "Share invitation code", "shareToGetRewarded": "Share to get rewarded", - "myReferralCodeAtCaptureAppIs": "My referral code at Capture App is {{referralCode}}" + "useMyReferralCodeToSignUpForCaptureAppPassVerificationAndWeBothGetNumPointsReward": "Use my referral code {{referralCode}} to sign up for Capture App, pass verification and we both get NUM Points reward!" }, "gopro": { "setup": "GoPro Setup", diff --git a/src/assets/i18n/zh-tw.json b/src/assets/i18n/zh-tw.json index dbe318404..ef4bac07f 100644 --- a/src/assets/i18n/zh-tw.json +++ b/src/assets/i18n/zh-tw.json @@ -280,7 +280,7 @@ "invitation": "邀請", "shareInvitationCode": "分享邀請碼", "shareToGetRewarded": "分享以獲得獎勵", - "myReferralCodeAtCaptureAppIs": "我在 Capture App 的推薦代碼是 {{referralCode}}" + "useMyReferralCodeToSignUpForCaptureAppPassVerificationAndWeBothGetNumPointsReward": "透過我的推薦碼 {{referralCode}} 在 Capture App 註冊,一起獲得 NUM Points!" }, "gopro": { "setup": "GoPro 設置", From 7f0c53321922236da14f9d2520d2a59a7da4ed10 Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Thu, 26 May 2022 16:52:50 +0800 Subject: [PATCH 3/5] fix(user-guide): highligh first capture once and don't show again --- .../settings/user-guide/user-guide.page.html | 8 ++++++ .../settings/user-guide/user-guide.page.ts | 8 ++++++ .../shared/user-guide/user-guide.service.ts | 25 ++++++++++++++++++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/app/features/settings/user-guide/user-guide.page.html b/src/app/features/settings/user-guide/user-guide.page.html index b770b305f..f7fff5225 100644 --- a/src/app/features/settings/user-guide/user-guide.page.html +++ b/src/app/features/settings/user-guide/user-guide.page.html @@ -39,6 +39,14 @@ (ionChange)="setHasCapturedVideoWithCustomCamera($event)" > + + Has Highlighted First Capture + + Has Opened Details Page Date: Fri, 27 May 2022 00:38:01 +0800 Subject: [PATCH 4/5] fix(sign-up.page): convert generic backend error to more specific --- src/app/features/signup/signup.page.ts | 26 ++++++++++++++++++++++++-- src/app/shared/error/error.service.ts | 1 + src/assets/i18n/en-us.json | 4 +++- src/assets/i18n/zh-tw.json | 4 +++- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/app/features/signup/signup.page.ts b/src/app/features/signup/signup.page.ts index d7337ef68..27a0407e1 100644 --- a/src/app/features/signup/signup.page.ts +++ b/src/app/features/signup/signup.page.ts @@ -213,8 +213,30 @@ export class SignupPage { ) ), catchError((err: unknown) => { - // eslint-disable-next-line @typescript-eslint/no-magic-numbers - if (err instanceof HttpErrorResponse && err.status === 400) { + if ( + err instanceof HttpErrorResponse && + err.error.error?.type === 'duplicate_email' + ) { + return this.errorService.toastError$( + this.translocoService.translate( + 'error.diaBackend.duplicate_email' + ) + ); + } + if ( + err instanceof HttpErrorResponse && + err.error.error?.details?.username?.length > 0 + ) { + return this.errorService.toastError$( + this.translocoService.translate( + 'error.diaBackend.duplicate_username' + ) + ); + } + if ( + err instanceof HttpErrorResponse && + err.error.error?.type === 'invalid_referral_code' + ) { return this.errorService.toastError$( this.translocoService.translate( 'error.diaBackend.invalid_referral_code' diff --git a/src/app/shared/error/error.service.ts b/src/app/shared/error/error.service.ts index 46dbf5792..404cc2f86 100644 --- a/src/app/shared/error/error.service.ts +++ b/src/app/shared/error/error.service.ts @@ -30,6 +30,7 @@ export class ErrorService { timeoutError, unknownError, }) => { + // eslint-disable-next-line no-debugger if (typeof error === 'string') return error; if (error instanceof HttpErrorResponse) { if (error.status === HttpErrorCode.INVALID) diff --git a/src/assets/i18n/en-us.json b/src/assets/i18n/en-us.json index c46a93ae8..e0dcecafb 100644 --- a/src/assets/i18n/en-us.json +++ b/src/assets/i18n/en-us.json @@ -221,7 +221,9 @@ "unable_to_confirm_order": "Unable to confirm order. Please try again.", "unpaid_num_exceed_threshold": "Too much unpaid NUM. Please contact us with email to restore account functionality.", "invalid_network_app_name": "Invalid network app.", - "invalid_referral_code": "Invalide referral code" + "invalid_referral_code": "Invalid referral code", + "duplicate_email": "The email has already been registered", + "duplicate_username": "User with this username already exists" }, "wallets": { "emptyTransferAmount": "Please enter a valid transfer amount.", diff --git a/src/assets/i18n/zh-tw.json b/src/assets/i18n/zh-tw.json index dbe318404..0e2724df2 100644 --- a/src/assets/i18n/zh-tw.json +++ b/src/assets/i18n/zh-tw.json @@ -221,7 +221,9 @@ "unable_to_confirm_order": "無法確認訂單。請再試一次。", "unpaid_num_exceed_threshold": "太多未付的 NUM。請通過電子郵件與我們聯繫以恢復帳戶功能。", "invalid_network_app_name": "無效的網絡動作。", - "invalid_referral_code": "無效的推薦代碼" + "invalid_referral_code": "無效的推薦代碼", + "duplicate_email": "該電子郵件已註冊", + "duplicate_username": "用戶名已被其他使用者使用" }, "wallets": { "emptyTransferAmount": "請輸入有效轉帳金額。", From 1a2fbb95d52f3b7c0a85b4e674d0eecd6267eb77 Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Fri, 27 May 2022 17:19:25 +0800 Subject: [PATCH 5/5] build: bump to 0.57.3 --- CHANGELOG.md | 11 +++++++++++ android/app/build.gradle | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bbfe5786..ee8d37b33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.57.3 - 2022-05-27 + +### Fixed + +- Fix sign up page errors to be more specific +- Fix user guide for highlighting capture less persistant + +## Changed + +- Change share referral code text + ## 0.57.2 - 2022-05-24 ### Fixed diff --git a/android/app/build.gradle b/android/app/build.gradle index bf23722a6..80106d7c4 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "io.numbersprotocol.capturelite" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 395 - versionName "0.57.2" + versionCode 396 + versionName "0.57.3" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildFeatures { diff --git a/package-lock.json b/package-lock.json index c604b953c..aeff5970b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "capture-lite", - "version": "0.57.2", + "version": "0.57.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "capture-lite", - "version": "0.57.2", + "version": "0.57.3", "dependencies": { "@angular/animations": "^12.2.4", "@angular/cdk": "^12.2.4", diff --git a/package.json b/package.json index 3c70de591..73774f69f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "capture-lite", - "version": "0.57.2", + "version": "0.57.3", "author": "numbersprotocol", "homepage": "https://numbersprotocol.io/", "scripts": {