diff --git a/src/masto/base.ts b/src/masto/base.ts index 823fad7..a0bc4ee 100644 --- a/src/masto/base.ts +++ b/src/masto/base.ts @@ -1,6 +1,8 @@ import { createCacheBucket } from "~platform/cache"; -export const cacheBucket = /* @__PURE__ */ createCacheBucket("mastodon"); +export const CACHE_BUCKET_NAME = "mastodon" + +export const cacheBucket = /* @__PURE__ */ createCacheBucket(CACHE_BUCKET_NAME); export function toSmallCamelCase(object: T) :T { if (!object || typeof object !== "object") { diff --git a/src/material/AppTopBar.css b/src/material/AppTopBar.css index de3426d..a79321c 100644 --- a/src/material/AppTopBar.css +++ b/src/material/AppTopBar.css @@ -1,6 +1,31 @@ .AppTopBar { - & > .toolbar { + &::before { + contain: strict; + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + height: var(--safe-area-inset-top, 0); + background-color: rgba(0, 0, 0, 0.2); + } + + &>.MuiToolbar-root { padding-top: var(--safe-area-inset-top, 0px); gap: 8px; + + &>button:first-child, + &>.MuiButtonBase-root:first-child { + margin-left: -0.15em; + } + + &>button:last-child, + &>.MuiButtonBase-root:last-child { + margin-right: -0.15em; + } + + &>.title { + margin-top: -0.2ch; + } } -} +} \ No newline at end of file diff --git a/src/material/AppTopBar.tsx b/src/material/AppTopBar.tsx index a9ad382..a75c7c3 100644 --- a/src/material/AppTopBar.tsx +++ b/src/material/AppTopBar.tsx @@ -20,7 +20,6 @@ const AppTopBar: ParentComponent<{ > windowSize.height ? "dense" : "regular"} - class="toolbar" sx={{ paddingTop: "var(--safe-area-inset-top, 0px)" }} > {props.children} diff --git a/src/settings/Language.tsx b/src/settings/Language.tsx index b76495f..4a72cb1 100644 --- a/src/settings/Language.tsx +++ b/src/settings/Language.tsx @@ -25,6 +25,7 @@ import type { Template } from "@solid-primitives/i18n"; import { useStore } from "@nanostores/solid"; import { $settings } from "./stores"; import { useNavigator } from "~platform/StackedRouter"; +import AppTopBar from "~material/AppTopBar"; const ChooseLang: Component = () => { const { pop } = useNavigator(); @@ -54,17 +55,12 @@ const ChooseLang: Component = () => { return ( - - - - - {t("Choose Language")} - - + + + + + {t("Choose Language")} + } > { const {pop} = useNavigator(); @@ -31,17 +32,12 @@ const Motions: Component = () => { return ( - - + + {t("motions")} - - + } > { - const {pop} = useNavigator(); + const { pop } = useNavigator(); const [t] = createTranslator( () => import("./i18n/generic.json"), (code) => @@ -49,17 +50,12 @@ const ChooseRegion: Component = () => { return ( - - - - - {t("Choose Region")} - - + + + + + {t("Choose Region")} + } > { - if (!mod) return; + import.meta.hot.on("vite:beforeUpdate", () => { + import.meta.hot!.data[$$SAFE_AREA_EMU] = screenOrientationCallback; + }); + + import.meta.hot.on("vite:afterUpdate", () => { + screenOrientationCallback = import.meta.hot?.data?.[$$SAFE_AREA_EMU]; if (screenOrientationCallback) { - mod["screenOrientationCallback"] = screenOrientationCallback; setTimeout(screenOrientationCallback, 0); } }); @@ -193,17 +200,12 @@ const Settings: Component = () => { return ( - - - - - {t("Settings")} - - + + + + + {t("Settings")} + } > @@ -270,6 +272,17 @@ const Settings: Component = () => { +
  • + Storage + + + + + + Clear cache... + + +
  • {t("This Application")} diff --git a/src/timelines/Home.tsx b/src/timelines/Home.tsx index 99e4fd1..5b413ce 100644 --- a/src/timelines/Home.tsx +++ b/src/timelines/Home.tsx @@ -31,6 +31,7 @@ import { createSingluarItemSelection, default as ItemSelectionProvider, } from "./toots/ItemSelectionProvider"; +import AppTopBar from "~material/AppTopBar"; const Home: ParentComponent = (props) => { let panelList: HTMLDivElement; @@ -165,40 +166,34 @@ const Home: ParentComponent = (props) => { <> - - - - Home - - - Trending - - - Public - - - - - $settings.setKey( - "prefetchTootsDisabled", - !$settings.get().prefetchTootsDisabled, - ) - } - > - Prefetch Toots - - - - - - - + + + + Home + + + Trending + + + Public + + + + + $settings.setKey( + "prefetchTootsDisabled", + !$settings.get().prefetchTootsDisabled, + ) + } + > + Prefetch Toots + + + + + + } >