mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-29 11:06:10 +00:00
web/debug: show page content only when debug mode is enabled
This commit is contained in:
parent
6c7695ca6c
commit
936da1c9ab
|
@ -1,39 +1,51 @@
|
||||||
<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}
|
||||||
device:
|
<div id="advanced-page">
|
||||||
<div class="message-container subtext">
|
device:
|
||||||
is.iPad: {device.is.iPad}
|
<div class="message-container subtext">
|
||||||
is.iPhone: {device.is.iPhone}
|
is.iPad: {device.is.iPad}
|
||||||
is.iOS: {device.is.iOS}
|
is.iPhone: {device.is.iPhone}
|
||||||
is.android: {device.is.android}
|
is.iOS: {device.is.iOS}
|
||||||
is.mobile: {device.is.mobile}
|
is.android: {device.is.android}
|
||||||
preferredLocale: {device.preferredLocale}
|
is.mobile: {device.is.mobile}
|
||||||
</div>
|
preferredLocale: {device.preferredLocale}
|
||||||
|
</div>
|
||||||
|
|
||||||
app:
|
app:
|
||||||
<div class="message-container subtext">
|
<div class="message-container subtext">
|
||||||
is.installed: {app.is.installed}
|
is.installed: {app.is.installed}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
version:
|
version:
|
||||||
<div class="message-container subtext">
|
<div class="message-container subtext">
|
||||||
version: {version.version}
|
version: {version.version}
|
||||||
commit: {version.commit.slice(0, 7)}
|
commit: {version.commit.slice(0, 7)}
|
||||||
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 {
|
||||||
|
|
Loading…
Reference in a new issue