Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/viewer-init.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* extracted by css-entry-points-plugin */
@import './init-BCDbjQ97.chunk.css';
@import './init-DWUwQFBL.chunk.css';
@import './logger-60RCWKf0.chunk.css';
@import './NcActionButton-C9055XKu.chunk.css';
@import './NcActionLink-lgtGSyky.chunk.css';
58 changes: 28 additions & 30 deletions js/viewer-init.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-init.mjs.map

Large diffs are not rendered by default.

28 changes: 1 addition & 27 deletions src/components/ImageEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,7 @@ export default {
},

methods: {
onClose(closingReason, haveNotSavedChanges) {
if (haveNotSavedChanges) {
this.onExitWithoutSaving()
return
}
onClose() {
window.removeEventListener('keydown', this.handleKeydown, true)
this.$emit('close')
},
Expand Down Expand Up @@ -206,28 +202,6 @@ export default {
}
},

/**
* Show warning if unsaved changes
*/
onExitWithoutSaving() {
OC.dialogs.confirmDestructive(
translations.changesLoseWarningHint + '\n\n' + translations.discardChangesWarningHint,
t('viewer', 'Unsaved changes'),
{
type: OC.dialogs.YES_NO_BUTTONS,
confirm: t('viewer', 'Drop changes'),
confirmClasses: 'error',
cancel: translations.cancel,
},
(decision) => {
if (!decision) {
return
}
this.onClose('warning-ignored', false)
},
)
},

// Key Handlers, override default Viewer arrow and escape key
handleKeydown(event) {
// Enter needs to be reached through as otherwise saving text does not work
Expand Down
Loading