feat: improve strings, challenges, and template readiness

This commit is contained in:
Mo Bitar
2020-09-23 22:33:33 -05:00
parent 825ec6bcbb
commit b3e5ca340d
21 changed files with 48 additions and 74 deletions

View File

@@ -12,8 +12,6 @@ import { WebDirective } from '@/types';
import { confirmDialog } from '@/services/alertService';
import {
STRING_SIGN_OUT_CONFIRMATION,
STRING_STORAGE_UPDATE,
STRING_AUTHENTICATION_REQUIRED,
} from '@/strings';
type InputValue = {
@@ -32,8 +30,6 @@ type ChallengeModalState = {
showForgotPasscodeLink: boolean,
processingPrompts: ChallengePrompt[],
hasAccount: boolean,
title: string,
subtitle: string
}
class ChallengeModalCtrl extends PureViewCtrl<{}, ChallengeModalState> {
@@ -93,8 +89,6 @@ class ChallengeModalCtrl extends PureViewCtrl<{}, ChallengeModalState> {
forgotPasscode: false,
showForgotPasscodeLink,
hasAccount: this.application.hasAccount(),
title: this.challenge.title,
subtitle: this.challenge.subtitle,
processingPrompts: []
});
this.application.addChallengeObserver(
@@ -137,14 +131,6 @@ class ChallengeModalCtrl extends PureViewCtrl<{}, ChallengeModalState> {
});
}
get modalTitle(): string {
if (this.challenge.reason === ChallengeReason.Migration) {
return STRING_STORAGE_UPDATE;
} else {
return STRING_AUTHENTICATION_REQUIRED;
}
}
async destroyLocalData() {
if (await confirmDialog({
text: STRING_SIGN_OUT_CONFIRMATION,