Merge branch 'master' into fluencydoc_master

# Conflicts:
#	extra/update-version.js
#	server/client.js
#	server/server.js
This commit is contained in:
Louis Lam
2022-04-12 17:44:04 +08:00
140 changed files with 15403 additions and 7817 deletions

View File

@@ -64,7 +64,19 @@ export function timezoneList() {
}
export function setPageLocale() {
const html = document.documentElement
html.setAttribute('lang', currentLocale() )
html.setAttribute('dir', localeDirection() )
const html = document.documentElement;
html.setAttribute("lang", currentLocale() );
html.setAttribute("dir", localeDirection() );
}
/**
* Mainly used for dev, because the backend and the frontend are in different ports.
*/
export function getResBaseURL() {
const env = process.env.NODE_ENV;
if (env === "development" || localStorage.dev === "dev") {
return location.protocol + "//" + location.hostname + ":3001";
} else {
return "";
}
}