1
0
Fork 1
mirror of https://example.com synced 2024-11-22 06:56:38 +09:00

fix: push notification

Co-authored-by: naskya <m@naskya.net>
This commit is contained in:
sup39 2024-02-11 20:36:33 +09:00 committed by naskya
parent 4aff9e953f
commit 0afd1de14e
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
2 changed files with 5 additions and 2 deletions

View file

@ -10,7 +10,7 @@ export const apiUrl = `${url}/api`;
export const wsUrl = `${url
.replace("http://", "ws://")
.replace("https://", "wss://")}/streaming`;
export const lang = localStorage.getItem("lang")?.split("-")[0] ?? "en";
export const lang = localStorage.getItem("lang") ?? "en-US";
export const langs = _LANGS_;
export const locale = JSON.parse(localStorage.getItem("locale") || "en-US");
export const version = _VERSION_;

View file

@ -124,7 +124,10 @@ function checkForSplash() {
// #region Set lang attr
const html = document.documentElement;
html.setAttribute("lang", lang ?? "en-US");
html.setAttribute("dir", langmap[lang].rtl === true ? "rtl" : "ltr");
html.setAttribute(
"dir",
langmap[lang.split("-", 1)[0]].rtl === true ? "rtl" : "ltr",
);
// #endregion
// #region loginId