2021-02-22 20:27:58 +00:00
|
|
|
import {
|
|
|
|
Sib
|
2021-05-11 08:50:17 +00:00
|
|
|
} from 'https://cdn.skypack.dev/@startinblox/core@0.17';
|
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: {
|
2021-05-17 10:45:19 +00:00
|
|
|
route: window.hubl.getRoute((window.hubl.defaultRoute || "dashboard"), true)
|
2021-02-23 20:43:21 +00:00
|
|
|
}
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
document.querySelector("sib-auth").login();
|
|
|
|
}
|
2021-02-17 17:40:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Sib.register(HublAutoLogin);
|