-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ded8db3
commit 556af87
Showing
24 changed files
with
809 additions
and
120 deletions.
There are no files selected for viewing
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Card, Container } from "@mui/material"; | ||
import { Box } from "@mui/system"; | ||
import { Metadata } from "next"; | ||
import Image from "next/image"; | ||
|
||
import EmailConfirmer from "@/components/EmailConfirmer"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Bekreft e-post | Boklisten.no", | ||
description: | ||
"Bekreft din e-post-adresse, slik at du får viktig informasjon fra oss.", | ||
}; | ||
|
||
export default function TokenPage({ | ||
params, | ||
}: { | ||
params: { confirmationId: string }; | ||
}) { | ||
return ( | ||
<Card sx={{ paddingBottom: "2rem" }}> | ||
<Container component="main" maxWidth="xs"> | ||
<Box | ||
sx={{ | ||
marginTop: 8, | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
}} | ||
> | ||
<Image | ||
src="/boklisten_logo_v2_icon_blue.png" | ||
width={50} | ||
height={50} | ||
alt="logo" | ||
/> | ||
<EmailConfirmer confirmationId={params.confirmationId} /> | ||
</Box> | ||
</Container> | ||
</Card> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { Alert, AlertTitle, Card, Container } from "@mui/material"; | ||
import { Box } from "@mui/system"; | ||
import { Metadata } from "next"; | ||
import Image from "next/image"; | ||
|
||
import DynamicLink from "@/components/DynamicLink"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Klarte ikke logge inn | Boklisten.no", | ||
description: | ||
"Vi klarte ikke å logge deg inn. Vennligst prøv på nytt eller ta kontakt hvis problemet vedvarer.", | ||
}; | ||
|
||
export default function AuthFailurePage() { | ||
return ( | ||
<Card sx={{ paddingBottom: "2rem" }}> | ||
<Container component="main" maxWidth="xs"> | ||
<Box | ||
sx={{ | ||
marginTop: 8, | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
}} | ||
> | ||
<Image | ||
src="/boklisten_logo_v2_icon_blue.png" | ||
width={50} | ||
height={50} | ||
alt="logo" | ||
/> | ||
<Alert severity={"error"} sx={{ my: 2 }}> | ||
<AlertTitle>Vi klarte ikke å logge deg inn</AlertTitle> | ||
Vennligst prøv på nytt eller ta kontakt hvis problemet vedvarer. | ||
</Alert> | ||
<DynamicLink href={"/auth/login"}> | ||
Tilbake til innloggingssiden | ||
</DynamicLink> | ||
</Box> | ||
</Container> | ||
</Card> | ||
); | ||
} |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"use client"; | ||
import { Card, Container, Typography } from "@mui/material"; | ||
import { Box } from "@mui/system"; | ||
import Image from "next/image"; | ||
import { useEffect } from "react"; | ||
|
||
import { logout } from "@/api/auth"; | ||
import CountdownToRedirect from "@/components/CountdownToRedirect"; | ||
import BL_CONFIG from "@/utils/bl-config"; | ||
|
||
// TODO before merge: handle login/logout redirects to and from bl-admin as well | ||
// TODO before merge: handle permission lockouts for bl-admin | ||
|
||
export default function LogoutPage() { | ||
useEffect(() => { | ||
logout(); | ||
}, []); | ||
return ( | ||
<Card sx={{ paddingBottom: "2rem" }}> | ||
<Container component="main" maxWidth="xs"> | ||
<Box | ||
sx={{ | ||
marginTop: 8, | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
}} | ||
> | ||
<Image | ||
src="/boklisten_logo_v2_icon_blue.png" | ||
width={50} | ||
height={50} | ||
alt="logo" | ||
/> | ||
<Typography component="h1" variant="h5" sx={{ mt: 1 }}> | ||
Du er nå logget ut | ||
</Typography> | ||
<CountdownToRedirect | ||
path={`${BL_CONFIG.blWeb.basePath}?logout=true`} | ||
seconds={3} | ||
/> | ||
</Box> | ||
</Container> | ||
</Card> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Alert, AlertTitle, Card, Container } from "@mui/material"; | ||
import { Box } from "@mui/system"; | ||
import { Metadata } from "next"; | ||
import Image from "next/image"; | ||
|
||
import DynamicLink from "@/components/DynamicLink"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Du har ikke tilgang til denne siden | Boklisten.no", | ||
description: | ||
"Vi klarte ikke å logge deg inn. Vennligst prøv på nytt eller ta kontakt hvis problemet vedvarer.", | ||
}; | ||
|
||
export default function PermissionDeniedPage() { | ||
return ( | ||
<Card sx={{ paddingBottom: "2rem" }}> | ||
<Container component="main" maxWidth="xs"> | ||
<Box | ||
sx={{ | ||
marginTop: 8, | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
}} | ||
> | ||
<Image | ||
src="/boklisten_logo_v2_icon_blue.png" | ||
width={50} | ||
height={50} | ||
alt="logo" | ||
/> | ||
<Alert severity={"error"} sx={{ my: 2 }}> | ||
<AlertTitle>Du har tilgang til å se dette innholdet</AlertTitle> | ||
Du forsøke å logge inn med en annen bruker eller ta kontakt med | ||
administrator for spørsmål. | ||
</Alert> | ||
<DynamicLink href={"/auth/login"}> | ||
Tilbake til innloggingssiden | ||
</DynamicLink> | ||
</Box> | ||
</Container> | ||
</Card> | ||
); | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { Card, Container, Typography } from "@mui/material"; | ||
import { Box } from "@mui/system"; | ||
import { Metadata } from "next"; | ||
import Image from "next/image"; | ||
|
||
import PasswordReset from "@/components/user/PasswordReset"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Lag nytt passord | Boklisten.no", | ||
description: "Lag et nytt passord, slik at du får tilgang på kontoen din.", | ||
}; | ||
|
||
export default function PasswordResetPage({ | ||
params, | ||
}: { | ||
params: { userId: string }; | ||
}) { | ||
return ( | ||
<Card sx={{ paddingBottom: "2rem" }}> | ||
<Container component="main" maxWidth="xs"> | ||
<Box | ||
sx={{ | ||
marginTop: 4, | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
}} | ||
> | ||
<Image | ||
src="/boklisten_logo_v2_icon_blue.png" | ||
width={50} | ||
height={50} | ||
alt="logo" | ||
/> | ||
<Typography component="h1" variant="h5" sx={{ mt: 1 }}> | ||
Lag nytt passord | ||
</Typography> | ||
<PasswordReset userId={params.userId} /> | ||
</Box> | ||
</Container> | ||
</Card> | ||
); | ||
} |
Oops, something went wrong.