hubl/src/components/hubl-auto-login.js

22 lines
509 B
JavaScript
Raw Normal View History

import {
Sib
} from 'https://cdn.skypack.dev/@startinblox/core@0.15';
2021-02-17 17:40:12 +00:00
export const HublAutoLogin = {
name: 'hubl-auto-login',
created() {
document
.querySelectorAll(".loggedIn-loader")
.forEach(el => (el.style.display = "flex"));
2021-02-17 17:40:12 +00:00
window.dispatchEvent(
new CustomEvent('requestNavigation', {
detail: {
route: window.hubl.getRoute("dashboard", true)
2021-02-17 17:40:12 +00:00
}
}),
);
document.querySelector("sib-auth").login();
}
}
Sib.register(HublAutoLogin);