Skip to content

Commit e4c92e2

Browse files
committed
pnpm run format
1 parent 401e70d commit e4c92e2

File tree

11 files changed

+59
-48
lines changed

11 files changed

+59
-48
lines changed

src/lib/components/Turnstile.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414
response: string | null;
1515
}
1616
17-
let {
18-
action,
19-
cData,
20-
response = $bindable(),
21-
}: Props = $props();
17+
let { action, cData, response = $bindable() }: Props = $props();
2218
2319
let element: HTMLDivElement;
2420
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import type { HubConnection } from '@microsoft/signalr';
22

3-
export async function serializeCaptivePortalMessage(connection: HubConnection | null, deviceId: string, enabled: boolean) {
3+
export async function serializeCaptivePortalMessage(
4+
connection: HubConnection | null,
5+
deviceId: string,
6+
enabled: boolean
7+
) {
48
if (connection === null) return;
59
await connection.send('CaptivePortal', deviceId, enabled);
610
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import type { HubConnection } from '@microsoft/signalr';
22

3-
export async function serializeOtaInstallMessage(connection: HubConnection | null, deviceId: string, version: string) {
3+
export async function serializeOtaInstallMessage(
4+
connection: HubConnection | null,
5+
deviceId: string,
6+
version: string
7+
) {
48
if (connection === null) return;
59
await connection.send('OtaInstall', deviceId, version);
610
}

src/lib/state/Breadcrumbs.svelte.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ export const breadcrumbs = {
2121
};
2222
});
2323
},
24-
clear: () => state = [],
25-
};
24+
clear: () => (state = []),
25+
};

src/routes/(anonymous)/signup/+page.svelte

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -92,38 +92,44 @@
9292

