diff --git a/.gitignore b/.gitignore index 9bc13a56..3697825b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ node_modules .netlify .wrangler /.svelte-kit +/.next /build # OS @@ -35,4 +36,4 @@ static/ project.inlang/cache/ # Documentation -docs/ \ No newline at end of file +docs/ diff --git a/src/lib/api/adapters/base.adapter.ts b/src/lib/api/adapters/base.adapter.ts index 0b43c556..c9d4b63d 100644 --- a/src/lib/api/adapters/base.adapter.ts +++ b/src/lib/api/adapters/base.adapter.ts @@ -8,7 +8,7 @@ * @module adapters/base */ -import { snakeToCamel, camelToSnake, transformResponse, transformRequest } from '../schemas/transforms' +import { transformResponse, transformRequest } from '../schemas/transforms' import type { AdapterOptions, RequestOptions, AdapterError } from './types' import { createErrorFromStatus, diff --git a/src/lib/auth/map.ts b/src/lib/auth/map.ts index 6f352091..af1fd604 100644 --- a/src/lib/auth/map.ts +++ b/src/lib/auth/map.ts @@ -1,5 +1,4 @@ -import type { OAuthLoginResponse } from './oauth' -import type { UserInfoResponse } from '$lib/api/resources/users' +import type { OAuthLoginResponse, UserInfoResponse } from './oauth' import type { AccountCookie } from '$lib/types/AccountCookie' import type { UserCookie } from '$lib/types/UserCookie' diff --git a/src/lib/auth/oauth.ts b/src/lib/auth/oauth.ts index a55ba86d..a9a4c16c 100644 --- a/src/lib/auth/oauth.ts +++ b/src/lib/auth/oauth.ts @@ -13,6 +13,20 @@ export interface OAuthLoginResponse { } } +// Response from user info endpoint used during auth flow +export interface UserInfoResponse { + id: string + username: string + role: number + avatar: { + picture: string | null + element: string | null + } + language: string | null + gender: number | null + theme: string | null +} + export async function passwordGrantLogin( fetchFn: typeof fetch, body: { email: string; password: string; grant_type: 'password' } diff --git a/src/lib/components/examples/SearchExample.svelte b/src/lib/components/examples/SearchExample.svelte deleted file mode 100644 index c825b971..00000000 --- a/src/lib/components/examples/SearchExample.svelte +++ /dev/null @@ -1,430 +0,0 @@ - - - - -
-

Search Example with Adapters

- -
-
- - - -
- -
-
- -
- {#each elements as element} - - {/each} -
-
- -
- -
- {#each rarities as rarity} - - {/each} -
-
-
- -
- - -
-
- -
- {#if currentSearch.loading} -
-

Searching...

-
- {:else if currentSearch.error} -
-

❌ Error: {currentSearch.error.message}

-

Code: {currentSearch.error.code}

-
- {:else if currentSearch.data} - {#if currentSearch.data.results.length === 0} -
-

No results found

-
- {:else} -
-

Found {currentSearch.data.total || currentSearch.data.results.length} results

- {#if currentSearch.data.totalPages && currentSearch.data.totalPages > 1} -

- Page {currentSearch.data.page || 1} of {currentSearch.data.totalPages} -

- {/if} -
- -
- {#each currentSearch.data.results as result} -
-
- {getResultIcon(result)} - {getElementIcon(result.element)} -
-

{result.name.en || result.name.ja || 'Unknown'}

-
- {result.searchableType} - {#if result.rarity} - - {result.rarity === 3 ? 'SSR' : result.rarity === 2 ? 'SR' : 'R'} - - {/if} -
- {#if result.imageUrl} - {result.name.en} - {/if} -
- {/each} -
- {/if} - {:else} -
-

Enter a search term to begin

-
- {/if} -
-
- - \ No newline at end of file diff --git a/src/routes/test-sidebar/+page.svelte b/src/routes/test-sidebar/+page.svelte deleted file mode 100644 index fb7494d2..00000000 --- a/src/routes/test-sidebar/+page.svelte +++ /dev/null @@ -1,250 +0,0 @@ - - - - -
-

Sidebar Test Page

-

Click the buttons below to test different sidebar configurations:

- -
- - - - - -
- - {#if selectedItems.length > 0} -
-

Selected Items ({selectedItems.length})

-
    - {#each selectedItems as item} -
  • {item.name?.en || item.name?.ja || item.name || 'Unknown'}
  • - {/each} -
-
- {/if} - -
-

Main Content Area

-

This content will shrink when the sidebar opens, creating a two-pane layout.

-

All sidebars have a standard width of 420px for consistency.

-

On mobile devices, the sidebar will overlay the main content instead of shrinking it.

-
-
- -{#snippet detailsContent()} - -{/snippet} - -{#snippet filterContent()} - -{/snippet} - - \ No newline at end of file diff --git a/src/routes/test/drag-drop/+page.svelte b/src/routes/test/drag-drop/+page.svelte deleted file mode 100644 index 74734c9b..00000000 --- a/src/routes/test/drag-drop/+page.svelte +++ /dev/null @@ -1,688 +0,0 @@ - - - - -
-
-

Drag & Drop Test

-
- {#if syncStatus === 'pending'} - ⏳ {dragContext.getQueuedOperations().length} pending operations - {:else} - βœ… All synced - {/if} -
-
- -
-

Character Grid

-
- {#each characters as char, idx} - - -
- {#if char} -
πŸ‘€
-
{char.character.name?.en}
- {:else} -
Empty
- {/if} -
-
-
- {/each} -
- -

Extra Characters

-
- {#each extraCharacters as char, idx} - - -
- {#if char} -
πŸ‘€
-
{char.character.name?.en}
- {:else} -
Empty
- {/if} -
-
-
- {/each} -
-
- -
-

Weapon Grid

-
-
-

Mainhand

-
- {#if weapons[0]} -
βš”οΈ
-
{weapons[0].weapon.name?.en}
- {:else} -
Empty
- {/if} -
-
-
- {#each weapons.slice(1, 10) as weapon, idx} - - -
- {#if weapon} -
βš”οΈ
-
{weapon.weapon.name?.en}
- {:else} -
Empty
- {/if} -
-
-
- {/each} -
-
-
- -
-

Summon Grid

-
-
-

Main

-
- {#if summons[0]} -
πŸ‰
-
{summons[0].summon.name?.en}
- {/if} -
-
- -
- {#each summons.slice(1, 5) as summon, idx} - - -
- {#if summon} -
πŸ‰
-
{summon.summon.name?.en}
- {:else} -
Empty
- {/if} -
-
-
- {/each} -
- -
-

Friend

-
- {#if summons[6]} -
πŸ‰
-
{summons[6].summon.name?.en}
- {/if} -
-
-
- -

Subaura

-
- {#each subauras as summon, idx} - - -
- {#if summon} -
πŸ‰
-
{summon.summon.name?.en}
- {:else} -
Empty
- {/if} -
-
-
- {/each} -
-
- -
-

Operations Log

-
{JSON.stringify(operations, null, 2)}
-
-
- - \ No newline at end of file