mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Edit that significantly changes the reflow uses a reload trick to work
This commit is contained in:
parent
557fa730cc
commit
10b640e3de
@ -17,6 +17,14 @@ export class Dashboard {
|
|||||||
this.dashlets = [];
|
this.dashlets = [];
|
||||||
this.channels = [];
|
this.channels = [];
|
||||||
this.#editButton();
|
this.#editButton();
|
||||||
|
if (localStorage.getItem("forceEditMode")) {
|
||||||
|
localStorage.removeItem("forceEditMode");
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.editMode();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#editButton() {
|
#editButton() {
|
||||||
@ -203,6 +211,7 @@ export class Dashboard {
|
|||||||
data: JSON.stringify(request),
|
data: JSON.stringify(request),
|
||||||
contentType : 'application/json',
|
contentType : 'application/json',
|
||||||
success: () => {
|
success: () => {
|
||||||
|
localStorage.setItem("forceEditMode", "true");
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -244,6 +253,7 @@ export class Dashboard {
|
|||||||
success: (data) => {
|
success: (data) => {
|
||||||
this.dashletIdentities = data;
|
this.dashletIdentities = data;
|
||||||
this.layout.save(this.dashletIdentities);
|
this.layout.save(this.dashletIdentities);
|
||||||
|
localStorage.setItem("forceEditMode", "true");
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -587,32 +597,41 @@ export class Dashboard {
|
|||||||
|
|
||||||
clickTrash(i) {
|
clickTrash(i) {
|
||||||
this.dashletIdentities.splice(i, 1);
|
this.dashletIdentities.splice(i, 1);
|
||||||
this.#replaceDashletList();
|
this.layout.save(this.dashletIdentities);
|
||||||
|
localStorage.setItem("forceEditMode", "true");
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
zoomIn(i) {
|
zoomIn(i) {
|
||||||
|
console.log(i);
|
||||||
if (this.dashletIdentities[i].size < 12) {
|
if (this.dashletIdentities[i].size < 12) {
|
||||||
this.dashletIdentities[i].size += 1;
|
this.dashletIdentities[i].size += 1;
|
||||||
}
|
}
|
||||||
this.#replaceDashletList();
|
this.layout.save(this.dashletIdentities);
|
||||||
|
localStorage.setItem("forceEditMode", "true");
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
zoomOut(i) {
|
zoomOut(i) {
|
||||||
if (this.dashletIdentities[i].size > 1) {
|
if (this.dashletIdentities[i].size > 1) {
|
||||||
this.dashletIdentities[i].size -= 1;
|
this.dashletIdentities[i].size -= 1;
|
||||||
}
|
}
|
||||||
this.#replaceDashletList();
|
this.layout.save(this.dashletIdentities);
|
||||||
|
localStorage.setItem("forceEditMode", "true");
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAll() {
|
removeAll() {
|
||||||
this.dashletIdentities = [];
|
this.dashletIdentities = [];
|
||||||
this.layout.save(this.dashletIdentities);
|
this.layout.save(this.dashletIdentities);
|
||||||
|
localStorage.setItem("forceEditMode", "true");
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
addAll() {
|
addAll() {
|
||||||
this.dashletIdentities = DashletMenu;
|
this.dashletIdentities = DashletMenu;
|
||||||
this.layout.save(this.dashletIdentities);
|
this.layout.save(this.dashletIdentities);
|
||||||
|
localStorage.setItem("forceEditMode", "true");
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user