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

@@ -1,12 +1,11 @@
import { WebApplication } from '@/ui_models/application';
export declare class AutolockService {
private application;
import { ApplicationService } from 'snjs';
export declare class AutolockService extends ApplicationService {
private unsubState;
private pollFocusInterval;
private lastFocusState?;
private lockAfterDate?;
private lockTimeout?;
constructor(application: WebApplication);
onAppLaunch(): Promise<void>;
observeVisibility(): void;
deinit(): void;
private lockApplication;

View File

@@ -32,11 +32,12 @@ export declare const STRING_GENERATING_LOGIN_KEYS = "Generating Login Keys...";
export declare const STRING_GENERATING_REGISTER_KEYS = "Generating Account Keys...";
export declare const STRING_INVALID_IMPORT_FILE = "Unable to open file. Ensure it is a proper JSON file and try again.";
export declare function StringImportError(errorCount: number): string;
export declare const STRING_STORAGE_UPDATE = "Storage Update";
export declare const STRING_AUTHENTICATION_REQUIRED = "Authentication Required";
export declare const STRING_UNSUPPORTED_BACKUP_FILE_VERSION = "This backup file was created using an unsupported version of the application and cannot be imported here. Please update your application and try again.";
/** @password_change */
export declare const STRING_FAILED_PASSWORD_CHANGE = "There was an error re-encrypting your items. Your password was changed, but not all your items were properly re-encrypted and synced. You should try syncing again. If all else fails, you should restore your notes from backup.";
export declare const STRING_CONFIRM_APP_QUIT_DURING_UPGRADE: string;
export declare const STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_CHANGE: string;
export declare const STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_REMOVAL: string;
export declare const STRING_UPGRADE_ACCOUNT_CONFIRM_TITLE = "Encryption upgrade available";
export declare const STRING_UPGRADE_ACCOUNT_CONFIRM_TEXT: string;
export declare const STRING_UPGRADE_ACCOUNT_CONFIRM_BUTTON = "Upgrade";

View File

@@ -42,7 +42,6 @@ export declare class WebApplication extends SNApplication {
checkForSecurityUpdate(): Promise<boolean>;
presentPasswordWizard(type: PasswordWizardType): void;
promptForChallenge(challenge: Challenge): void;
performProtocolUpgrade(): Promise<void>;
presentPrivilegesModal(action: ProtectedAction, onSuccess?: any, onCancel?: any): Promise<void>;
presentPrivilegesManagementModal(): void;
authenticationInProgress(): boolean;

View File

@@ -12,6 +12,11 @@ export declare class PureViewCtrl<P = CtrlProps, S = CtrlState> {
private unsubApp;
private unsubState;
private stateTimeout?;
/**
* Subclasses can optionally add an ng-if=ctrl.templateReady to make sure that
* no Angular handlebars/syntax render in the UI before display data is ready.
*/
protected templateReady: boolean;
constructor($timeout: ng.ITimeoutService, props?: P);
$onInit(): void;
deinit(): void;