mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-15 04:04:50 +08:00
17669b7be0
Signature plugin fixes Add view decorator A large number of fixes
48 lines
781 B
JavaScript
48 lines
781 B
JavaScript
|
|
import ko from 'ko';
|
|
|
|
import Promises from 'Promises/User/Ajax';
|
|
|
|
import {view, ViewType} from 'Knoin/Knoin';
|
|
import {AbstractViewNext} from 'Knoin/AbstractViewNext';
|
|
|
|
@view({
|
|
name: 'View/Popup/WelcomePage',
|
|
type: ViewType.Popup,
|
|
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();
|
|
}
|
|
}
|
|
|
|
module.exports = WelcomePagePopupView;
|