mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
parent
a9704b110d
commit
5da16db81b
@ -27,6 +27,9 @@ class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
|||||||
/* remove the grey tap highlights in iOS on the fullscreen touch targets */
|
/* remove the grey tap highlights in iOS on the fullscreen touch targets */
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
:host([rtl]) {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
iron-pages,
|
iron-pages,
|
||||||
ha-sidebar {
|
ha-sidebar {
|
||||||
/* allow a light tap highlight on the actual interface elements */
|
/* allow a light tap highlight on the actual interface elements */
|
||||||
@ -56,6 +59,7 @@ class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
|||||||
>
|
>
|
||||||
<app-drawer
|
<app-drawer
|
||||||
id="drawer"
|
id="drawer"
|
||||||
|
align="start"
|
||||||
slot="drawer"
|
slot="drawer"
|
||||||
disable-swipe="[[_computeDisableSwipe(hass)]]"
|
disable-swipe="[[_computeDisableSwipe(hass)]]"
|
||||||
swipe-open="[[!_computeDisableSwipe(hass)]]"
|
swipe-open="[[!_computeDisableSwipe(hass)]]"
|
||||||
@ -108,6 +112,11 @@ class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
computed: "computeDockedSidebar(hass)",
|
computed: "computeDockedSidebar(hass)",
|
||||||
},
|
},
|
||||||
|
rtl: {
|
||||||
|
type: Boolean,
|
||||||
|
reflectToAttribute: true,
|
||||||
|
computed: "computeRTL(hass)",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,6 +174,14 @@ class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) {
|
|||||||
_computeDisableSwipe(hass) {
|
_computeDisableSwipe(hass) {
|
||||||
return NON_SWIPABLE_PANELS.indexOf(hass.panelUrl) !== -1;
|
return NON_SWIPABLE_PANELS.indexOf(hass.panelUrl) !== -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
computeRTL(hass) {
|
||||||
|
var lang = hass.selectedLanguage || hass.language;
|
||||||
|
if (hass.translationMetadata.translations[lang]) {
|
||||||
|
return hass.translationMetadata.translations[lang].isRTL || false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customElements.define("home-assistant-main", HomeAssistantMain);
|
customElements.define("home-assistant-main", HomeAssistantMain);
|
||||||
|
@ -51,7 +51,8 @@
|
|||||||
"nativeName": "Schwiizerdütsch"
|
"nativeName": "Schwiizerdütsch"
|
||||||
},
|
},
|
||||||
"he": {
|
"he": {
|
||||||
"nativeName": "עברית"
|
"nativeName": "עברית",
|
||||||
|
"isRTL": true
|
||||||
},
|
},
|
||||||
"hi": {
|
"hi": {
|
||||||
"nativeName": "हिन्दी"
|
"nativeName": "हिन्दी"
|
||||||
|
@ -60,6 +60,7 @@ export interface Panels {
|
|||||||
|
|
||||||
export interface Translation {
|
export interface Translation {
|
||||||
nativeName: string;
|
nativeName: string;
|
||||||
|
isRTL: boolean;
|
||||||
fingerprints: { [fragment: string]: string };
|
fingerprints: { [fragment: string]: string };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user