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": {
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
{
- // 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/app/shared/share/share.service.ts b/src/app/shared/share/share.service.ts
index 9736d63c7..8ecbc52d2 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 urlToDownloadApp = 'https://www.numbersprotocol.io/#products';
+ return Share.share({ text: text + '\n' + urlToDownloadApp });
}
}
diff --git a/src/app/shared/user-guide/user-guide.service.ts b/src/app/shared/user-guide/user-guide.service.ts
index 916c03a07..66d55a3a7 100644
--- a/src/app/shared/user-guide/user-guide.service.ts
+++ b/src/app/shared/user-guide/user-guide.service.ts
@@ -43,13 +43,14 @@ export class UserGuideService {
customTexts: this.customTexts,
});
this.setHasHighlightedCameraTab(true);
- } else if ((await this.hasOpenedDetailsPage()) === false) {
+ } else if ((await this.hasHighlightedFirstCapture()) === false) {
await this.delayBeforeStartTour();
this.joyrideService.startTour({
steps: ['highlightFirstCapture'],
showCounter: this.showCounter,
customTexts: this.customTexts,
});
+ this.setHasHighlightedFirstCapture(true);
} else if (
(await this.hasClickedDetailsPageOptionsMenu()) === true &&
(await this.hasHighligtedActivityButton()) === false
@@ -223,6 +224,27 @@ export class UserGuideService {
);
}
+ hasHighlightedFirstCapture$() {
+ return this.preferences.getBoolean$(
+ PrefKeys.HAS_HIGHLIGHTED_FIRST_CAPTURE,
+ false
+ );
+ }
+
+ async hasHighlightedFirstCapture() {
+ return await this.preferences.getBoolean(
+ PrefKeys.HAS_HIGHLIGHTED_FIRST_CAPTURE,
+ false
+ );
+ }
+
+ async setHasHighlightedFirstCapture(value: boolean) {
+ return await this.preferences.setBoolean(
+ PrefKeys.HAS_HIGHLIGHTED_FIRST_CAPTURE,
+ value
+ );
+ }
+
hasOpenedDetailsPage$() {
return this.preferences.getBoolean$(
PrefKeys.HAS_OPENED_DETAILS_PAGE,
@@ -363,6 +385,7 @@ const enum PrefKeys {
HAS_OPENED_CUSTOM_CAMERA_PAGE = 'HAS_OPENED_CUSTOM_CAMERA_PAGE',
HAS_CAPTURED_PHOTO_WITH_CUSTOM_CAMERA = 'HAS_CAPTURED_PHOTO_WITH_CUSTOM_CAMERA',
HAS_CAPTURED_VIDEO_WITH_CUSTOM_CAMERA = 'HAS_CAPTURED_VIDEO_WITH_CUSTOM_CAMERA',
+ HAS_HIGHLIGHTED_FIRST_CAPTURE = 'HAS_HIGHLIGHTED_FIRST_CAPTURE',
HAS_OPENED_DETAILS_PAGE = 'HAS_OPENED_DETAILS_PAGE',
HAS_CLICKED_DETAILS_PAGE_OPTIONS_MENU = 'HAS_CLICKED_DETAILS_PAGE_OPTIONS_MENU',
HAS_OPENED_ACTIVITIES_PAGE = 'HAS_OPENED_ACTIVITIES_PAGE',
diff --git a/src/assets/i18n/en-us.json b/src/assets/i18n/en-us.json
index c46a93ae8..956fd9d69 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.",
@@ -280,7 +282,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..23c1fe697 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": "請輸入有效轉帳金額。",
@@ -280,7 +282,7 @@
"invitation": "邀請",
"shareInvitationCode": "分享邀請碼",
"shareToGetRewarded": "分享以獲得獎勵",
- "myReferralCodeAtCaptureAppIs": "我在 Capture App 的推薦代碼是 {{referralCode}}"
+ "useMyReferralCodeToSignUpForCaptureAppPassVerificationAndWeBothGetNumPointsReward": "透過我的推薦碼 {{referralCode}} 在 Capture App 註冊,一起獲得 NUM Points!"
},
"gopro": {
"setup": "GoPro 設置",