import { For, Show, type ParentComponent } from "solid-js"; import Scaffold from "../material/Scaffold.js"; import { AppBar, Divider, IconButton, List, ListItem, ListItemButton, ListItemSecondaryAction, ListItemText, ListSubheader, Switch, Toolbar, } from "@suid/material"; import { Close as CloseIcon, Refresh as RefreshIcon, } from "@suid/icons-material"; import { useNavigate } from "@solidjs/router"; import { Title } from "../material/typography.jsx"; import { css } from "solid-styled"; import { useSignedInProfiles } from "../masto/acct.js"; import { signOut, type Account } from "../accounts/stores.js"; import { intlFormat } from "date-fns"; import { useStore } from "@nanostores/solid"; import { $settings } from "./stores.js"; import { useRegisterSW } from "virtual:pwa-register/solid"; const Settings: ParentComponent = () => { const navigate = useNavigate(); const settings$ = useStore($settings); const { needRefresh: [needRefresh], } = useRegisterSW(); const [profiles] = useSignedInProfiles(); const doSignOut = (acct: Account) => { signOut((a) => a.site === acct.site && a.accessToken === acct.accessToken); }; css` ul { padding: 0; } .setting-list { padding-bottom: calc(var(--safe-area-inset-bottom, 0px) + 16px); } `; return ( Settings } >
    • Accounts All Notifications Sign in...
    {({ account: acct, inf }) => (
      {`@${inf?.username ?? "..."}@${new URL(acct.site).host}`} Notifications Sign out
    )}
  • Reading Fonts $settings.setKey( "prefetchTootsDisabled", !settings$().prefetchTootsDisabled, ) } > Prefetch Toots
  • This Application About Tutu {needRefresh() ? "An update is ready, restart the Tutu to apply" : "No updates"} window.location.reload()}>
  • ); }; export default Settings;