mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
@@ -13,7 +13,6 @@ import "../components/ha-svg-icon";
|
||||
import "../components/ha-tab";
|
||||
import { haStyleScrollbar } from "../resources/styles";
|
||||
import type { HomeAssistant, Route } from "../types";
|
||||
import { withViewTransition } from "../common/util/view-transition";
|
||||
|
||||
export interface PageNavigation {
|
||||
path: string;
|
||||
@@ -113,11 +112,9 @@ class HassTabsSubpage extends LitElement {
|
||||
|
||||
public willUpdate(changedProperties: PropertyValues) {
|
||||
if (changedProperties.has("route")) {
|
||||
withViewTransition(() => {
|
||||
this._activeTab = this.tabs.find((tab) =>
|
||||
`${this.route.prefix}${this.route.path}`.includes(tab.path)
|
||||
);
|
||||
});
|
||||
}
|
||||
super.willUpdate(changedProperties);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import type { CSSResultGroup, TemplateResult } from "lit";
|
||||
import { css, html, LitElement } from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import { navigate } from "../../common/navigate";
|
||||
import { withViewTransition } from "../../common/util/view-transition";
|
||||
import "../../components/ha-button-menu";
|
||||
import "../../components/ha-icon-button";
|
||||
import "../../components/ha-list-item";
|
||||
@@ -117,9 +116,7 @@ class PanelDeveloperTools extends LitElement {
|
||||
return;
|
||||
}
|
||||
if (newPage !== this._page) {
|
||||
withViewTransition(() => {
|
||||
navigate(`/developer-tools/${newPage}`);
|
||||
});
|
||||
} else {
|
||||
scrollTo({ behavior: "smooth", top: 0 });
|
||||
}
|
||||
@@ -128,9 +125,7 @@ class PanelDeveloperTools extends LitElement {
|
||||
private async _handleMenuAction(ev: CustomEvent<ActionDetail>) {
|
||||
switch (ev.detail.index) {
|
||||
case 0:
|
||||
withViewTransition(() => {
|
||||
navigate(`/developer-tools/debug`);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,6 @@ import type { HUIView } from "./views/hui-view";
|
||||
import "./views/hui-view-background";
|
||||
import "./views/hui-view-container";
|
||||
import { UndoRedoController } from "../../common/controllers/undo-redo-controller";
|
||||
import { withViewTransition } from "../../common/util/view-transition";
|
||||
|
||||
interface ActionItem {
|
||||
icon: string;
|
||||
@@ -1246,9 +1245,7 @@ class HUIRoot extends LitElement {
|
||||
const viewIndex = Number(ev.detail.name);
|
||||
if (viewIndex !== this._curView) {
|
||||
const path = this.config.views[viewIndex].path || viewIndex;
|
||||
withViewTransition(() => {
|
||||
this._navigateToView(path);
|
||||
});
|
||||
} else if (!this._editMode) {
|
||||
scrollTo({ behavior: "smooth", top: 0 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user