Implemented settings dialog
This commit is contained in:
parent
d5ce648a53
commit
de7e96cd01
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
|
import { apikey, api_endpoint, lang, laptime_track, clear } from "./store.js";
|
||||||
import { apikey, api_endpoint, lang, page, stationinfo } from "./store.js";
|
export let settings_open = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="p-5 min-h-screen">
|
<div class="p-5 min-h-screen">
|
||||||
|
@ -9,34 +9,12 @@
|
||||||
Lauf Für Kaya! Beamershow
|
Lauf Für Kaya! Beamershow
|
||||||
</h1>
|
</h1>
|
||||||
<h1 class="text-3xl w-full text-center text-gray-900">{$_("settings")}</h1>
|
<h1 class="text-3xl w-full text-center text-gray-900">{$_("settings")}</h1>
|
||||||
|
<p class="block text-sm font-bold text-gray-700 mt-2">Endpoint</p>
|
||||||
|
<p class="block text-sm text-gray-700">{$api_endpoint}</p>
|
||||||
<p class="block text-sm font-bold text-gray-700 mt-2">{$_("api_key")}</p>
|
<p class="block text-sm font-bold text-gray-700 mt-2">{$_("api_key")}</p>
|
||||||
<p class="block text-sm text-gray-700">{$apikey}</p>
|
<p class="block text-sm text-gray-700">{$apikey}</p>
|
||||||
<p class="block text-sm font-bold text-gray-700 mt-2">
|
<p class="block text-sm font-bold text-gray-700 mt-2">Track</p>
|
||||||
{$_("station_description")}
|
<p class="block text-sm text-gray-700">{$laptime_track}</p>
|
||||||
</p>
|
|
||||||
<p class="block text-sm text-gray-700">
|
|
||||||
{JSON.parse($stationinfo).description}
|
|
||||||
</p>
|
|
||||||
<p class="block text-sm font-bold text-gray-700 mt-2">{$_("station_id")}</p>
|
|
||||||
<p class="block text-sm text-gray-700">{JSON.parse($stationinfo).id}</p>
|
|
||||||
<p class="block text-sm font-bold text-gray-700 mt-2">{$_("track_id")}</p>
|
|
||||||
<p class="block text-sm text-gray-700">{JSON.parse($stationinfo).track.id}</p>
|
|
||||||
<p class="block text-sm font-bold text-gray-700 mt-2">{$_("track_name")}</p>
|
|
||||||
<p class="block text-sm text-gray-700">
|
|
||||||
{JSON.parse($stationinfo).track.name}
|
|
||||||
</p>
|
|
||||||
<p class="block text-sm font-bold text-gray-700 mt-2">
|
|
||||||
{$_("track_distance")}
|
|
||||||
</p>
|
|
||||||
<p class="block text-sm text-gray-700">
|
|
||||||
{JSON.parse($stationinfo).track.distance}
|
|
||||||
</p>
|
|
||||||
<p class="block text-sm font-bold text-gray-700 mt-2">
|
|
||||||
{$_("minimum_lap_time")}
|
|
||||||
</p>
|
|
||||||
<p class="block text-sm text-gray-700">
|
|
||||||
{JSON.parse($stationinfo).track.minimumLapTime}s
|
|
||||||
</p>
|
|
||||||
<p class="block text-sm font-bold text-gray-700 mt-2">{$_("language")}</p>
|
<p class="block text-sm font-bold text-gray-700 mt-2">{$_("language")}</p>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<div class="inline-block mr-2 mt-2">
|
<div class="inline-block mr-2 mt-2">
|
||||||
|
@ -95,16 +73,15 @@
|
||||||
<br />
|
<br />
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
page.set("");
|
settings_open = false;
|
||||||
}}
|
}}
|
||||||
class="mb-3 w-full py-3 border-black border-3 text-black focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black"
|
class="mb-3 w-full py-3 border-black border-3 text-black focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black"
|
||||||
>{$_("back_to_scanner")}</button
|
>{$_("back_to_scanner")}</button
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
apikey.set("");
|
clear();
|
||||||
api_endpoint.set("");
|
settings_open = false;
|
||||||
page.set("");
|
|
||||||
}}
|
}}
|
||||||
class="w-full py-3 bg-black text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black"
|
class="w-full py-3 bg-black text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black"
|
||||||
>{$_("log_out_from_this_client")}</button
|
>{$_("log_out_from_this_client")}</button
|
||||||
|
|
Loading…
Reference in New Issue