9393
<Container class="items-center">
9494
{#if !ack}
95-
<div class="text-5xl font-semibold text-nowrap text-red-500">Do not use this frontend to register a new account, this is a WIP, please go to https://openshock.app</div>
96-
<AbsolutelySureButton text="I acknowledge that I have read this message and that this frontend is not functional yet." onconfirm={() => (ack = true)} />
97-
{:else}
98-
<form class="flex flex-col gap-2" onsubmit={handleSubmission}>
99-
<div class="text-3xl font-semibold text-nowrap">Sign Up</div>
100-
<UsernameInput
101-
label="Username"
102-
placeholder="Username"
103-
bind:value={username}
104-
bind:valid={usernameValid}
95+
<div class="text-5xl font-semibold text-nowrap text-red-500">
96+
Do not use this frontend to register a new account, this is a WIP, please go to
97+
https://openshock.app
98+
</div>
99+
<AbsolutelySureButton
100+
text="I acknowledge that I have read this message and that this frontend is not functional yet."
101+
onconfirm={() => (ack = true)}
105102
/>
106-
<EmailInput label="Email" placeholder="Email" bind:value={email} bind:valid={emailValid} />
107-
<PasswordInput
108-
label="Password"
109-
placeholder="Password"
110-
autocomplete="new-password"
111-
bind:value={password}
112-
bind:valid={passwordValid}
113-
validate
114-
showStrengthMeter
115-
/>
116-
<PasswordInput
117-
label="Confirm Password"
118-
placeholder="Confirm Password"
119-
autocomplete="new-password"
120-
bind:value={passwordConfirm}
121-
validate={validatePasswordMatch(passwordConfirm, password)}
122-
/>
123-
124-
<Turnstile action="signup" bind:response={turnstileResponse} />
125-
126-
<Button type="submit" disabled={!canSubmit}>Sign Up</Button>
127-
</form>
103+
{:else}
104+
<form class="flex flex-col gap-2" onsubmit={handleSubmission}>
105+
<div class="text-3xl font-semibold text-nowrap">Sign Up</div>
106+
<UsernameInput
107+
label="Username"
108+
placeholder="Username"
109+
bind:value={username}
110+
bind:valid={usernameValid}
111+
/>
112+
<EmailInput label="Email" placeholder="Email" bind:value={email} bind:valid={emailValid} />
113+
<PasswordInput
114+
label="Password"
115+
placeholder="Password"
116+
autocomplete="new-password"
117+
bind:value={password}
118+
bind:valid={passwordValid}
119+
validate
120+
showStrengthMeter
121+
/>
122+
<PasswordInput
123+
label="Confirm Password"
124+
placeholder="Confirm Password"
125+
autocomplete="new-password"
126+
bind:value={passwordConfirm}
127+
validate={validatePasswordMatch(passwordConfirm, password)}
128+
/>
129+
130+
<Turnstile action="signup" bind:response={turnstileResponse} />
131+
132+
<Button type="submit" disabled={!canSubmit}>Sign Up</Button>
133+
</form>
128134
{/if}
129135
</Container>

src/routes/(authenticated)/home/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
import Container from '$lib/components/Container.svelte';
33
import { breadcrumbs } from '$lib/state/Breadcrumbs.svelte';
4+
45
breadcrumbs.push('Home', '/home');
56
</script>
67

src/routes/(authenticated)/hubs/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
import Button from '$lib/components/ui/button/button.svelte';
88
import * as Card from '$lib/components/ui/card';
99
import { IsMobile } from '$lib/hooks/is-mobile.svelte';
10+
import { breadcrumbs } from '$lib/state/Breadcrumbs.svelte';
1011
import { OnlineHubsStore, OwnHubsStore, refreshOwnHubs } from '$lib/stores/HubsStore';
1112
import { SemVer } from 'semver';
1213
import { onMount } from 'svelte';
1314
import { type Hub, columns } from './columns';
1415
import DataTableActions from './data-table-actions.svelte';
1516
import HubCreateDialog from './dialog-hub-create.svelte';
16-
import { breadcrumbs } from '$lib/state/Breadcrumbs.svelte';
1717
1818
const isMobile = new IsMobile();
1919

src/routes/Breadcrumb.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
2-
import * as Breadcrumb from "$lib/components/ui/breadcrumb";
3-
import { breadcrumbs } from "$lib/state/Breadcrumbs.svelte";
2+
import * as Breadcrumb from '$lib/components/ui/breadcrumb';
3+
import { breadcrumbs } from '$lib/state/Breadcrumbs.svelte';
44
</script>
55

66
{#if breadcrumbs.State.length > 0}
@@ -22,4 +22,4 @@
2222
{/each}
2323
</Breadcrumb.List>
2424
</Breadcrumb.Root>
25-
{/if}
25+
{/if}

src/routes/Header.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
import PanelLeft from '@lucide/svelte/icons/panel-left';
33
import { goto } from '$app/navigation';
4+
import type { Pathname } from '$app/types';
45
import { PUBLIC_DISCORD_INVITE_URL, PUBLIC_GITHUB_PROJECT_URL } from '$env/static/public';
56
import LightSwitch from '$lib/components/LightSwitch.svelte';
67
import DiscordIcon from '$lib/components/svg/DiscordIcon.svelte';
@@ -11,7 +12,6 @@
1112
import { UserStore } from '$lib/stores/UserStore';
1213
import { cn } from '$lib/utils';
1314
import Breadcrumb from './Breadcrumb.svelte';
14-
import type { Pathname } from '$app/types';
1515
1616
let sidebar = useSidebar();
1717
</script>

src/routes/Sidebar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
Zap,
1717
} from '@lucide/svelte';
1818
import { page } from '$app/state';
19+
import type { Pathname } from '$app/types';
1920
import { RoleType } from '$lib/api/internal/v1';
2021
import {
2122
Content,
@@ -36,7 +37,6 @@
3637
import type { AnyComponent } from '$lib/types/AnyComponent';
3738
import { isMobile, isSerialSupported } from '$lib/utils/compatibility';
3839
import { Collapsible } from 'bits-ui';
39-
import type { Pathname } from '$app/types';
4040
4141
let currentUser = $derived($UserStore.self);
4242

0 commit comments

Comments
 (0)