Merge branch 'develop' into feature/multiple-selection
This commit is contained in:
@@ -84,6 +84,8 @@ class AccountMenuCtrl extends PureViewCtrl<unknown, AccountMenuState> {
|
||||
private closeFunction?: () => void;
|
||||
private removeProtectionLengthObserver?: () => void;
|
||||
|
||||
public passcodeInput!: JQLite;
|
||||
|
||||
/* @ngInject */
|
||||
constructor($timeout: ng.ITimeoutService, appVersion: string) {
|
||||
super($timeout);
|
||||
@@ -144,7 +146,7 @@ class AccountMenuCtrl extends PureViewCtrl<unknown, AccountMenuState> {
|
||||
async $onInit() {
|
||||
super.$onInit();
|
||||
this.setState({
|
||||
showSessions: await this.application.userCanManageSessions()
|
||||
showSessions: await this.application.userCanManageSessions(),
|
||||
});
|
||||
|
||||
const sync = this.appState.sync;
|
||||
@@ -379,15 +381,8 @@ class AccountMenuCtrl extends PureViewCtrl<unknown, AccountMenuState> {
|
||||
this.appState.openSessionsModal();
|
||||
}
|
||||
|
||||
async destroyLocalData() {
|
||||
if (
|
||||
await confirmDialog({
|
||||
text: STRING_SIGN_OUT_CONFIRMATION,
|
||||
confirmButtonStyle: 'danger',
|
||||
})
|
||||
) {
|
||||
this.application.signOut();
|
||||
}
|
||||
signOut() {
|
||||
this.appState.accountMenu.setSigningOut(true);
|
||||
}
|
||||
|
||||
showRegister() {
|
||||
@@ -517,17 +512,21 @@ class AccountMenuCtrl extends PureViewCtrl<unknown, AccountMenuState> {
|
||||
async submitPasscodeForm() {
|
||||
const passcode = this.getState().formData.passcode!;
|
||||
if (passcode !== this.getState().formData.confirmPasscode!) {
|
||||
this.application!.alertService!.alert(STRING_NON_MATCHING_PASSCODES);
|
||||
await alertDialog({
|
||||
text: STRING_NON_MATCHING_PASSCODES,
|
||||
});
|
||||
this.passcodeInput[0].focus();
|
||||
return;
|
||||
}
|
||||
|
||||
await preventRefreshing(
|
||||
STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_CHANGE,
|
||||
async () => {
|
||||
if (this.application!.hasPasscode()) {
|
||||
await this.application!.changePasscode(passcode);
|
||||
} else {
|
||||
await this.application!.addPasscode(passcode);
|
||||
const successful = this.application.hasPasscode()
|
||||
? await this.application.changePasscode(passcode)
|
||||
: await this.application.addPasscode(passcode);
|
||||
if (!successful) {
|
||||
this.passcodeInput[0].focus();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -313,9 +313,7 @@ class PanelResizerCtrl implements PanelResizerScope {
|
||||
}
|
||||
if (Math.round(width + this.lastLeft) === Math.round(parentRect.width)) {
|
||||
this.panel.style.width = `calc(100% - ${this.lastLeft}px)`;
|
||||
this.panel.style.flexBasis = `calc(100% - ${this.lastLeft}px)`;
|
||||
} else {
|
||||
this.panel.style.flexBasis = width + 'px';
|
||||
this.panel.style.width = width + 'px';
|
||||
}
|
||||
this.lastWidth = width;
|
||||
@@ -344,8 +342,8 @@ class PanelResizerCtrl implements PanelResizerScope {
|
||||
|
||||
/**
|
||||
* If an iframe is displayed adjacent to our panel, and the mouse exits over the iframe,
|
||||
* document[onmouseup] is not triggered because the document is no longer the same over
|
||||
* the iframe. We add an invisible overlay while resizing so that the mouse context
|
||||
* document[onmouseup] is not triggered because the document is no longer the same over
|
||||
* the iframe. We add an invisible overlay while resizing so that the mouse context
|
||||
* remains in our main document.
|
||||
*/
|
||||
addInvisibleOverlay() {
|
||||
|
||||
Reference in New Issue
Block a user