mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Fix for RTL in Supervisor dashboards (#19290)
This commit is contained in:
parent
7a8f5c0cc9
commit
783a8242e1
@ -128,6 +128,7 @@ class HassioAddons extends LitElement {
|
|||||||
ha-card {
|
ha-card {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
direction: ltr;
|
||||||
}
|
}
|
||||||
.search {
|
.search {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
|
@ -133,6 +133,8 @@ class HassioDashboard extends LitElement {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
right: calc(16px + env(safe-area-inset-right));
|
right: calc(16px + env(safe-area-inset-right));
|
||||||
bottom: calc(16px + env(safe-area-inset-bottom));
|
bottom: calc(16px + env(safe-area-inset-bottom));
|
||||||
|
inset-inline-end: calc(16px + env(safe-area-inset-right));
|
||||||
|
inset-inline-start: initial;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
|
@ -29,6 +29,10 @@ import { ProvideHassLitMixin } from "../../src/mixins/provide-hass-lit-mixin";
|
|||||||
import { urlSyncMixin } from "../../src/state/url-sync-mixin";
|
import { urlSyncMixin } from "../../src/state/url-sync-mixin";
|
||||||
import { HomeAssistant, Route } from "../../src/types";
|
import { HomeAssistant, Route } from "../../src/types";
|
||||||
import { getTranslation } from "../../src/util/common-translation";
|
import { getTranslation } from "../../src/util/common-translation";
|
||||||
|
import {
|
||||||
|
computeRTLDirection,
|
||||||
|
setDirectionStyles,
|
||||||
|
} from "../../src/common/util/compute_rtl";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HASSDomEvents {
|
interface HASSDomEvents {
|
||||||
@ -95,6 +99,7 @@ export class SupervisorBaseElement extends urlSyncMixin(
|
|||||||
|
|
||||||
if (changedProperties.has("_language") || !this.hasUpdated) {
|
if (changedProperties.has("_language") || !this.hasUpdated) {
|
||||||
this._initializeLocalize();
|
this._initializeLocalize();
|
||||||
|
this._applyDirection(this.hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,4 +220,9 @@ export class SupervisorBaseElement extends urlSyncMixin(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _applyDirection(hass: HomeAssistant) {
|
||||||
|
const direction = computeRTLDirection(hass);
|
||||||
|
setDirectionStyles(direction, this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user