diff --git a/framerail/src/lib/popup/error.svelte b/framerail/src/lib/popup/error.svelte index faca6e4db6..68d99a1415 100644 --- a/framerail/src/lib/popup/error.svelte +++ b/framerail/src/lib/popup/error.svelte @@ -30,6 +30,11 @@
+ {#if $showErrorPopup.data} + + {/if} diff --git a/framerail/src/lib/stores.ts b/framerail/src/lib/stores.ts index 6bfcd55fe2..8cb33b6c44 100644 --- a/framerail/src/lib/stores.ts +++ b/framerail/src/lib/stores.ts @@ -3,5 +3,6 @@ import { useWritable } from "./use-shared-store" export const useErrorPopup = () => useWritable("errorPopup", { state: false, - message: null + message: null, + data: null, }) diff --git a/framerail/src/routes/+error.svelte b/framerail/src/routes/+error.svelte index 3ad5f75535..ab7b14311a 100644 --- a/framerail/src/routes/+error.svelte +++ b/framerail/src/routes/+error.svelte @@ -27,7 +27,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { goto(`/${$page.params.slug}`, { @@ -46,7 +47,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { deletedPages = res @@ -65,7 +67,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { showRestoreAction = false diff --git a/framerail/src/routes/+layout.svelte b/framerail/src/routes/+layout.svelte index 5685ba9a2c..e0a05d9ffe 100644 --- a/framerail/src/routes/+layout.svelte +++ b/framerail/src/routes/+layout.svelte @@ -8,7 +8,8 @@ function closeErrorPopup() { showErrorPopup.set({ state: false, - message: null + message: null, + data: null }) } diff --git a/framerail/src/routes/[slug]/[...extra]/page.svelte b/framerail/src/routes/[slug]/[...extra]/page.svelte index 2330175405..d7f248f9c2 100644 --- a/framerail/src/routes/[slug]/[...extra]/page.svelte +++ b/framerail/src/routes/[slug]/[...extra]/page.svelte @@ -34,7 +34,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else invalidateAll() } @@ -69,7 +70,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { goto(`/${$page.data.page.slug}`, { @@ -97,7 +99,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { goto(`/${newSlug}`, { @@ -119,7 +122,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { showLayoutAction = false @@ -138,7 +142,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { parents = res.join(" ") @@ -173,7 +178,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { showParentAction = false @@ -192,7 +198,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { res.forEach((rev) => { @@ -229,7 +236,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else if (!rev) { // This is a revision we didn't even cache...? @@ -258,7 +266,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else invalidateAll() } @@ -274,7 +283,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { voteRating = res.score ?? 0 @@ -293,7 +303,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { voteMap = new Map() @@ -315,7 +326,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } } @@ -331,7 +343,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } } diff --git a/framerail/src/routes/[x+2d]/admin/+page.svelte b/framerail/src/routes/[x+2d]/admin/+page.svelte index 1415618612..80dd867c6d 100644 --- a/framerail/src/routes/[x+2d]/admin/+page.svelte +++ b/framerail/src/routes/[x+2d]/admin/+page.svelte @@ -23,7 +23,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { isEdit = false diff --git a/framerail/src/routes/[x+2d]/login/+page.svelte b/framerail/src/routes/[x+2d]/login/+page.svelte index 2cb149346d..b1a2e93c4e 100644 --- a/framerail/src/routes/[x+2d]/login/+page.svelte +++ b/framerail/src/routes/[x+2d]/login/+page.svelte @@ -20,7 +20,8 @@ } else { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } } diff --git a/framerail/src/routes/[x+2d]/user/+page.svelte b/framerail/src/routes/[x+2d]/user/+page.svelte index c22bf8538a..0293782a5d 100644 --- a/framerail/src/routes/[x+2d]/user/+page.svelte +++ b/framerail/src/routes/[x+2d]/user/+page.svelte @@ -21,7 +21,8 @@ if (res?.message) { showErrorPopup.set({ state: true, - message: res.message + message: res.message, + data: res.data }) } else { isEdit = false