mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-04-28 16:01:21 +00:00
feat: dev and PUBLIC_DEBUG_FORMS variables to environment imports
This commit is contained in:
parent
28721b4ba5
commit
bdaeb428db
5 changed files with 15 additions and 10 deletions
|
@ -47,7 +47,8 @@
|
||||||
import { Input } from "$lib/components/ui/input";
|
import { Input } from "$lib/components/ui/input";
|
||||||
import { buttonVariants } from "$lib/components/ui/button";
|
import { buttonVariants } from "$lib/components/ui/button";
|
||||||
import { cn } from "$lib/utils";
|
import { cn } from "$lib/utils";
|
||||||
import { browser } from "$app/environment";
|
import { browser, dev } from "$app/environment";
|
||||||
|
import { PUBLIC_DEBUG_FORMS } from "$env/static/public";
|
||||||
import {
|
import {
|
||||||
DateFormatter,
|
DateFormatter,
|
||||||
getLocalTimeZone,
|
getLocalTimeZone,
|
||||||
|
@ -174,6 +175,6 @@
|
||||||
<Form.Button>Update account</Form.Button>
|
<Form.Button>Update account</Form.Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{#if browser}
|
{#if dev && PUBLIC_DEBUG_FORMS == 'true' && browser}
|
||||||
<SuperDebug data={$formData} />
|
<SuperDebug data={$formData} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ChevronDown } from "radix-icons-svelte";
|
import { ChevronDown } from "radix-icons-svelte";
|
||||||
import { browser } from "$app/environment";
|
import { browser, dev } from "$app/environment";
|
||||||
|
import { PUBLIC_DEBUG_FORMS } from "$env/static/public";
|
||||||
import SuperDebug, { type SuperValidated, type Infer, superForm } from "sveltekit-superforms";
|
import SuperDebug, { type SuperValidated, type Infer, superForm } from "sveltekit-superforms";
|
||||||
import * as Form from "$lib/components/ui/form";
|
import * as Form from "$lib/components/ui/form";
|
||||||
import * as RadioGroup from "$lib/components/ui/radio-group";
|
import * as RadioGroup from "$lib/components/ui/radio-group";
|
||||||
|
@ -127,6 +128,6 @@
|
||||||
<Form.Button>Update preferences</Form.Button>
|
<Form.Button>Update preferences</Form.Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{#if browser}
|
{#if dev && PUBLIC_DEBUG_FORMS == 'true' && browser}
|
||||||
<SuperDebug data={$formData} />
|
<SuperDebug data={$formData} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -40,7 +40,8 @@
|
||||||
import { type SuperValidated, type Infer, superForm } from "sveltekit-superforms";
|
import { type SuperValidated, type Infer, superForm } from "sveltekit-superforms";
|
||||||
import SuperDebug from "sveltekit-superforms";
|
import SuperDebug from "sveltekit-superforms";
|
||||||
import { zodClient } from "sveltekit-superforms/adapters";
|
import { zodClient } from "sveltekit-superforms/adapters";
|
||||||
import { browser } from "$app/environment";
|
import { browser, dev } from "$app/environment";
|
||||||
|
import { PUBLIC_DEBUG_FORMS } from "$env/static/public";
|
||||||
|
|
||||||
export let data: SuperValidated<Infer<DisplayFormSchema>>;
|
export let data: SuperValidated<Infer<DisplayFormSchema>>;
|
||||||
|
|
||||||
|
@ -89,6 +90,6 @@
|
||||||
<Form.Button>Update display</Form.Button>
|
<Form.Button>Update display</Form.Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{#if browser}
|
{#if dev && PUBLIC_DEBUG_FORMS == 'true' && browser}
|
||||||
<SuperDebug data={$formData} />
|
<SuperDebug data={$formData} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
import { Switch } from "$lib/components/ui/switch";
|
import { Switch } from "$lib/components/ui/switch";
|
||||||
import { zodClient } from "sveltekit-superforms/adapters";
|
import { zodClient } from "sveltekit-superforms/adapters";
|
||||||
import Checkbox from "$lib/components/ui/checkbox/checkbox.svelte";
|
import Checkbox from "$lib/components/ui/checkbox/checkbox.svelte";
|
||||||
import { browser } from "$app/environment";
|
import { browser, dev } from "$app/environment";
|
||||||
|
import { PUBLIC_DEBUG_FORMS } from "$env/static/public";
|
||||||
|
|
||||||
export let data: SuperValidated<Infer<NotificationFormSchema>>;
|
export let data: SuperValidated<Infer<NotificationFormSchema>>;
|
||||||
|
|
||||||
|
@ -140,6 +141,6 @@
|
||||||
<Form.Button>Update notifications</Form.Button>
|
<Form.Button>Update notifications</Form.Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{#if browser}
|
{#if dev && PUBLIC_DEBUG_FORMS == 'true' && browser}
|
||||||
<SuperDebug data={$formData} />
|
<SuperDebug data={$formData} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
import SuperDebug from "sveltekit-superforms";
|
import SuperDebug from "sveltekit-superforms";
|
||||||
import { zodClient } from "sveltekit-superforms/adapters";
|
import { zodClient } from "sveltekit-superforms/adapters";
|
||||||
import { cn } from "$lib/utils";
|
import { cn } from "$lib/utils";
|
||||||
import { browser } from "$app/environment";
|
import { browser, dev } from "$app/environment";
|
||||||
|
import { PUBLIC_DEBUG_FORMS } from "$env/static/public";
|
||||||
|
|
||||||
export let data: SuperValidated<Infer<ProfileFormSchema>>;
|
export let data: SuperValidated<Infer<ProfileFormSchema>>;
|
||||||
|
|
||||||
|
@ -117,6 +118,6 @@
|
||||||
<Form.Button>Update profile</Form.Button>
|
<Form.Button>Update profile</Form.Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{#if browser}
|
{#if dev && PUBLIC_DEBUG_FORMS == 'true' && browser}
|
||||||
<SuperDebug data={$formData} />
|
<SuperDebug data={$formData} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in a new issue