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