feature: revamp protocol upgrade dialog
This commit is contained in:
@@ -68,3 +68,11 @@ export const STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_CHANGE =
|
|||||||
export const STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_REMOVAL =
|
export const STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_REMOVAL =
|
||||||
"A passcode removal is in progress. You may lose data if you quit the app. " +
|
"A passcode removal is in progress. You may lose data if you quit the app. " +
|
||||||
"Are you sure you want to quit?"
|
"Are you sure you want to quit?"
|
||||||
|
|
||||||
|
export const STRING_UPGRADE_ACCOUNT_CONFIRM_TITLE = 'Encryption upgrade available';
|
||||||
|
export const STRING_UPGRADE_ACCOUNT_CONFIRM_TEXT =
|
||||||
|
'Encryption version 004 is available for your account and local data storage. ' +
|
||||||
|
'This version strengthens the encryption algorithms for your account and ' +
|
||||||
|
'disk use. To learn more about this upgrade, visit our ' +
|
||||||
|
'<a href="https://standardnotes.org/help/security" target="_blank">Security Upgrade page.</a>';
|
||||||
|
export const STRING_UPGRADE_ACCOUNT_CONFIRM_BUTTON = 'Upgrade';
|
||||||
|
|||||||
@@ -19,9 +19,13 @@ import { AppStateEvent, EventSource } from '@/ui_models/app_state';
|
|||||||
import {
|
import {
|
||||||
STRING_GENERIC_SYNC_ERROR,
|
STRING_GENERIC_SYNC_ERROR,
|
||||||
STRING_NEW_UPDATE_READY,
|
STRING_NEW_UPDATE_READY,
|
||||||
STRING_CONFIRM_APP_QUIT_DURING_UPGRADE
|
STRING_CONFIRM_APP_QUIT_DURING_UPGRADE,
|
||||||
|
STRING_UPGRADE_ACCOUNT_CONFIRM_TEXT,
|
||||||
|
STRING_UPGRADE_ACCOUNT_CONFIRM_TITLE,
|
||||||
|
STRING_UPGRADE_ACCOUNT_CONFIRM_BUTTON,
|
||||||
} from '@/strings';
|
} from '@/strings';
|
||||||
import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl';
|
import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl';
|
||||||
|
import { confirmDialog } from '@/services/alertService';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disable before production release.
|
* Disable before production release.
|
||||||
@@ -337,9 +341,15 @@ class FooterViewCtrl extends PureViewCtrl<{}, {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async openSecurityUpdate() {
|
async openSecurityUpdate() {
|
||||||
preventRefreshing(STRING_CONFIRM_APP_QUIT_DURING_UPGRADE, async () => {
|
if (await confirmDialog({
|
||||||
await this.application.performProtocolUpgrade();
|
title: STRING_UPGRADE_ACCOUNT_CONFIRM_TITLE,
|
||||||
});
|
text: STRING_UPGRADE_ACCOUNT_CONFIRM_TEXT,
|
||||||
|
confirmButtonText: STRING_UPGRADE_ACCOUNT_CONFIRM_BUTTON,
|
||||||
|
})) {
|
||||||
|
preventRefreshing(STRING_CONFIRM_APP_QUIT_DURING_UPGRADE, async () => {
|
||||||
|
await this.application.performProtocolUpgrade();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
findErrors() {
|
findErrors() {
|
||||||
|
|||||||
@@ -70,3 +70,7 @@
|
|||||||
button.sk-button {
|
button.sk-button {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--sn-stylekit-info-color);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user