mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/debug: show page content only when debug mode is enabled
This commit is contained in:
parent
6c7695ca6c
commit
936da1c9ab
1 changed files with 34 additions and 22 deletions
|
@ -1,39 +1,51 @@
|
|||
<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>
|
||||
|
||||
<div id="advanced-page">
|
||||
device:
|
||||
<div class="message-container subtext">
|
||||
is.iPad: {device.is.iPad}
|
||||
is.iPhone: {device.is.iPhone}
|
||||
is.iOS: {device.is.iOS}
|
||||
is.android: {device.is.android}
|
||||
is.mobile: {device.is.mobile}
|
||||
preferredLocale: {device.preferredLocale}
|
||||
</div>
|
||||
{#if $settings.advanced.debug}
|
||||
<div id="advanced-page">
|
||||
device:
|
||||
<div class="message-container subtext">
|
||||
is.iPad: {device.is.iPad}
|
||||
is.iPhone: {device.is.iPhone}
|
||||
is.iOS: {device.is.iOS}
|
||||
is.android: {device.is.android}
|
||||
is.mobile: {device.is.mobile}
|
||||
preferredLocale: {device.preferredLocale}
|
||||
</div>
|
||||
|
||||
app:
|
||||
<div class="message-container subtext">
|
||||
is.installed: {app.is.installed}
|
||||
</div>
|
||||
app:
|
||||
<div class="message-container subtext">
|
||||
is.installed: {app.is.installed}
|
||||
</div>
|
||||
|
||||
version:
|
||||
<div class="message-container subtext">
|
||||
version: {version.version}
|
||||
commit: {version.commit.slice(0, 7)}
|
||||
branch: {version.branch}
|
||||
remote: {version.remote}
|
||||
version:
|
||||
<div class="message-container subtext">
|
||||
version: {version.version}
|
||||
commit: {version.commit.slice(0, 7)}
|
||||
branch: {version.branch}
|
||||
remote: {version.remote}
|
||||
</div>
|
||||
</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