mirror of https://github.com/keeweb/keeweb.git
confirmation for deleting an entry on mobile
This commit is contained in:
parent
ba57bf9503
commit
3df178a026
|
@ -258,6 +258,8 @@
|
|||
"detDelFromTrash": "Delete from trash?",
|
||||
"detDelFromTrashBody": "You will not be able to put it back.",
|
||||
"detDelFromTrashBodyHint": "To quickly remove all items from trash, click Empty icon in Trash menu.",
|
||||
"detDelToTrash": "Delete the entry?",
|
||||
"detDelToTrashBody": "The entry will be moved to the trash folder.",
|
||||
"detFieldCopied": "Copied",
|
||||
"detFieldCopiedTime": "Copied for {} seconds",
|
||||
"detCopyHint": "You can copy field value with click on its title",
|
||||
|
|
|
@ -29,6 +29,7 @@ const Format = require('../../util/format');
|
|||
const Locale = require('../../util/locale');
|
||||
const Tip = require('../../util/tip');
|
||||
const FileSaver = require('../../util/file-saver');
|
||||
const FeatureDetector = require('../../util/feature-detector');
|
||||
const Timeouts = require('../../const/timeouts');
|
||||
const Copyable = require('../../mixins/copyable');
|
||||
|
||||
|
@ -943,8 +944,20 @@ const DetailsView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
moveToTrash() {
|
||||
this.model.moveToTrash();
|
||||
Backbone.trigger('refresh');
|
||||
const doMove = () => {
|
||||
this.model.moveToTrash();
|
||||
Backbone.trigger('refresh');
|
||||
};
|
||||
if (FeatureDetector.isMobile) {
|
||||
Alerts.yesno({
|
||||
header: Locale.detDelToTrash,
|
||||
body: Locale.detDelToTrashBody,
|
||||
icon: 'trash',
|
||||
success: doMove
|
||||
});
|
||||
} else {
|
||||
doMove();
|
||||
}
|
||||
},
|
||||
|
||||
clone() {
|
||||
|
|
|
@ -10,6 +10,7 @@ Release notes
|
|||
`-` fixed field editing styles
|
||||
`*` dropped support for browsers without css variables
|
||||
`*` displaying websites as HTTPS if no scheme is provided
|
||||
`+` confirmation for deleting an entry on mobile
|
||||
|
||||
##### v1.9.3 (2019-09-07)
|
||||
`-` fixed group settings not being displayed
|
||||
|
|
Loading…
Reference in New Issue