Public Access
feat(psn): replace PSN import button with sync review
Remove the PSN import tab; linking now starts a sync. Show the PSN review link, last played date and PSN expiry notes. PSN rows hide the hours field; unchecked titles you saw are dismissed, unseen ones stay open.
This commit is contained in:
1 parent
599b083591
commit
27c402fa34
30 files changed
+338
-286
No files matched your search
@@ -25,7 +25,9 @@ export default function ManualGameCard({game, onSaved}) {
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [confirmRemove, setConfirmRemove] = useState(false);
|
||||
|
||||
const playtimeMinutes = hoursToMinutes(hours);
|
||||
// PlayStation owns the playtime of its rows: Core ignores a value sent for one.
|
||||
const psn = game.source === 'PSN';
|
||||
const playtimeMinutes = psn ? game.playtimeMinutes : hoursToMinutes(hours);
|
||||
const dirty = platform.trim() !== (game.platform ?? '') || playtimeMinutes !== game.playtimeMinutes;
|
||||
useUnsavedChanges(dirty);
|
||||
|
||||
@@ -65,7 +67,7 @@ export default function ManualGameCard({game, onSaved}) {
|
||||
<Hand className="size-4 text-primary"/>
|
||||
{t('MANUAL_GAME.TITLE')}
|
||||
</h2>
|
||||
<p className="text-sm text-muted-foreground">{t('MANUAL_GAME.HINT')}</p>
|
||||
{!psn && <p className="text-sm text-muted-foreground">{t('MANUAL_GAME.HINT')}</p>}
|
||||
|
||||
<div className="grid gap-5 sm:grid-cols-2">
|
||||
<div className="space-y-2">
|
||||
@@ -73,11 +75,13 @@ export default function ManualGameCard({game, onSaved}) {
|
||||
<Input id="manual-platform" value={platform} maxLength={MAX_PLATFORM_LENGTH}
|
||||
onChange={(e) => setPlatform(e.target.value)}/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="manual-hours">{t('MANUAL_GAME.HOURS')}</Label>
|
||||
<Input id="manual-hours" type="number" min="0" step="0.5" inputMode="decimal" value={hours}
|
||||
onChange={(e) => setHours(e.target.value)}/>
|
||||
</div>
|
||||
{!psn && (
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="manual-hours">{t('MANUAL_GAME.HOURS')}</Label>
|
||||
<Input id="manual-hours" type="number" min="0" step="0.5" inputMode="decimal" value={hours}
|
||||
onChange={(e) => setHours(e.target.value)}/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap items-center justify-between gap-3">
|
||||
|
||||
Reference in new issue
Block a user