// Ignored: apps and whole store accounts left out of the portfolio, the sidebar and store reads. Restore brings them // back (nothing on the stores changes either way). import { useContextMenu } from '../ui/ContextMenu'; import { appMenu } from '../ui/app-menu'; import { t } from '../i18n'; import { withIgnored, withSideIgnored } from '../lib/identity'; import { useNav } from '../nav'; import { useData } from '../store'; import { Icon, StoreGlyph } from '../ui/icons'; import { AppIcon, StoreOnlyTag, StudioMark } from '../ui/kit'; import { EmptyState, PageHeader, Section } from '../ui/ds'; import '../styles/folders.css'; export function Ignored() { const d = useData(); const nav = useNav(); const apps = d.apps.filter(a => a.ignored || a.ignoredStores.length > 0).sort((a, b) => a.name.localeCompare(b.name)); const accounts = d.accounts.filter(a => d.overrides.ignored.includes(`account:${a.id}`)); const restoreAll = () => d.updateOverrides(o => ({ ...o, ignored: [] })); const empty = !apps.length && !accounts.length; const cm = useContextMenu(); return (
: undefined} /> {empty ?
{t('ignored.emptyTitle')} {t('ignored.emptyText')}
: ( <>
{apps.length ? (
{apps.map(a => { const s = d.studios.find(x => x.id === a.studio) ?? null; return (
appMenu(a, d, nav, { showIgnored: true }), `app:${a.key}`)}>
{a.name}{!a.project && } {s?.name ?? t('studio.none')} {a.ios && {a.ios.app.bundleId}} {a.android && {a.android.app.id}}
{a.ignoredStores.map(k => )} {a.ignored && }
); })}
) :

{t('ignored.noApps')}

}
{accounts.length ? (
{accounts.map(a => (
[{ label: t('ignored.restore'), icon: 'eye', onSelect: () => { void d.updateOverrides(o => withIgnored(o, [`account:${a.id}`], false)); } }, { label: t('cm.openAccounts'), icon: 'key', onSelect: () => nav.go({ screen: 'accounts' }) }])}>
{a.label}{a.kind === 'play' ? t('acct.kindPlay') : t('acct.kindApple')} ยท {t('ignored.accountApps', { count: d.storeApps[a.id]?.value.apps.length ?? 0 })}
))}
) :

{t('ignored.noAccounts')}

}
)}

{t('ignored.howTo')}

); }