-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow group managers to access group management page (#119)
- Loading branch information
Showing
3 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,27 +1,35 @@ | ||
<script lang="ts"> | ||
import { page } from "$app/stores"; | ||
import notFound from "$lib/assets/not_found.svg"; | ||
import error from "$lib/assets/error.svg"; | ||
import notFoundAsset from "$lib/assets/not_found.svg"; | ||
import errorAsset from "$lib/assets/error.svg"; | ||
import unauthorizedAsset from "$lib/assets/unauthorized.svg"; | ||
type ErrorInfo = { | ||
image: string; | ||
message: string; | ||
}; | ||
const errors: Record<number, ErrorInfo> = { | ||
401: { | ||
image: unauthorizedAsset, | ||
message: "Not Authorized" | ||
}, | ||
404: { | ||
image: notFound, | ||
image: notFoundAsset, | ||
message: "The page you were looking for wasn't found" | ||
}, | ||
500: { | ||
image: error, | ||
image: errorAsset, | ||
message: "Something went wrong" | ||
} | ||
}; | ||
const error = errors[$page.status] ? errors[$page.status] : errors[500]; | ||
const errorMessage = $page.error?.message || error.message; | ||
</script> | ||
|
||
<div class="flex flex-col items-center justify-center space-y-4 pt-4"> | ||
<p class="text-4xl">{$page.status}</p> | ||
<img class="w-3/4 md:w-1/3" alt={errors[$page.status].message} src={errors[$page.status].image} /> | ||
<p class="text-2xl">{errors[$page.status].message}</p> | ||
<img class="w-3/4 md:w-1/3" alt={errorMessage} src={error.image} /> | ||
<p class="text-2xl">{errorMessage}</p> | ||
</div> |
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