Desktop support (#4484)

* Remove home link on desktop app

* Spellcheck, installation toasts, background styling, …

* Add email,slack, auth support

* More desktop style tweaks

* Move redirect to client

* cleanup

* Record desktop usage

* docs

* fix: Selection state in search input when double clicking header
This commit is contained in:
Tom Moor
2022-11-27 15:07:48 -08:00
committed by GitHub
parent ea9680c3d7
commit cc333637dd
38 changed files with 492 additions and 83 deletions

View File

@@ -1,4 +1,5 @@
import { i18n } from "i18next";
import Desktop from "./Desktop";
export function detectLanguage() {
const [ln, r] = navigator.language.split("-");
@@ -13,6 +14,9 @@ export function changeLanguage(
if (toLanguageString && i18n.language !== toLanguageString) {
// Languages are stored in en_US format in the database, however the
// frontend translation framework (i18next) expects en-US
i18n.changeLanguage(toLanguageString.replace("_", "-"));
const locale = toLanguageString.replace("_", "-");
i18n.changeLanguage(locale);
Desktop.bridge?.setSpellCheckerLanguages(["en-US", locale]);
}
}