diff --git a/src/masto/base.ts b/src/masto/base.ts index a0bc4ee..823fad7 100644 --- a/src/masto/base.ts +++ b/src/masto/base.ts @@ -1,8 +1,6 @@ import { createCacheBucket } from "~platform/cache"; -export const CACHE_BUCKET_NAME = "mastodon" - -export const cacheBucket = /* @__PURE__ */ createCacheBucket(CACHE_BUCKET_NAME); +export const cacheBucket = /* @__PURE__ */ createCacheBucket("mastodon"); export function toSmallCamelCase(object: T) :T { if (!object || typeof object !== "object") { diff --git a/src/material/AppTopBar.css b/src/material/AppTopBar.css index a79321c..de3426d 100644 --- a/src/material/AppTopBar.css +++ b/src/material/AppTopBar.css @@ -1,31 +1,6 @@ .AppTopBar { - &::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 { + & > .toolbar { 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 a75c7c3..a9ad382 100644 --- a/src/material/AppTopBar.tsx +++ b/src/material/AppTopBar.tsx @@ -20,6 +20,7 @@ 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 4a72cb1..b76495f 100644 --- a/src/settings/Language.tsx +++ b/src/settings/Language.tsx @@ -25,7 +25,6 @@ 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(); @@ -55,12 +54,17 @@ const ChooseLang: Component = () => { return ( - - - - {t("Choose Language")} - + + + + + + {t("Choose Language")} + + } > { const {pop} = useNavigator(); @@ -32,12 +31,17 @@ const Motions: Component = () => { return ( - + + + {t("motions")} - + + } > { - const { pop } = useNavigator(); + const {pop} = useNavigator(); const [t] = createTranslator( () => import("./i18n/generic.json"), (code) => @@ -50,12 +49,17 @@ const ChooseRegion: Component = () => { return ( - - - - {t("Choose Region")} - + + + + + + {t("Choose Region")} + + } > { - import.meta.hot!.data[$$SAFE_AREA_EMU] = screenOrientationCallback; - }); - - import.meta.hot.on("vite:afterUpdate", () => { - screenOrientationCallback = import.meta.hot?.data?.[$$SAFE_AREA_EMU]; + import.meta.hot.accept((mod) => { + if (!mod) return; if (screenOrientationCallback) { + mod["screenOrientationCallback"] = screenOrientationCallback; setTimeout(screenOrientationCallback, 0); } }); @@ -200,12 +193,17 @@ const Settings: Component = () => { return ( - - - - {t("Settings")} - + + + + + + {t("Settings")} + + } > @@ -272,17 +270,6 @@ const Settings: Component = () => { -
  • - Storage - - - - - - Clear cache... - - -
  • {t("This Application")} diff --git a/src/timelines/Home.tsx b/src/timelines/Home.tsx index 5b413ce..99e4fd1 100644 --- a/src/timelines/Home.tsx +++ b/src/timelines/Home.tsx @@ -31,7 +31,6 @@ import { createSingluarItemSelection, default as ItemSelectionProvider, } from "./toots/ItemSelectionProvider"; -import AppTopBar from "~material/AppTopBar"; const Home: ParentComponent = (props) => { let panelList: HTMLDivElement; @@ -166,34 +165,40 @@ 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 + + + + + + + } >