187 files
This commit is contained in:
1 parent
16c9b4d7f4
commit
d6413e19b5
187 files changed
+15542
-2765
No files matched your search
@@ -44,7 +44,7 @@ import type { MaintenanceQrDialog } from "./components/qr-dialog";
|
||||
import type { MaintenanceTaskQuickActionsDialog } from "./components/task-quick-actions-dialog";
|
||||
import type { MaintenanceObjectQuickActionsDialog } from "./components/object-quick-actions-dialog";
|
||||
import type { HomeAssistant, MaintenanceObject } from "./types";
|
||||
import { ensureLocale, isLocaleLoaded, langOf } from "./styles";
|
||||
import { ensureLocale, isLocaleLoaded, langOf, setProfilePrefs } from "./styles";
|
||||
import { fillAndOpenCompleteDialog, type CompleteDialogArgs } from "./helpers/complete-dialog-args";
|
||||
|
||||
const OBJECT_DIALOG_TAG = "maintenance-object-dialog";
|
||||
@@ -98,6 +98,11 @@ function syncHass(el: HTMLElement & { hass?: HomeAssistant }): boolean {
|
||||
(el as unknown as { requestUpdate?: () => void }).requestUpdate?.();
|
||||
});
|
||||
}
|
||||
// Same story for the profile date/time format (#163): on a strategy
|
||||
// dashboard no panel or card may ever have fed hass.locale into the prefs
|
||||
// singleton, so formatDate inside the dialog would fall back to the
|
||||
// language default and ignore a DMY/MDY/YMD profile setting.
|
||||
setProfilePrefs(hass.locale as Parameters<typeof setProfilePrefs>[0], hass.config?.country);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user