Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions common/lib/panic.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// unexpected error
export function panic(reason: string): never {
throw new Error(reason, {
cause: "panic",
});
throw new Error(reason);
// TODO: 型エラーとなるため一時的にコメントアウト
// throw new Error(reason, {
// cause: "panic",
// });
}
4 changes: 3 additions & 1 deletion web/app/chat/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export default function Layout({ children }: { children: React.ReactNode }) {
<ModalProvider>
<Header title="チャット" />
<NavigateByAuthState type="toLoginForUnauthenticated">
<div className="h-full overflow-y-auto pt-12 pb-12">{children}</div>
<div className="cm-pb-footer h-full overflow-y-auto pt-12">
{children}
</div>
</NavigateByAuthState>
<BottomBar activeTab="3_chat" />
</ModalProvider>
Expand Down
4 changes: 3 additions & 1 deletion web/app/friends/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export default function Layout({ children }: { children: React.ReactNode }) {
<ModalProvider>
<Header title="フレンド" />
<NavigateByAuthState type="toLoginForUnauthenticated">
<div className="h-full overflow-y-auto pt-12 pb-12">{children}</div>
<div className="cm-pb-footer h-full overflow-y-auto pt-12">
{children}
</div>
</NavigateByAuthState>
<BottomBar activeTab="1_friends" />
</ModalProvider>
Expand Down
5 changes: 5 additions & 0 deletions web/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@
.cm-li-btn {
@apply no-animation h-auto w-full justify-start rounded-none border-none bg-white px-6 py-4 text-left font-normal text-base shadow-none hover:bg-zinc-100 focus:bg-zinc-300;
}

/* Bottom Bar の分の幅 */
.cm-pb-footer {
padding-bottom: calc(3rem + env(safe-area-inset-bottom));
}
2 changes: 1 addition & 1 deletion web/app/home/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Layout({
<>
<Header />
<NavigateByAuthState type="toLoginForUnauthenticated">
<div className="h-full pt-12 pb-12">{children}</div>
<div className="cm-pb-footer h-full pt-12">{children}</div>
</NavigateByAuthState>
<BottomBar activeTab="0_home" />
</>
Expand Down
7 changes: 4 additions & 3 deletions web/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ export default function RootLayout({
<head>
<meta charSet="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/course-mate-icon.svg" />
<meta
{/* TODO: 上書きされる*/}
{/* <meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
/>
content="width=device-width, initial-scale=1, viewport-fit=cover"
/> */}
<title>CourseMate</title>
</head>
<body className="h-full">
Expand Down
25 changes: 25 additions & 0 deletions web/app/manifest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { MetadataRoute } from "next";

export default function manifest(): MetadataRoute.Manifest {
return {
name: "CourseMate",
short_name: "CourseMate",
description: "同じ授業を履修している友達を見つけられるアプリ",
start_url: "/",
display: "standalone",
background_color: "#ffffff",
theme_color: "#ffffff",
icons: [
{
src: "/icon-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/icon-512x512.png",
sizes: "512x512",
type: "image/png",
},
],
};
}
4 changes: 3 additions & 1 deletion web/app/search/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export default function Layout({ children }: { children: React.ReactNode }) {
<ModalProvider>
<Header title="検索" />
<NavigateByAuthState type="toLoginForUnauthenticated">
<div className="h-full overflow-y-auto pt-12 pb-12">{children}</div>
<div className="cm-pb-footer h-full overflow-y-auto pt-12">
{children}
</div>
</NavigateByAuthState>
<BottomBar activeTab="2_search" />
</ModalProvider>
Expand Down
4 changes: 3 additions & 1 deletion web/app/settings/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export default function Layout({
<>
<Header title="設定" />
<NavigateByAuthState type="toLoginForUnauthenticated">
<div className="h-full overflow-y-auto pt-12 pb-12">{children}</div>
<div className="cm-pb-footer h-full overflow-y-auto pt-12">
{children}
</div>
</NavigateByAuthState>
<BottomBar activeTab="4_settings" />
</>
Expand Down
8 changes: 7 additions & 1 deletion web/components/BottomBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ function BottomBarCell({
export default function BottomBar(props: Props) {
const { activeTab } = props;
return (
<div className="fixed bottom-0 z-30 flex h-12 w-full flex-row items-center justify-around border-gray-200 border-t bg-white">
<div
className="fixed bottom-0 z-30 flex w-full flex-row items-center justify-around border-gray-200 border-t bg-white"
style={{
height: "calc(3rem + env(safe-area-inset-bottom))",
paddingBottom: "env(safe-area-inset-bottom)",
}}
>
<BottomBarCell
href="/home"
iconComponent={
Expand Down
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "next dev -p 5173",
"build": "next build",
"postbuild": "find ./out -type f \\( -name \"*.html\" -o -name \"*.txt\" \\) -exec sed -E -i 's/(width=device-width, initial-scale=1)([^,])/\\1, viewport-fit=cover\\2/g' {} +",
"preview": "next start"
},
"dependencies": {
Expand Down
Binary file added web/public/icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/public/icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading