31 lines
893 B
JavaScript
31 lines
893 B
JavaScript
class onboardingLandingDialog extends EICDialogContent {
|
|
|
|
actions = [
|
|
]
|
|
|
|
constructor(options) { super(options); }
|
|
|
|
DOMContentLoaded(options) {
|
|
ui.eicfy(this.el);
|
|
|
|
let buttons = this.findAll('.profiles button');
|
|
for(let button of buttons) button.addEventListener('click', this.onProfileSelect.bind(this));
|
|
this.logoutLink = this.find('.onboarding .logout a');
|
|
this.logoutLink.addEventListener('click', (event) => {
|
|
event.preventDefault()
|
|
event.stopPropagation()
|
|
app.User.logout()
|
|
this.commit()
|
|
});
|
|
}
|
|
|
|
onProfileSelect(event) {
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
|
|
let profile = event.currentTarget.dataset.type;
|
|
this.commit(profile);
|
|
}
|
|
}
|
|
|
|
app.registerClass('onboardingLandingDialog',onboardingLandingDialog); |