mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-10 08:48:03 +08:00
e6e0b02849
Flow first look
47 lines
775 B
JavaScript
47 lines
775 B
JavaScript
|
|
import ko from 'ko';
|
|
|
|
import Promises from 'Promises/User/Ajax';
|
|
|
|
import {popup} from 'Knoin/Knoin';
|
|
import {AbstractViewNext} from 'Knoin/AbstractViewNext';
|
|
|
|
@popup({
|
|
name: 'View/Popup/WelcomePage',
|
|
templateID: 'PopupsWelcomePage'
|
|
})
|
|
class WelcomePagePopupView extends AbstractViewNext
|
|
{
|
|
constructor() {
|
|
super();
|
|
|
|
this.welcomePageURL = ko.observable('');
|
|
|
|
this.closeFocused = ko.observable(false);
|
|
}
|
|
|
|
clearPopup() {
|
|
this.welcomePageURL('');
|
|
this.closeFocused(false);
|
|
}
|
|
|
|
/**
|
|
* @param {string} sUrl
|
|
* @returns {void}
|
|
*/
|
|
onShow(sUrl) {
|
|
this.clearPopup();
|
|
|
|
this.welcomePageURL(sUrl);
|
|
}
|
|
|
|
onShowWithDelay() {
|
|
this.closeFocused(true);
|
|
}
|
|
|
|
onHide() {
|
|
Promises.welcomeClose();
|
|
}
|
|
}
|
|
|
|
export {WelcomePagePopupView, WelcomePagePopupView as default};
|