Timelines: respect the notch
All checks were successful
/ depoly (push) Successful in 1m19s

This commit is contained in:
thislight 2024-07-24 14:27:20 +08:00
parent 48b417e005
commit d0feb118c9
No known key found for this signature in database
GPG key ID: A50F9451AC56A63E
6 changed files with 17 additions and 9 deletions

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
node_modules
dist/
dist/
dev-dist/

View file

@ -2,8 +2,11 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title>Tutu</title>
<link rel="stylesheet" href="/src/App.css" />
<script src="/src/index.tsx" type="module"></script>
</head>
<body>

View file

@ -1,5 +1,10 @@
:root {
--safe-area-inset-top: env(safe-area-inset-top);
--safe-area-inset-left: env(safe-area-inset-left);
--safe-area-inset-bottom: env(safe-area-inset-bottom);
--safe-area-inset-right: env(safe-area-inset-right);
background-color: var(--tutu-color-surface, transparent);
overscroll-behavior-block: contain;
}
.custom-emoji {

View file

@ -13,7 +13,6 @@ import {
createMastoClientFor,
type Session,
} from "./masto/clients.js";
import "./App.css";
import { $accounts } from "./accounts/stores.js";
import { useStore } from "@nanostores/solid";

View file

@ -42,7 +42,7 @@ const Settings: ParentComponent = () => {
}
.setting-list {
padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
padding-bottom: calc(var(--safe-area-inset-bottom, 0px) + 16px);
}
`;
return (

View file

@ -122,7 +122,7 @@ const TimelinePanel: Component<{
<div
style={{
display: "flex",
padding: "20px 0",
padding: "20px 0 var(--safe-area-inset-bottom, 20px)",
"align-items": "center",
"justify-content": "center",
}}
@ -136,7 +136,7 @@ const TimelinePanel: Component<{
<div
style={{
display: "flex",
padding: "20px 0",
padding: "20px 0 var(--safe-area-inset-bottom, 20px)",
"align-items": "center",
"justify-content": "center",
}}
@ -239,8 +239,6 @@ const Home: ParentComponent = (props) => {
max-width: 560px;
height: 100%;
padding: 40px 16px;
max-height: calc(100vh - var(--scaffold-topbar-height, 0px));
max-height: calc(100dvh - var(--scaffold-topbar-height, 0px));
scroll-snap-align: center;
@media (max-width: 600px) {
@ -257,6 +255,8 @@ const Home: ParentComponent = (props) => {
scroll-snap-stop: always;
height: calc(100vh - var(--scaffold-topbar-height, 0px));
height: calc(100dvh - var(--scaffold-topbar-height, 0px));
padding-left: var(--safe-area-inset-left, 0);
padding-right: var(--safe-area-inset-right, 0);
@media (max-width: 600px) {
grid-auto-columns: 100%;
@ -269,7 +269,7 @@ const Home: ParentComponent = (props) => {
<Scaffold
topbar={
<AppBar position="static">
<Toolbar variant="dense" class="responsive">
<Toolbar variant="dense" class="responsive" sx={{ paddingTop: "var(--safe-area-inset-top, 0px)" }}>
<Tabs onFocusChanged={setCurrentFocusOn} offset={panelOffset()}>
<Tab focus={isTabFocus(0)} onClick={[onTabClick, 0]}>
Home