responsiveness of scanner component

ref #1
This commit is contained in:
Philipp Dormann 2021-03-16 14:39:57 +01:00
parent 8c465e8b7d
commit 42b2390bd7
2 changed files with 11 additions and 11 deletions

View File

@ -1,17 +1,17 @@
<script> <script>
import Scanner from "./Scanner.svelte"; import Scanner from "./Scanner.svelte";
import Login from "./Login.svelte"; import Login from "./Login.svelte";
import Settings from "./Settings.svelte"; import Settings from "./Settings.svelte";
import { apikey, lang, page } from "./store.js"; import { apikey, lang, page } from "./store.js";
$: is_configured = $apikey && $apikey !== "null" && $apikey !== ""; $: is_configured = $apikey && $apikey !== "null" && $apikey !== "";
$: settings_open = $page === "settings"; $: settings_open = $page === "settings";
console.log($page); console.log($page);
</script> </script>
{#if settings_open && is_configured} {#if settings_open && is_configured}
<Settings /> <Settings />
{:else if is_configured} {:else if is_configured}
<Scanner /> <Scanner />
{:else} {:else}
<Login /> <Login />
{/if} {/if}

View File

@ -25,7 +25,7 @@
{hours}:{minutes}:{seconds} {hours}:{minutes}:{seconds}
</h1> </h1>
<section class="px-4 py-24 mx-auto max-w-7xl"> <section class="px-4 py-24 mx-auto max-w-7xl">
<div class="w-full mx-auto space-y-5 sm:w-8/12 md:w-12 lg:w-12 xl:w-12"> <div class="mx-auto space-y-5 w-full md:w-1/2">
<form <form
class="space-y-4" class="space-y-4"
onsubmit="event.preventDefault();" onsubmit="event.preventDefault();"