useSignedInProfiles: removed
- use useSessions() instead
This commit is contained in:
parent
832a59031a
commit
dde0c249f4
3 changed files with 8 additions and 37 deletions
|
@ -31,12 +31,10 @@ import {
|
|||
import { A, 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 { format } from "date-fns";
|
||||
import { useStore } from "@nanostores/solid";
|
||||
import { $settings } from "./stores.js";
|
||||
import { useRegisterSW } from "virtual:pwa-register/solid";
|
||||
import {
|
||||
autoMatchLangTag,
|
||||
autoMatchRegion,
|
||||
|
@ -46,6 +44,7 @@ import {
|
|||
import { type Template } from "@solid-primitives/i18n";
|
||||
import BottomSheet from "../material/BottomSheet.jsx";
|
||||
import { useServiceWorker } from "../platform/host.js";
|
||||
import { useSessions } from "../masto/clients.js";
|
||||
|
||||
type Strings = {
|
||||
["lang.auto"]: Template<{ detected: string }>;
|
||||
|
@ -64,7 +63,7 @@ const Settings: ParentComponent = (props) => {
|
|||
const { needRefresh, offlineReady } = useServiceWorker();
|
||||
const dateFnLocale = useDateFnLocale();
|
||||
|
||||
const [profiles] = useSignedInProfiles();
|
||||
const profiles = useSessions();
|
||||
|
||||
const doSignOut = (acct: Account) => {
|
||||
signOut((a) => a.site === acct.site && a.accessToken === acct.accessToken);
|
||||
|
@ -118,9 +117,9 @@ const Settings: ParentComponent = (props) => {
|
|||
<Divider />
|
||||
</ul>
|
||||
<For each={profiles()}>
|
||||
{({ account: acct, inf }) => (
|
||||
<ul data-site={acct.site} data-username={inf?.username}>
|
||||
<ListSubheader>{`@${inf?.username ?? "..."}@${new URL(acct.site).host}`}</ListSubheader>
|
||||
{({ account: acct }) => (
|
||||
<ul data-site={acct.site} data-username={acct.inf?.username}>
|
||||
<ListSubheader>{`@${acct.inf?.username ?? "..."}@${new URL(acct.site).host}`}</ListSubheader>
|
||||
<ListItemButton disabled>
|
||||
<ListItemText>{t("Notifications")}</ListItemText>
|
||||
<ListItemSecondaryAction>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue