diff --git a/default.conf b/default.conf index 3e3298a3..bea1b548 100644 --- a/default.conf +++ b/default.conf @@ -7,7 +7,7 @@ server { try_files $uri /index.html =404; } location /api { - resolver 127.0.0.11 valid=30s; + resolver 127.0.0.11 172.17.0.10 kube-dns.kube-system.svc.cluster.local valid=30s; set $upstreame PLACEHOLDER; proxy_pass $upstreame; proxy_http_version 1.1; @@ -16,7 +16,7 @@ server { } location /v1 { - resolver 8.8.8.8 valid=30s ipv6=off; + resolver 127.0.0.11 172.17.0.10 kube-dns.kube-system.svc.cluster.local 8.8.8.8 valid=30s ipv6=off; set $upstreame https://api.mangaupdates.com; proxy_pass $upstreame; proxy_http_version 1.1; diff --git a/schema.graphql b/schema.graphql index 91b3444e..a5021507 100644 --- a/schema.graphql +++ b/schema.graphql @@ -379,6 +379,7 @@ type Mutation { updateExtension(input: UpdateExtensionInput!): UpdateExtensionPayload! updateExtensions(input: UpdateExtensionsInput!): UpdateExtensionsPayload! clearCachedImages(input: ClearCachedImagesInput!): ClearCachedImagesPayload! + resetWebUIUpdateStatus: WebUIUpdateStatus! updateWebUI(input: WebUIUpdateInput!): WebUIUpdatePayload! deleteMangaMeta(input: DeleteMangaMetaInput!): DeleteMangaMetaPayload! fetchManga(input: FetchMangaInput!): FetchMangaPayload! @@ -694,7 +695,6 @@ type WebUIUpdateCheck { type WebUIUpdateInfo { channel: String! tag: String! - updateAvailable: Boolean! } type WebUIUpdatePayload { clientMutationId: String @@ -847,7 +847,7 @@ enum TriState { EXCLUDE } enum UpdateState { - STOPPED + IDLE DOWNLOADING FINISHED ERROR diff --git a/src/lib/MountTitleAction.ts b/src/lib/MountTitleAction.ts index aad12e9b..37ede969 100644 --- a/src/lib/MountTitleAction.ts +++ b/src/lib/MountTitleAction.ts @@ -4,9 +4,9 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. -import { afterUpdate, onDestroy } from 'svelte'; +import { onDestroy } from 'svelte'; import type { ComponentType, ComponentProps } from 'svelte'; -import { readonly, writable, type Writable } from 'svelte/store'; +import { readonly, writable } from 'svelte/store'; type actionStoreT = { component: T; @@ -14,18 +14,16 @@ type actionStoreT = { }; // i dont really like that i cant type this nicely, AppBarData is typed good though -const actionStore: Writable = writable(null); +const actionStore = writable(null); -const titleStore: Writable = writable('loading...'); +const titleStore = writable('Loading...'); export const action = readonly(actionStore); export const title = readonly(titleStore); export function AppBarData(title: string, action?: actionStoreT) { - afterUpdate(() => { - if (action) actionStore.set(action); - titleStore.set(title); - }); + if (action) actionStore.set(action); + titleStore.set(title); onDestroy(() => { actionStore.set(null); titleStore.set('Loading...'); diff --git a/src/lib/generated.ts b/src/lib/generated.ts index 65614b76..179d2023 100644 --- a/src/lib/generated.ts +++ b/src/lib/generated.ts @@ -962,6 +962,7 @@ export type Mutation = { installExternalExtension: InstallExternalExtensionPayload; reorderChapterDownload: ReorderChapterDownloadPayload; resetSettings: ResetSettingsPayload; + resetWebUIUpdateStatus: WebUiUpdateStatus; restoreBackup: RestoreBackupPayload; setCategoryMeta: SetCategoryMetaPayload; setChapterMeta: SetChapterMetaPayload; @@ -2027,7 +2028,7 @@ export enum UpdateState { Downloading = 'DOWNLOADING', Error = 'ERROR', Finished = 'FINISHED', - Stopped = 'STOPPED' + Idle = 'IDLE' } export type UpdateStatus = { @@ -2103,7 +2104,6 @@ export type WebUiUpdateInfo = { __typename?: 'WebUIUpdateInfo'; channel: Scalars['String']['output']; tag: Scalars['String']['output']; - updateAvailable: Scalars['Boolean']['output']; }; export type WebUiUpdateInput = { diff --git a/src/routes/(app)/(library)/LibraryStores.ts b/src/routes/(app)/(library)/LibraryStores.ts index 1fea5f1f..8d98652e 100644 --- a/src/routes/(app)/(library)/LibraryStores.ts +++ b/src/routes/(app)/(library)/LibraryStores.ts @@ -6,8 +6,8 @@ import type { CategoryQuery } from '$lib/generated'; // import { localStorageStore } from '@skeletonlabs/skeleton'; -import { writable, type Writable } from 'svelte/store'; +import { writable } from 'svelte/store'; export type MangaType = NonNullable['mangas']['nodes'][0]; -export const selected: Writable = writable([]); +export const selected = writable([]); export const selectMode = writable(false); diff --git a/src/routes/(app)/browse/BrowseStores.ts b/src/routes/(app)/browse/BrowseStores.ts index 4cb6406a..b98f914b 100644 --- a/src/routes/(app)/browse/BrowseStores.ts +++ b/src/routes/(app)/browse/BrowseStores.ts @@ -6,9 +6,8 @@ import { localStorageStore } from '@skeletonlabs/skeleton'; import * as devalue from 'devalue'; -import type { Writable } from 'svelte/store'; -export const langFilter: Writable> = localStorageStore( +export const langFilter = localStorageStore>( 'Global/MigrateLangfilt', new Set(['all']), { @@ -16,7 +15,7 @@ export const langFilter: Writable> = localStorageStore( } ); -export const SpecificSourceFilter: Writable> = localStorageStore( +export const SpecificSourceFilter = localStorageStore>( 'Global/MigrateSpecificSourceFilter', new Set([]), { diff --git a/src/routes/(app)/browse/extensions/ExtensionsStores.ts b/src/routes/(app)/browse/extensions/ExtensionsStores.ts index 3e530ab8..ac7d29b3 100644 --- a/src/routes/(app)/browse/extensions/ExtensionsStores.ts +++ b/src/routes/(app)/browse/extensions/ExtensionsStores.ts @@ -6,13 +6,12 @@ import { localStorageStore } from '@skeletonlabs/skeleton'; import * as devalue from 'devalue'; -import type { Writable } from 'svelte/store'; -export const lastFetched: Writable = localStorageStore('lastFetchedExtensions', new Date(0), { +export const lastFetched = localStorageStore('lastFetchedExtensions', new Date(0), { serializer: devalue }); -export const langFilter: Writable> = localStorageStore( +export const langFilter = localStorageStore>( 'ExtensionsLangFilter', new Set(['all', 'en']), { diff --git a/src/routes/(app)/browse/globalsearch/GlobalSearchLangFilterModal.svelte b/src/routes/(app)/browse/globalsearch/GlobalSearchLangFilterModal.svelte index aa4c85ec..bd76fa69 100644 --- a/src/routes/(app)/browse/globalsearch/GlobalSearchLangFilterModal.svelte +++ b/src/routes/(app)/browse/globalsearch/GlobalSearchLangFilterModal.svelte @@ -17,7 +17,7 @@ export let langs: Set; export let langFilter: Writable>; export let rawSources: SourcesQuery['sources'] | undefined; - const tabSet: Writable = localStorageStore('browseTabSet', 0); + const tabSet = localStorageStore('browseTabSet', 0); $: LangFilteredSources = rawSources?.nodes.filter((source) => { if (!$langFilter.has(source.lang)) return false; diff --git a/src/routes/(app)/browse/source/[sourceID]/filter/stores.ts b/src/routes/(app)/browse/source/[sourceID]/filter/stores.ts index 49b2d262..26790047 100644 --- a/src/routes/(app)/browse/source/[sourceID]/filter/stores.ts +++ b/src/routes/(app)/browse/source/[sourceID]/filter/stores.ts @@ -5,7 +5,7 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import type { FilterChangeInput } from '$lib/generated'; -import { type Writable, writable } from 'svelte/store'; +import { writable } from 'svelte/store'; -export const filters: Writable = writable([]); +export const filters = writable([]); export const filtersSause = writable(''); diff --git a/src/routes/(app)/browse/sources/SourcesStores.ts b/src/routes/(app)/browse/sources/SourcesStores.ts index d824fa97..5deda5e0 100644 --- a/src/routes/(app)/browse/sources/SourcesStores.ts +++ b/src/routes/(app)/browse/sources/SourcesStores.ts @@ -5,10 +5,9 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { localStorageStore } from '@skeletonlabs/skeleton'; -import type { Writable } from 'svelte/store'; import * as devalue from 'devalue'; -export const SourceLangFilter: Writable> = localStorageStore( +export const SourceLangFilter = localStorageStore>( 'SourceLangFilter', new Set(['all', 'localsourcelang']), { diff --git a/src/routes/(app)/downloads/downloadsStores.ts b/src/routes/(app)/downloads/downloadsStores.ts index ad8d6d7e..3e463981 100644 --- a/src/routes/(app)/downloads/downloadsStores.ts +++ b/src/routes/(app)/downloads/downloadsStores.ts @@ -6,10 +6,9 @@ import { localStorageStore } from '@skeletonlabs/skeleton'; import * as devalue from 'devalue'; -import type { Writable } from 'svelte/store'; export type Filter = 'QUEUED' | 'DOWNLOADING' | 'FINISHED' | 'ERROR'; -export const filter: Writable> = localStorageStore('Downlaodsfilter', new Set([]), { +export const filter = localStorageStore>('Downlaodsfilter', new Set([]), { serializer: devalue }); diff --git a/src/routes/(app)/manga/[MangaID]/(manga)/mangaStores.ts b/src/routes/(app)/manga/[MangaID]/(manga)/mangaStores.ts index bc2be603..6c9757a6 100644 --- a/src/routes/(app)/manga/[MangaID]/(manga)/mangaStores.ts +++ b/src/routes/(app)/manga/[MangaID]/(manga)/mangaStores.ts @@ -6,9 +6,9 @@ import type { GetMangaQuery } from '$lib/generated'; // import { localStorageStore } from "@skeletonlabs/skeleton"; -import { writable, type Writable } from 'svelte/store'; +import { writable } from 'svelte/store'; export type chaptertype = GetMangaQuery['manga']['chapters']['nodes'][0]; export const selectMode = writable(false); -export const selected: Writable = writable([]); +export const selected = writable([]); diff --git a/src/routes/(app)/manga/[MangaID]/chapter/[ChapterID]/chapterStores.ts b/src/routes/(app)/manga/[MangaID]/chapter/[ChapterID]/chapterStores.ts index 57361fc4..47103db2 100644 --- a/src/routes/(app)/manga/[MangaID]/chapter/[ChapterID]/chapterStores.ts +++ b/src/routes/(app)/manga/[MangaID]/chapter/[ChapterID]/chapterStores.ts @@ -5,8 +5,8 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. // import { localStorageStore } from "@skeletonlabs/skeleton"; -import { writable, type Writable } from 'svelte/store'; +import { writable } from 'svelte/store'; export const mangaTitle = writable(''); export const chapterTitle = writable(''); -export const ViewNav: Writable = writable(false); +export const ViewNav = writable(false); diff --git a/src/routes/(app)/updates/+page.svelte b/src/routes/(app)/updates/+page.svelte index 01c94ed2..b6e8beda 100644 --- a/src/routes/(app)/updates/+page.svelte +++ b/src/routes/(app)/updates/+page.svelte @@ -10,7 +10,7 @@ import UpdatesActions from './UpdatesActions.svelte'; import { AppBarData } from '$lib/MountTitleAction'; import { updates, type UpdatesQuery } from '$lib/generated'; - import { writable, type Writable } from 'svelte/store'; + import { writable } from 'svelte/store'; import MangaCard from '$lib/components/MangaCard.svelte'; import { longPress } from '$lib/press'; import { selectMode, selected } from './UpdatesStores'; @@ -30,7 +30,7 @@ }); let page = writable(0); - let all: Writable = writable(null); + let all = writable(null); $: update = updates({ variables: { offset: $page } }); $: $update, updateall(); function updateall() { diff --git a/src/routes/(app)/updates/UpdatesStores.ts b/src/routes/(app)/updates/UpdatesStores.ts index b7193822..f1c422f0 100644 --- a/src/routes/(app)/updates/UpdatesStores.ts +++ b/src/routes/(app)/updates/UpdatesStores.ts @@ -4,10 +4,10 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. -import { type Writable, writable } from 'svelte/store'; +import { writable } from 'svelte/store'; import type { UpdatesQuery } from '$lib/generated'; export type UpdateNode = UpdatesQuery['chapters']['nodes'][0]; -export const selected: Writable = writable([]); +export const selected = writable([]); export const selectMode = writable(false);