mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2025-12-11 13:26:16 +00:00
move matrix init
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
import { restoreFromFile } from "$lib/backup/backup";
|
||||
import { goto } from "$app/navigation";
|
||||
import { hotkeys } from "$lib/title";
|
||||
import { initMatrixClient } from "$lib/chat/chat";
|
||||
|
||||
const locale =
|
||||
((browser && localStorage.getItem("locale")) as Locales) || detectLocale();
|
||||
@@ -66,9 +65,6 @@
|
||||
if (browser && $userPreferences.autoConnect && (await canAutoConnect())) {
|
||||
await initSerial();
|
||||
}
|
||||
if (browser) {
|
||||
await initMatrixClient();
|
||||
}
|
||||
|
||||
if (data.importFile) {
|
||||
restoreFromFile(data.importFile);
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { isLoggedIn, matrix } from "$lib/chat/chat";
|
||||
import { initMatrixClient, isLoggedIn, matrix } from "$lib/chat/chat";
|
||||
import { flip } from "svelte/animate";
|
||||
import { slide } from "svelte/transition";
|
||||
import Login from "./Login.svelte";
|
||||
import { onMount } from "svelte";
|
||||
import { browser } from "$app/environment";
|
||||
|
||||
onMount(async () => {
|
||||
if (browser) {
|
||||
await initMatrixClient();
|
||||
}
|
||||
});
|
||||
|
||||
let { children } = $props();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user