Public Access
feat(points): show points result on every status save
Core now settles on GET /api/rewards/games/{appid}. The Frontend
shows a toast, refreshes the header balance, and lists the paid
rows and reasons on the game page. Deploy Core first.
This commit is contained in:
1 parent
9adc606c57
commit
814decc781
20 files changed
+429
-12
No files matched your search
@@ -11,6 +11,7 @@ import {Skeleton} from '@/components/ui/skeleton';
|
||||
import GameCover from '../components/GameCover.jsx';
|
||||
import FitText from '../components/FitText.jsx';
|
||||
import PageContainer from '../components/PageContainer.jsx';
|
||||
import usePointsCheck from '../hooks/usePointsCheck.js';
|
||||
import {saveGameStatus} from '../utils/backlog.js';
|
||||
import {formatDate} from '../utils/format.js';
|
||||
import {formatPlaytime} from '../utils/games.js';
|
||||
@@ -281,6 +282,7 @@ function PickCard({game}) {
|
||||
const {t, i18n} = useTranslation();
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [started, setStarted] = useState(false);
|
||||
const check = usePointsCheck();
|
||||
const reason = reasonText(game.reason, t, i18n.language);
|
||||
|
||||
const startPlaying = async () => {
|
||||
@@ -294,6 +296,7 @@ function PickCard({game}) {
|
||||
}
|
||||
setStarted(true);
|
||||
toast.success(t('BACKLOG.SAVED'));
|
||||
check(game.appid, {status: 'PLAYING', tell: true});
|
||||
} catch (err) {
|
||||
console.error('Start playing error:', err);
|
||||
toast.error(t('INFO.ERROR.NETWORK_FAILURE'));
|
||||
|
||||
Reference in new issue
Block a user