mirror of https://github.com/keeweb/keeweb.git
release date
This commit is contained in:
parent
083cbe9840
commit
893a0f43c1
|
@ -38,7 +38,7 @@ const Alerts = {
|
||||||
Alerts.alertDisplayed = true;
|
Alerts.alertDisplayed = true;
|
||||||
const view = new ModalView(config);
|
const view = new ModalView(config);
|
||||||
view.render();
|
view.render();
|
||||||
view.on('result', (res, check) => {
|
view.once('result', (res, check) => {
|
||||||
if (res && config.success) {
|
if (res && config.success) {
|
||||||
config.success(res, check);
|
config.success(res, check);
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,6 +333,8 @@
|
||||||
"appSaveError": "Save Error",
|
"appSaveError": "Save Error",
|
||||||
"appSaveErrorBody": "Failed to auto-save file",
|
"appSaveErrorBody": "Failed to auto-save file",
|
||||||
"appSaveErrorBodyMul": "Failed to auto-save files:",
|
"appSaveErrorBodyMul": "Failed to auto-save files:",
|
||||||
|
"appSaveErrorExitLoseChanges": "Quit and lose all changes",
|
||||||
|
"appSaveErrorExitLoseChangesBody": "You can either quit the app and lose all changes, or go file settings to export data",
|
||||||
"appSettingsError": "Error loading app",
|
"appSettingsError": "Error loading app",
|
||||||
"appSettingsErrorBody": "There was an error loading app settings. Please double check the app URL or contact your administrator.",
|
"appSettingsErrorBody": "There was an error loading app settings. Please double check the app URL or contact your administrator.",
|
||||||
"appNotSupportedError": "Your browser doesn't support some important features we're using.",
|
"appNotSupportedError": "Your browser doesn't support some important features we're using.",
|
||||||
|
|
|
@ -382,11 +382,14 @@ class AppView extends View {
|
||||||
if (Launcher) {
|
if (Launcher) {
|
||||||
if (!this.exitAlertShown) {
|
if (!this.exitAlertShown) {
|
||||||
if (this.model.settings.autoSave) {
|
if (this.model.settings.autoSave) {
|
||||||
this.saveAndLock((result) => {
|
this.saveAndLock(
|
||||||
if (result) {
|
(result) => {
|
||||||
exit();
|
if (result) {
|
||||||
}
|
exit();
|
||||||
});
|
}
|
||||||
|
},
|
||||||
|
{ appClosing: true }
|
||||||
|
);
|
||||||
return Launcher.preventExit(e);
|
return Launcher.preventExit(e);
|
||||||
}
|
}
|
||||||
this.exitAlertShown = true;
|
this.exitAlertShown = true;
|
||||||
|
@ -400,11 +403,14 @@ class AppView extends View {
|
||||||
],
|
],
|
||||||
success: (result) => {
|
success: (result) => {
|
||||||
if (result === 'save') {
|
if (result === 'save') {
|
||||||
this.saveAndLock((result) => {
|
this.saveAndLock(
|
||||||
if (result) {
|
(result) => {
|
||||||
exit();
|
if (result) {
|
||||||
}
|
exit();
|
||||||
});
|
}
|
||||||
|
},
|
||||||
|
{ appClosing: true }
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
@ -531,7 +537,7 @@ class AppView extends View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
saveAndLock(complete) {
|
saveAndLock(complete, options) {
|
||||||
let pendingCallbacks = 0;
|
let pendingCallbacks = 0;
|
||||||
const errorFiles = [];
|
const errorFiles = [];
|
||||||
this.model.files.forEach(function (file) {
|
this.model.files.forEach(function (file) {
|
||||||
|
@ -551,17 +557,37 @@ class AppView extends View {
|
||||||
if (--pendingCallbacks === 0) {
|
if (--pendingCallbacks === 0) {
|
||||||
if (errorFiles.length && this.model.files.hasDirtyFiles()) {
|
if (errorFiles.length && this.model.files.hasDirtyFiles()) {
|
||||||
if (!Alerts.alertDisplayed) {
|
if (!Alerts.alertDisplayed) {
|
||||||
const alertBody =
|
const buttons = [Alerts.buttons.ok];
|
||||||
|
const errorStr =
|
||||||
errorFiles.length > 1
|
errorFiles.length > 1
|
||||||
? Locale.appSaveErrorBodyMul
|
? Locale.appSaveErrorBodyMul
|
||||||
: Locale.appSaveErrorBody;
|
: Locale.appSaveErrorBody;
|
||||||
|
let body = errorStr + ' ' + errorFiles.join(', ') + '.';
|
||||||
|
if (options?.appClosing) {
|
||||||
|
buttons.unshift({
|
||||||
|
result: 'ignore',
|
||||||
|
title: Locale.appSaveErrorExitLoseChanges,
|
||||||
|
error: true
|
||||||
|
});
|
||||||
|
body += '\n' + Locale.appSaveErrorExitLoseChangesBody;
|
||||||
|
}
|
||||||
Alerts.error({
|
Alerts.error({
|
||||||
header: Locale.appSaveError,
|
header: Locale.appSaveError,
|
||||||
body: alertBody + ' ' + errorFiles.join(', ')
|
body,
|
||||||
|
buttons,
|
||||||
|
complete: (res) => {
|
||||||
|
if (res === 'ignore') {
|
||||||
|
this.model.closeAllFiles();
|
||||||
|
complete(true);
|
||||||
|
} else {
|
||||||
|
complete(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
if (complete) {
|
if (complete) {
|
||||||
complete(false);
|
complete(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.closeAllFilesAndShowFirst();
|
this.closeAllFilesAndShowFirst();
|
||||||
|
|
|
@ -55,8 +55,8 @@ class ModalView extends View {
|
||||||
this.closeWithResult(result);
|
this.closeWithResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
bodyClick() {
|
bodyClick(e) {
|
||||||
if (typeof this.model.click === 'string') {
|
if (typeof this.model.click === 'string' && !e.target.matches('button')) {
|
||||||
this.closeWithResult(this.model.click);
|
this.closeWithResult(this.model.click);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,7 @@ $fa-var-info-circle: next-fa-glyph();
|
||||||
$fa-var-key: next-fa-glyph();
|
$fa-var-key: next-fa-glyph();
|
||||||
$fa-var-globe: next-fa-glyph();
|
$fa-var-globe: next-fa-glyph();
|
||||||
$fa-var-exclamation-triangle: next-fa-glyph();
|
$fa-var-exclamation-triangle: next-fa-glyph();
|
||||||
|
$fa-var-exclamation-circle: next-fa-glyph();
|
||||||
$fa-var-thumbtack: next-fa-glyph();
|
$fa-var-thumbtack: next-fa-glyph();
|
||||||
$fa-var-comments: next-fa-glyph();
|
$fa-var-comments: next-fa-glyph();
|
||||||
$fa-var-edit: next-fa-glyph();
|
$fa-var-edit: next-fa-glyph();
|
||||||
|
|
|
@ -2,9 +2,10 @@ Release notes
|
||||||
-------------
|
-------------
|
||||||
##### v1.16.1 (2020-12-04)
|
##### v1.16.1 (2020-12-04)
|
||||||
`+` Argon2id KDF support
|
`+` Argon2id KDF support
|
||||||
|
`+` added an options to quit the app and lose all changes
|
||||||
`-` fix #1637: git commit in the About box
|
`-` fix #1637: git commit in the About box
|
||||||
`-` fixed some design glitches
|
`-` fixed some design glitches
|
||||||
`*` keyfile paths are saved by default
|
`*` keyfile paths are saved by default
|
||||||
|
|
||||||
##### v1.16.0 (2020-11-29)
|
##### v1.16.0 (2020-11-29)
|
||||||
`+` updated icons and visual design
|
`+` updated icons and visual design
|
||||||
|
|
Loading…
Reference in New Issue