mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-01 12:46:07 +00:00
web/debug: show page content only when debug mode is enabled
This commit is contained in:
parent
42debb1207
commit
acd485d402
|
@ -1,8 +1,19 @@
|
|||
<script lang="ts">
|
||||
import { device, app } from "$lib/device";
|
||||
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>
|
||||
|
||||
{#if $settings.advanced.debug}
|
||||
<div id="advanced-page">
|
||||
device:
|
||||
<div class="message-container subtext">
|
||||
|
@ -27,13 +38,14 @@
|
|||
remote: {version.remote}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
#advanced-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: var(--padding);
|
||||
gap: var(--padding)
|
||||
gap: var(--padding);
|
||||
}
|
||||
|
||||
.message-container {
|
||||
|
|
Loading…
Reference in a new issue