mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +00:00
Update url on tab reorder (#18169)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
095d171a61
commit
479a625662
@ -844,6 +844,9 @@ class HUIRoot extends LitElement {
|
|||||||
const oldIndex = this._curView as number;
|
const oldIndex = this._curView as number;
|
||||||
const newIndex = (this._curView as number) - 1;
|
const newIndex = (this._curView as number) - 1;
|
||||||
this._curView = newIndex;
|
this._curView = newIndex;
|
||||||
|
if (!this.config.views[oldIndex].path) {
|
||||||
|
this._navigateToView(newIndex, true);
|
||||||
|
}
|
||||||
lovelace.saveConfig(swapView(lovelace.config, oldIndex, newIndex));
|
lovelace.saveConfig(swapView(lovelace.config, oldIndex, newIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -856,6 +859,9 @@ class HUIRoot extends LitElement {
|
|||||||
const oldIndex = this._curView as number;
|
const oldIndex = this._curView as number;
|
||||||
const newIndex = (this._curView as number) + 1;
|
const newIndex = (this._curView as number) + 1;
|
||||||
this._curView = newIndex;
|
this._curView = newIndex;
|
||||||
|
if (!this.config.views[oldIndex].path) {
|
||||||
|
this._navigateToView(newIndex, true);
|
||||||
|
}
|
||||||
lovelace.saveConfig(swapView(lovelace.config, oldIndex, newIndex));
|
lovelace.saveConfig(swapView(lovelace.config, oldIndex, newIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user