web/debug: show page content only when debug mode is enabled

This commit is contained in:
wukko 2024-07-10 23:52:44 +06:00
parent 6c7695ca6c
commit 936da1c9ab
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -1,9 +1,20 @@
<script lang="ts"> <script lang="ts">
import { device, app } from "$lib/device"; import { device, app } from "$lib/device";
import { version } from "$lib/version"; import { version } from "$lib/version";
import settings from "$lib/settings";
import { goto } from "$app/navigation";
import { defaultSettingsPage } from "$lib/settings/defaults";
$: {
if (!$settings.advanced.debug) {
goto(defaultSettingsPage(), { replaceState: true });
}
}
</script> </script>
<div id="advanced-page"> {#if $settings.advanced.debug}
<div id="advanced-page">
device: device:
<div class="message-container subtext"> <div class="message-container subtext">
is.iPad: {device.is.iPad} is.iPad: {device.is.iPad}
@ -26,14 +37,15 @@
branch: {version.branch} branch: {version.branch}
remote: {version.remote} remote: {version.remote}
</div> </div>
</div> </div>
{/if}
<style> <style>
#advanced-page { #advanced-page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: var(--padding); padding: var(--padding);
gap: var(--padding) gap: var(--padding);
} }
.message-container { .message-container {