-
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.
Merge pull request #206 from h8570rg/maintenance_mode
Maintenance mode
- Loading branch information
Showing
7 changed files
with
2,024 additions
and
2,466 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
NEXT_PUBLIC_SERVICE_ENV=local | ||
NEXT_PUBLIC_SERVICE_NAME=janreco | ||
NEXT_PUBLIC_SUPABASE_URL= | ||
NEXT_PUBLIC_SUPABASE_ANON_KEY= | ||
GOOGLE_CLIENT_ID= | ||
GOOGLE_SECRET= | ||
OPENAI_API_KEY= | ||
MAINTENANCE_MODE=false |
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,59 @@ | ||
"use client"; | ||
|
||
import { | ||
Navbar as NextUINavbar, | ||
NavbarBrand, | ||
NavbarContent, | ||
} from "@nextui-org/react"; | ||
import Link from "next/link"; | ||
import { useRouter } from "next/navigation"; | ||
import { useState } from "react"; | ||
import { Alert } from "@/components/Alert"; | ||
import { Button } from "@/components/Button"; | ||
import { Icon } from "@/components/Icon"; | ||
import Logo from "@/components/Logo"; | ||
|
||
export default function MaintenancePage() { | ||
const router = useRouter(); | ||
const [isRefreshing, setIsRefreshing] = useState(false); | ||
return ( | ||
<main className="relative flex min-h-screen flex-col"> | ||
<NextUINavbar position="static" className="absolute inset-x-0 top-0"> | ||
<NavbarContent> | ||
<NavbarBrand> | ||
<Link color="foreground" href="/"> | ||
<Logo className="text-large" /> | ||
</Link> | ||
</NavbarBrand> | ||
</NavbarContent> | ||
</NextUINavbar> | ||
<div className="flex grow items-center justify-center px-4"> | ||
<div className="flex flex-col items-center gap-4"> | ||
<h1 className="text-center text-large">メンテナンス中</h1> | ||
<Alert | ||
color="warning" | ||
title="申し訳ありませんが、現在メンテナンス中です。しばらくしてから再度お試しください。" | ||
endContent={ | ||
<div className="flex items-center justify-center self-stretch"></div> | ||
} | ||
/> | ||
<Button | ||
color="default" | ||
variant="flat" | ||
startContent={ | ||
!isRefreshing && <Icon className="size-5" name="refresh" /> | ||
} | ||
onPress={() => { | ||
router.refresh(); | ||
setIsRefreshing(true); | ||
setTimeout(() => setIsRefreshing(false), 1000); | ||
}} | ||
isLoading={isRefreshing} | ||
> | ||
再読み込み | ||
</Button> | ||
</div> | ||
</div> | ||
</main> | ||
); | ||
} |
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 @@ | ||
export { Alert } from "@nextui-org/react"; |
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
Oops, something went wrong.