2021-02-22 20:27:58 +00:00
|
|
|
import {
|
|
|
|
Sib
|
2021-03-16 14:27:30 +00:00
|
|
|
} from 'https://cdn.skypack.dev/@startinblox/core@0.16';
|
2021-02-17 17:40:12 +00:00
|
|
|
|
|
|
|
export const HublAutoLogin = {
|
|
|
|
name: 'hubl-auto-login',
|
|
|
|
created() {
|
2021-02-23 20:43:21 +00:00
|
|
|
if (window.location.pathname == "/login") {
|
|
|
|
document
|
|
|
|
.querySelectorAll(".loggedIn-loader")
|
|
|
|
.forEach(el => (el.style.display = "flex"));
|
|
|
|
window.dispatchEvent(
|
|
|
|
new CustomEvent('requestNavigation', {
|
|
|
|
detail: {
|
|
|
|
route: window.hubl.getRoute("dashboard", true)
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
document.querySelector("sib-auth").login();
|
|
|
|
}
|
2021-02-17 17:40:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Sib.register(HublAutoLogin);
|