fix: unfold tree if monitor is accessed directly

This commit is contained in:
Peace 2023-01-28 14:15:25 +01:00
parent f3ac351d75
commit faf3488b1e
No known key found for this signature in database
GPG Key ID: 0EF6B46E172B739F

View File

@ -117,7 +117,12 @@ export default {
}
},
beforeMount() {
// this.isCollapsed = localStorage.getItem(`monitor_${this.monitor.id}_collapsed`) === "true";
// Always unfold if monitor is accessed directly
if (this.monitor.childrenIDs.includes(parseInt(this.$route.params.id))) {
this.isCollapsed = false;
return;
}
let storage = window.localStorage.getItem("monitorCollapsed");
if (storage === null) {