-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Robonau
authored and
Robonau
committed
Nov 9, 2024
1 parent
6bdc985
commit 9463ae9
Showing
16 changed files
with
331 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) 2024 Contributors to the Suwayomi project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import { browser } from '$app/environment'; | ||
import { getCategories, getCategory } from '$lib/gql/Queries'; | ||
import type { PageLoad } from './$types'; | ||
|
||
export const load: PageLoad = ({ fetch, url }) => { | ||
if (browser) | ||
(async () => { | ||
const mod = await import('$lib/gql/graphqlClient'); | ||
mod.client.query( | ||
getCategories, | ||
{}, | ||
{ | ||
fetch | ||
} | ||
); | ||
const tab = parseInt(url.searchParams.get('tab') ?? '0'); | ||
mod.client.query(getCategory, { id: tab }, { fetch }); | ||
})(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2024 Contributors to the Suwayomi project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import { browser } from '$app/environment'; | ||
import { getExtensions } from '$lib/gql/Queries'; | ||
import { gmState } from '$lib/simpleStores.svelte'; | ||
import type { PageLoad } from './$types'; | ||
|
||
export const load: PageLoad = ({ fetch }) => { | ||
if (browser) | ||
(async () => { | ||
const mod = await import('$lib/gql/graphqlClient'); | ||
mod.client.query( | ||
getExtensions, | ||
{ isNsfw: gmState.value.nsfw ? null : false }, | ||
{ | ||
fetch | ||
} | ||
); | ||
})(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2024 Contributors to the Suwayomi project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import { browser } from '$app/environment'; | ||
import { getSources } from '$lib/gql/Queries'; | ||
import { gmState } from '$lib/simpleStores.svelte'; | ||
import type { PageLoad } from './$types'; | ||
|
||
export const load: PageLoad = ({ fetch }) => { | ||
if (browser) | ||
(async () => { | ||
const mod = await import('$lib/gql/graphqlClient'); | ||
mod.client.query( | ||
getSources, | ||
{ isNsfw: gmState.value.nsfw ? null : false }, | ||
{ | ||
fetch | ||
} | ||
); | ||
})(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) 2024 Contributors to the Suwayomi project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
import { browser } from '$app/environment'; | ||
import { sourcesMigration } from '$lib/gql/Queries'; | ||
import type { PageLoad } from './$types'; | ||
|
||
export const load: PageLoad = ({ params, fetch }) => { | ||
if (browser) | ||
(async () => { | ||
const mod = await import('$lib/gql/graphqlClient'); | ||
mod.client.query( | ||
sourcesMigration, | ||
{}, | ||
{ | ||
fetch | ||
} | ||
); | ||
})(); | ||
return params; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2024 Contributors to the Suwayomi project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
import type { PageLoad } from './$types'; | ||
import { browser } from '$app/environment'; | ||
import { getSources } from '$lib/gql/Queries'; | ||
import { gmState } from '$lib/simpleStores.svelte'; | ||
|
||
export const load: PageLoad = ({ params, fetch }) => { | ||
if (browser) | ||
(async () => { | ||
const mod = await import('$lib/gql/graphqlClient'); | ||
mod.client.query( | ||
getSources, | ||
{ isNsfw: gmState.value.nsfw ? null : false }, | ||
{ | ||
fetch | ||
} | ||
); | ||
})(); | ||
return { ...params }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) 2024 Contributors to the Suwayomi project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
import type { PageLoad } from './$types'; | ||
import { browser } from '$app/environment'; | ||
import { History } from '$lib/gql/Queries'; | ||
|
||
export const load: PageLoad = ({ params, fetch }) => { | ||
if (browser) | ||
(async () => { | ||
const mod = await import('$lib/gql/graphqlClient'); | ||
mod.client.query( | ||
History, | ||
{ offset: 0 }, | ||
{ | ||
fetch | ||
} | ||
); | ||
})(); | ||
return { ...params }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2024 Contributors to the Suwayomi project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
import type { PageLoad } from './$types'; | ||
import { browser } from '$app/environment'; | ||
import { getabout } from '$lib/gql/Queries'; | ||
|
||
export const load: PageLoad = ({ fetch }) => { | ||
if (browser) | ||
(async () => { | ||
const mod = await import('$lib/gql/graphqlClient'); | ||
mod.client.query( | ||
getabout, | ||
{}, | ||
{ | ||
fetch | ||
} | ||
); | ||
})(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2024 Contributors to the Suwayomi project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
import type { PageLoad } from './$types'; | ||
import { browser } from '$app/environment'; | ||
import { getCategories } from '$lib/gql/Queries'; | ||
|
||
export const load: PageLoad = ({ fetch }) => { | ||
if (browser) | ||
(async () => { | ||
const mod = await import('$lib/gql/graphqlClient'); | ||
mod.client.query( | ||
getCategories, | ||
{}, | ||
{ | ||
fetch | ||
} | ||
); | ||
})(); | ||
}; |
Oops, something went wrong.