Skip to content

Commit

Permalink
Merge pull request #10 from ContentsViewer/feature/safe-area
Browse files Browse the repository at this point in the history
Feature/safe area
  • Loading branch information
ContentsViewer authored Apr 18, 2024
2 parents ab13232 + 67ed984 commit 01fc805
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 31 deletions.
20 changes: 8 additions & 12 deletions app/app-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,16 @@ export function AppLayout({ children }: { children: React.ReactNode }) {
<ThemeChanger />
<DynamicBackground />
<AudioPlayer />
{/* <StatusBar /> */}
<Box
<Box sx={{
pb: `calc(env(safe-area-inset-bottom, 0) + 144px)`,
}}>{children}</Box>
<MiniPlayer
sx={{
flexGrow: 1,
overflowY: "auto",
overflowX: "hidden",
mt: 4,
mb: 10,
position: "fixed",
left: `env(safe-area-inset-left, 0)`,
right: `env(safe-area-inset-right, 0)`,
bottom: `env(safe-area-inset-bottom, 0)`,
}}
>
{children}
</Box>
<MiniPlayer
sx={{ position: "fixed", bottom: 0, left: 0, right: 0 }}
/>
</DynamicThemeStoreProvider>
</PlayerStoreProvider>
Expand Down
6 changes: 5 additions & 1 deletion app/files/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,11 @@ export default function Page() {
</div>
</Toolbar>
</ElevationAppBar>
<FileList sx={{ mt: 5 }} files={files} />
<FileList sx={{
mt: 8,
pl: `env(safe-area-inset-left, 0)`,
pr: `env(safe-area-inset-right, 0)`,
}} files={files} />
</Box>
)
}
6 changes: 5 additions & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ body {
} */

html, body {
min-height: 100vh;
/* min-height: 100vh; */
box-sizing: border-box;
height: 100%;
padding: 0;
margin: 0;
}

.snackbar-container {
Expand Down
27 changes: 14 additions & 13 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import "./globals.css";
import { AppRouterCacheProvider } from '@mui/material-nextjs/v13-appRouter';
import { CssBaseline } from "@mui/material";
import { AppLayout } from "./app-layout";
import { ThemeStoreProvider } from "@/src/stores/theme-store";

import "./globals.css"
import { AppRouterCacheProvider } from "@mui/material-nextjs/v13-appRouter"
import { CssBaseline } from "@mui/material"
import { AppLayout } from "./app-layout"
import { ThemeStoreProvider } from "@/src/stores/theme-store"
import type { Viewport } from 'next'

export const viewport: Viewport = {
viewportFit: "cover",
}

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
children: React.ReactNode
}>) {

return (
<html lang="en">
<head>
Expand All @@ -20,14 +23,12 @@ export default function RootLayout({
<AppRouterCacheProvider>
<ThemeStoreProvider>
<CssBaseline />
<AppLayout>
{children}
</AppLayout>
<AppLayout>{children}</AppLayout>
</ThemeStoreProvider>
</AppRouterCacheProvider>
</body>
</html>
);
)
}

export const dynamic = "force-static"
export const dynamic = "force-static"
5 changes: 3 additions & 2 deletions app/redirect/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default function Page() {
flexDirection: "column",
}}
>
<Box
<CircularProgress />
{/* <Box
sx={{
width: 100,
height: 100,
Expand Down Expand Up @@ -78,7 +79,7 @@ export default function Page() {
/>
)}
</Box>
<Box>Connecting...</Box>
<Box>Connecting...</Box> */}
</Backdrop>
</Box>
)
Expand Down
2 changes: 1 addition & 1 deletion public/sw.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/mini-player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const TimelineSlider = () => {
display: "flex",
alignItems: "center",
justifyContent: "space-between",
mt: -1.5,
mt: -2,
}}
>
<Typography variant="caption" color={colorOnSurfaceVariant} sx={{}}>
Expand Down

0 comments on commit 01fc805

Please sign in to comment.