From b0967a8834bbd1f906905a1efd5b2e19ef02759c Mon Sep 17 00:00:00 2001 From: robonau <30987265+Robonau@users.noreply.github.com> Date: Thu, 29 Feb 2024 12:06:41 +0000 Subject: [PATCH 1/3] Version maping --- .eslintignore | 2 +- .prettierignore | 2 +- src/graphql-env.d.ts | 8 ++++---- versionToServerVersionMapping.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.eslintignore b/.eslintignore index b18c5162..bcfd30a6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,7 +7,7 @@ node_modules .env.* !.env.example -/src/lib/generated.ts +/src/graphql-env.d.ts # Ignore files for PNPM, NPM and YARN pnpm-lock.yaml diff --git a/.prettierignore b/.prettierignore index c3d71b12..d4796ded 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,7 +7,7 @@ node_modules .env.* !.env.example -/src/lib/generated.ts +/src/graphql-env.d.ts # Ignore files for PNPM, NPM and YARN pnpm-lock.yaml diff --git a/src/graphql-env.d.ts b/src/graphql-env.d.ts index c17c6601..e8342649 100644 --- a/src/graphql-env.d.ts +++ b/src/graphql-env.d.ts @@ -15524,7 +15524,7 @@ export type introspection = { import * as gqlTada from 'gql.tada'; declare module 'gql.tada' { - interface setupSchema { - introspection: introspection; - } -} + interface setupSchema { + introspection: introspection + } +} \ No newline at end of file diff --git a/versionToServerVersionMapping.json b/versionToServerVersionMapping.json index 3bcba41d..6f606169 100644 --- a/versionToServerVersionMapping.json +++ b/versionToServerVersionMapping.json @@ -5,7 +5,7 @@ }, { "tag": "v1.0.0", - "uiVersion": "r551", + "uiVersion": "r560", "serverVersion": "r1498" } ] From 49f8bbf01344a204014646451ecf07b6d454af36 Mon Sep 17 00:00:00 2001 From: robonau <30987265+Robonau@users.noreply.github.com> Date: Fri, 1 Mar 2024 01:37:49 +0000 Subject: [PATCH 2/3] fix tracking authentication --- src/routes/trackers/auth/+page.svelte | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/routes/trackers/auth/+page.svelte b/src/routes/trackers/auth/+page.svelte index fead9e79..8eae0b7f 100644 --- a/src/routes/trackers/auth/+page.svelte +++ b/src/routes/trackers/auth/+page.svelte @@ -17,10 +17,12 @@ const state: { trackerId: number } = JSON.parse( url.searchParams.get('state') ?? '{}' ); - client.mutation(loginTrackerOAuth, { - callbackUrl: url.href, - trackerId: state.trackerId - }); + await client + .mutation(loginTrackerOAuth, { + callbackUrl: url.href, + trackerId: state.trackerId + }) + .toPromise(); localStorage.setItem('VUI3_TRACKER_LOGIN', 'true'); window.close(); } From 9479817b2e8ee33759a1ce6e161e1f56401d366c Mon Sep 17 00:00:00 2001 From: robonau <30987265+Robonau@users.noreply.github.com> Date: Fri, 1 Mar 2024 01:42:51 +0000 Subject: [PATCH 3/3] add .toPromise() to some client mutations --- .../chapter/[ChapterID]/+page.svelte | 12 +++--- .../(app)/settings/categories/+page.svelte | 40 +++++++++++-------- .../categories/CategoriesEditModal.svelte | 16 ++++---- .../categories/CategoriesNewModal.svelte | 14 ++++--- 4 files changed, 48 insertions(+), 34 deletions(-) diff --git a/src/routes/(app)/manga/[MangaID]/chapter/[ChapterID]/+page.svelte b/src/routes/(app)/manga/[MangaID]/chapter/[ChapterID]/+page.svelte index 623a0cd6..1922a2e6 100644 --- a/src/routes/(app)/manga/[MangaID]/chapter/[ChapterID]/+page.svelte +++ b/src/routes/(app)/manga/[MangaID]/chapter/[ChapterID]/+page.svelte @@ -581,11 +581,13 @@ { if (e.detail) { - client.mutation(updateChapter, { - id: chapter.chapterID, - lastPageRead: chapter.pages.length, - isRead: true - }); + client + .mutation(updateChapter, { + id: chapter.chapterID, + lastPageRead: chapter.pages.length, + isRead: true + }) + .toPromise(); LoadNextChapter(currentChapterID); } }} diff --git a/src/routes/(app)/settings/categories/+page.svelte b/src/routes/(app)/settings/categories/+page.svelte index 227f39e1..29d84739 100644 --- a/src/routes/(app)/settings/categories/+page.svelte +++ b/src/routes/(app)/settings/categories/+page.svelte @@ -94,34 +94,42 @@ switch (movement) { case Movement.top: if (cat.order !== 1) { - client.mutation(updateCategoryOrder, { - id: cat.id, - position: 1 - }); + client + .mutation(updateCategoryOrder, { + id: cat.id, + position: 1 + }) + .toPromise(); } break; case Movement.up: if (cat.order !== 1) { - client.mutation(updateCategoryOrder, { - id: cat.id, - position: cat.order - 1 - }); + client + .mutation(updateCategoryOrder, { + id: cat.id, + position: cat.order - 1 + }) + .toPromise(); } break; case Movement.down: if (cat.order !== $cats.data.categories.nodes.length - 1) { - client.mutation(updateCategoryOrder, { - id: cat.id, - position: cat.order + 1 - }); + client + .mutation(updateCategoryOrder, { + id: cat.id, + position: cat.order + 1 + }) + .toPromise(); } break; default: if (cat.order !== $cats.data?.categories.nodes.length - 1) { - client.mutation(updateCategoryOrder, { - id: cat.id, - position: $cats.data.categories.nodes.length - 1 - }); + client + .mutation(updateCategoryOrder, { + id: cat.id, + position: $cats.data.categories.nodes.length - 1 + }) + .toPromise(); } break; } diff --git a/src/routes/(app)/settings/categories/CategoriesEditModal.svelte b/src/routes/(app)/settings/categories/CategoriesEditModal.svelte index 6e92b6b6..aced65ae 100644 --- a/src/routes/(app)/settings/categories/CategoriesEditModal.svelte +++ b/src/routes/(app)/settings/categories/CategoriesEditModal.svelte @@ -26,13 +26,15 @@ const client = getContextClient(); function submitChange(): void { - client.mutation(updateCategory, { - id: cat.id, - name: catinput, - default: Defaul, - includeInDownload: includeInDownload ? 'INCLUDE' : 'EXCLUDE', - includeInUpdate: includeInUpdate ? 'INCLUDE' : 'EXCLUDE' - }); + client + .mutation(updateCategory, { + id: cat.id, + name: catinput, + default: Defaul, + includeInDownload: includeInDownload ? 'INCLUDE' : 'EXCLUDE', + includeInUpdate: includeInUpdate ? 'INCLUDE' : 'EXCLUDE' + }) + .toPromise(); parent.onClose(); } diff --git a/src/routes/(app)/settings/categories/CategoriesNewModal.svelte b/src/routes/(app)/settings/categories/CategoriesNewModal.svelte index 8a0aa5e5..62465e6b 100644 --- a/src/routes/(app)/settings/categories/CategoriesNewModal.svelte +++ b/src/routes/(app)/settings/categories/CategoriesNewModal.svelte @@ -24,12 +24,14 @@ const client = getContextClient(); async function submitChange(): Promise { - client.mutation(createCategory, { - name: catinput, - default: Defaul, - includeInDownload: includeInDownload ? 'INCLUDE' : 'INCLUDE', - includeInUpdate: includeInUpdate ? 'INCLUDE' : 'INCLUDE' - }); + client + .mutation(createCategory, { + name: catinput, + default: Defaul, + includeInDownload: includeInDownload ? 'INCLUDE' : 'INCLUDE', + includeInUpdate: includeInUpdate ? 'INCLUDE' : 'INCLUDE' + }) + .toPromise(); parent.onClose(); }