Skip to content

Commit

Permalink
style(console): rename middleware to hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Jul 5, 2024
1 parent 69fb6ae commit 890622a
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/console/src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { dev } from '$app/environment';
import { FLAGS_SECRET } from '$env/static/private';
import * as flags from '$lib/flags';
import { i18n } from '$lib/i18n';
import { auth, guard, houdini, theme } from '$lib/server/middleware';
import { auth, guard, houdini, theme } from '$lib/server/hooks';
import { Logger, sleep } from '@spectacular/utils';
import type { Handle, HandleFetch, HandleServerError } from '@sveltejs/kit';
import { sequence } from '@sveltejs/kit/hooks';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/console/src/routes/(app)/profile/+page.gql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ query GetUser($userId: uuid!) @cache(policy: NetworkOnly) {
}
securityKeys(order_by: { nickname: asc }) @list(name: "SecurityKeys") {
__typename
...SecurityKeyFields
...SecurityKeyFragment
}
personalAccessTokens: refreshTokens {
id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { invalidateAll } from '$app/navigation';
import type { SecurityKeyFields } from '$houdini';
import type { SecurityKeyFragment } from '$houdini';
import { PendingValue, RemoveSecurityKeyStore, cache, fragment, graphql } from '$houdini';
import { handleMessage } from '$lib/components/layout/toast-manager';
import { getNhostClient } from '$lib/stores/nhost';
Expand All @@ -16,19 +16,20 @@ const toastStore = getToastStore();
export let message: App.Superforms.Message | undefined;
export let errors: string[];
export let securityKey: SecurityKeyFields;
$: securityKeyFields = fragment(
export let securityKey: SecurityKeyFragment;
$: securityKeyFragment = fragment(
securityKey,
graphql`
fragment SecurityKeyFields on authUserSecurityKeys {
fragment SecurityKeyFragment on authUserSecurityKeys {
id
nickname
}
`,
);
$: ({ id, nickname } = $securityKeyFields);
// $: loading = $securityKeyFields.__typename === PendingValue;
$: ({ id, nickname } = $securityKeyFragment);
// $: loading = $securityKeyFragment.__typename === PendingValue;
/**
* delete handler
Expand Down
4 changes: 4 additions & 0 deletions apps/console/src/routes/(auth)/signin/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export let data;
</svelte:head>

<PasswordSigninForm />
{#if data.flags.showMagicLink}
<Divider>Or</Divider>
<PasswordlessSigninForm />
{/if}
{#if data.flags.showSocial}
<Divider>Or continue with</Divider>
<SocialSigninForm />
{/if}

0 comments on commit 890622a

Please sign in to comment.