Async config file (#682)

* initial

* only donwload config once

* formatting

* update sample config

* sentry

* refactor load state

* fix build yaml

* Upper case enums

* change how defaults work. review fixes

* abstract initialization

* copyright

* gitignore styleing

* refactor initialization

* use dafualt as fallback

* internalInstance rename

* review

* remove acidentally added posthog file

* DSN rename

* update Copyright

* remove olm from the initializer

Co-authored-by: Timo K <timok@element.io>
This commit is contained in:
Timo
2022-11-03 19:43:41 +01:00
committed by GitHub
parent 806a9032e1
commit 78a313c373
10 changed files with 293 additions and 88 deletions

View File

@@ -24,6 +24,8 @@ import { getLogsForReport } from "./rageshake";
import { useClient } from "../ClientContext";
import { InspectorContext } from "../room/GroupCallInspector";
import { useModalTriggerState } from "../Modal";
import { Config } from "../config/Config";
import { DEFAULT_CONFIG } from "../config/ConfigOptions";
interface RageShakeSubmitOptions {
sendLogs: boolean;
@@ -252,8 +254,8 @@ export function useSubmitRageshake(): {
}
await fetch(
(import.meta.env.VITE_RAGESHAKE_SUBMIT_URL as string) ||
"https://element.io/bugreports/submit",
Config.instance.config.rageshake?.submit_url ??
DEFAULT_CONFIG.rageshake.submit_url,
{
method: "POST",
body,