Improve Item page

Add 500 page and dedicated 404 page
Add fake cache to tester API
Adjust some styles for better readability and usability
This commit is contained in:
Michał Gdula 2024-04-28 19:19:05 +01:00
parent 40c19335cf
commit 383f22bdf8
11 changed files with 297 additions and 91 deletions

View file

@ -1,6 +1,8 @@
import { wrap } from "svelte-spa-router/wrap";
import PageLoading from "%/pages/PageLoading.svelte";
import Page404 from "%/pages/Page404.svelte";
import Page500 from "%/pages/Page500.svelte";
const routes = {
"/": wrap({
@ -15,7 +17,7 @@ const routes = {
conditions: [],
userData: { showNavBar: true, fullWidth: true, },
}),
"/item/:name": wrap({
"/item/:uuid": wrap({
asyncComponent: () => import("%/pages/PageItem.svelte"),
loadingComponent: PageLoading,
conditions: [],
@ -39,11 +41,21 @@ const routes = {
conditions: [],
userData: { showNavBar: true, fullWidth: false, },
}),
'*': wrap({
"/ForOhFor": wrap({
component: Page404,
conditions: [],
userData: { showNavBar: true, fullWidth: false, },
})
}),
"/ServerError": wrap({
component: Page500,
conditions: [],
userData: { showNavBar: true, fullWidth: false, },
}),
"*": wrap({
component: Page404,
conditions: [],
userData: { showNavBar: true, fullWidth: false, },
}),
}
export default routes;