mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-21 12:34:22 +08:00
Cleanup AbstractViewPopup handling
This commit is contained in:
parent
163e926d6b
commit
98d686bc14
2 changed files with 4 additions and 13 deletions
|
@ -78,9 +78,10 @@ export class AbstractViewPopup extends AbstractView
|
|||
afterShow() {} // Happens after showModal() animation transitionend
|
||||
onHide() {} // Happens before animation transitionend
|
||||
afterHide() {} // Happens after animation transitionend
|
||||
|
||||
close() {}
|
||||
*/
|
||||
close() {
|
||||
this.modalVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
AbstractViewPopup.showModal = function(params = []) {
|
||||
|
|
|
@ -48,8 +48,6 @@ const
|
|||
vm.viewModelDom = ViewModelClass.__dom = vmDom;
|
||||
|
||||
if (dialog) {
|
||||
vm.close = () => hideScreenPopup(ViewModelClass);
|
||||
|
||||
// Firefox < 98 / Safari < 15.4 HTMLDialogElement not defined
|
||||
if (!vmDom.showModal) {
|
||||
vmDom.className = 'polyfill';
|
||||
|
@ -155,14 +153,6 @@ const
|
|||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Function} ViewModelClassToHide
|
||||
* @returns {void}
|
||||
*/
|
||||
hideScreenPopup = ViewModelClassToHide =>
|
||||
ViewModelClassToHide?.__vm && ViewModelClassToHide.__dom
|
||||
&& ViewModelClassToHide.__vm.modalVisible(false),
|
||||
|
||||
/**
|
||||
* @param {string} screenName
|
||||
* @param {string} subPart
|
||||
|
@ -276,7 +266,7 @@ export const
|
|||
});
|
||||
|
||||
const cross = new Crossroads();
|
||||
cross.addRoute(/^([^/]+)\/?(.*)$/, screenOnRoute);
|
||||
cross.addRoute(/^([^/]*)\/?(.*)$/, screenOnRoute);
|
||||
|
||||
hasher.add(cross.parse.bind(cross));
|
||||
hasher.init();
|
||||
|
|
Loading…
Add table
Reference in a new issue