new api_endpoint store + Config UI

ref #9
This commit is contained in:
2021-03-22 19:26:03 +01:00
parent 517cfddc5f
commit 5563f1fca3
7 changed files with 118 additions and 58 deletions

View File

@@ -1,5 +1,5 @@
<script>
console.log("app started with base url " + config.endpoint);
import { apikey, api_endpoint, lang, page } from "./store.js";
import { addMessages, init } from "svelte-i18n";
import en from "./locales/en.json";
import de from "./locales/de.json";
@@ -11,13 +11,13 @@
import Scanner from "./Scanner.svelte";
import Login from "./Login.svelte";
import Settings from "./Settings.svelte";
import { apikey, lang, page } from "./store.js";
$: is_configured = $apikey && $apikey !== "null" && $apikey !== "";
$: settings_open = $page === "settings";
init({
fallbackLocale: "en-US",
initialLocale: $lang,
});
console.log("app started with base url " + $api_endpoint);
</script>
{#if settings_open && is_configured}