mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 17:13:38 +08:00
20 lines
499 B
JavaScript
20 lines
499 B
JavaScript
|
(rl => {
|
||
|
if (rl) {
|
||
|
addEventListener('rl-view-model', e => {
|
||
|
// instanceof LoginUserView
|
||
|
if (e.detail && 'Login' === e.detail.viewModelTemplateID) {
|
||
|
const LoginUserView = e.detail,
|
||
|
submitCommand = LoginUserView.submitCommand;
|
||
|
LoginUserView.submitCommand = (self, event) => {
|
||
|
if (LoginUserView.email().includes('@gmail.com')) {
|
||
|
// TODO: redirect to google
|
||
|
} else {
|
||
|
submitCommand.call(LoginUserView, self, event);
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
})(window.rl);
|