Home: use AppTopBar

This commit is contained in:
thislight 2024-12-27 22:36:35 +08:00
parent 8d04874bce
commit 59c7a5c588
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E

View file

@ -31,6 +31,7 @@ import {
createSingluarItemSelection, createSingluarItemSelection,
default as ItemSelectionProvider, default as ItemSelectionProvider,
} from "./toots/ItemSelectionProvider"; } from "./toots/ItemSelectionProvider";
import AppTopBar from "~material/AppTopBar";
const Home: ParentComponent = (props) => { const Home: ParentComponent = (props) => {
let panelList: HTMLDivElement; let panelList: HTMLDivElement;
@ -165,40 +166,34 @@ const Home: ParentComponent = (props) => {
<> <>
<Scaffold <Scaffold
topbar={ topbar={
<AppBar position="static"> <AppTopBar>
<Toolbar <Tabs>
variant="dense" <Tab focus={isTabFocus(0)} onClick={[onTabClick, 0]}>
class="responsive" Home
sx={{ paddingTop: "var(--safe-area-inset-top, 0px)" }} </Tab>
> <Tab focus={isTabFocus(1)} onClick={[onTabClick, 1]}>
<Tabs> Trending
<Tab focus={isTabFocus(0)} onClick={[onTabClick, 0]}> </Tab>
Home <Tab focus={isTabFocus(2)} onClick={[onTabClick, 2]}>
</Tab> Public
<Tab focus={isTabFocus(1)} onClick={[onTabClick, 1]}> </Tab>
Trending </Tabs>
</Tab> <ProfileMenuButton profile={profiles()[0]}>
<Tab focus={isTabFocus(2)} onClick={[onTabClick, 2]}> <MenuItem
Public onClick={(e) =>
</Tab> $settings.setKey(
</Tabs> "prefetchTootsDisabled",
<ProfileMenuButton profile={profiles()[0]}> !$settings.get().prefetchTootsDisabled,
<MenuItem )
onClick={(e) => }
$settings.setKey( >
"prefetchTootsDisabled", <ListItemText>Prefetch Toots</ListItemText>
!$settings.get().prefetchTootsDisabled, <ListItemSecondaryAction>
) <Switch checked={prefetching()}></Switch>
} </ListItemSecondaryAction>
> </MenuItem>
<ListItemText>Prefetch Toots</ListItemText> </ProfileMenuButton>
<ListItemSecondaryAction> </AppTopBar>
<Switch checked={prefetching()}></Switch>
</ListItemSecondaryAction>
</MenuItem>
</ProfileMenuButton>
</Toolbar>
</AppBar>
} }
> >
<ItemSelectionProvider value={selectionState}> <ItemSelectionProvider value={selectionState}>