minor: startinblox-feature-requests#9
This commit is contained in:
20
src/components/hubl-auto-login.js
Normal file
20
src/components/hubl-auto-login.js
Normal file
@ -0,0 +1,20 @@
|
||||
import { Sib } from 'https://cdn.skypack.dev/@startinblox/core@0.15';
|
||||
|
||||
export const HublAutoLogin = {
|
||||
name: 'hubl-auto-login',
|
||||
created() {
|
||||
document
|
||||
.querySelectorAll(".loggedIn")
|
||||
.forEach(el => (el.style.display = "flex"));
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('requestNavigation', {
|
||||
detail: {
|
||||
route: "dashboard"
|
||||
}
|
||||
}),
|
||||
);
|
||||
document.querySelector("sib-auth").login();
|
||||
}
|
||||
}
|
||||
|
||||
Sib.register(HublAutoLogin);
|
Reference in New Issue
Block a user