web: expand sidebar by default on desktop, auto collapse
This commit is contained in:
parent
6a835ad192
commit
4d88dcff08
|
@ -18,6 +18,10 @@ export abstract class Interface extends LitElement {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
this.sidebarOpen = window.outerWidth >= 1280;
|
||||||
|
window.addEventListener("resize", () => {
|
||||||
|
this.sidebarOpen = window.outerWidth >= 1280;
|
||||||
|
});
|
||||||
window.addEventListener("ak-sidebar-toggle", () => {
|
window.addEventListener("ak-sidebar-toggle", () => {
|
||||||
this.sidebarOpen = !this.sidebarOpen;
|
this.sidebarOpen = !this.sidebarOpen;
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue