Public Access
feat(library): set status and rating in one step (#56)
Library rows: the status badge is a menu that saves at once. Game page: status and rating in the top card, saved on click. Status changes and hiding a game show an Undo toast. Other game actions moved into a "..." menu; split and unlink ask first. New sorts: name, last played, time to beat; "last synced" is gone. Page numbers and 44 px touch targets on phones.
This commit is contained in:
1 parent
f9f0d94e2c
commit
45f5087227
32 files changed
+1091
-352
No files matched your search
@@ -7,6 +7,7 @@ import {toast} from 'sonner';
|
||||
import {Button} from '@/components/ui/button';
|
||||
import {Card} from '@/components/ui/card';
|
||||
import GameStatusBadge from './GameStatusBadge.jsx';
|
||||
import UnlinkDialog from './UnlinkDialog.jsx';
|
||||
import FitText from './FitText.jsx';
|
||||
import {splitGame, unlinkGame} from '../utils/links.js';
|
||||
import {platformLabel} from '../utils/platforms.js';
|
||||
@@ -65,16 +66,14 @@ export default function EditionsCard({game, auditor, onRequest, onChanged}) {
|
||||
<Layers/>{t(auditor ? 'LINKS.LINK_WITH' : 'LINKS.SAME_AS')}
|
||||
</Button>
|
||||
{game.editions?.length > 0 && (
|
||||
<Button type="button" variant="outline" size="sm" disabled={busy}
|
||||
onClick={() => run(splitGame, 'LINKS.SPLIT_DONE')}>
|
||||
<Unlink/>{t('LINKS.SPLIT')}
|
||||
</Button>
|
||||
<UnlinkDialog size="sm" icon={Unlink} label={t('LINKS.SPLIT')} title={t('LINKS.SPLIT_CONFIRM_TITLE')}
|
||||
description={t('LINKS.SPLIT_CONFIRM_TEXT')} confirmLabel={t('LINKS.SPLIT')} disabled={busy}
|
||||
onConfirm={() => run(splitGame, 'LINKS.SPLIT_DONE')}/>
|
||||
)}
|
||||
{auditor && game.linked && (
|
||||
<Button type="button" variant="outline" size="sm" disabled={busy}
|
||||
onClick={() => run(unlinkGame, 'LINKS.UNLINKED')}>
|
||||
<Link2Off/>{t('LINKS.UNLINK')}
|
||||
</Button>
|
||||
<UnlinkDialog size="sm" icon={Link2Off} label={t('LINKS.UNLINK')} title={t('LINKS.UNLINK_CONFIRM_TITLE')}
|
||||
description={t('LINKS.UNLINK_CONFIRM_TEXT')} confirmLabel={t('LINKS.UNLINK')} disabled={busy}
|
||||
onConfirm={() => run(unlinkGame, 'LINKS.UNLINKED')}/>
|
||||
)}
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in new issue
Block a user