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
@@ -12,6 +12,7 @@ import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from '@/c
|
||||
import GameCover from './GameCover.jsx';
|
||||
import FitText from './FitText.jsx';
|
||||
import GameSearch from './GameSearch.jsx';
|
||||
import usePointsCheck from '../hooks/usePointsCheck.js';
|
||||
import useStartImport from '../hooks/useStartImport.js';
|
||||
import {GAME_STATUSES, MAX_PLATFORM_LENGTH} from '../utils/limits.js';
|
||||
import {addGame, hoursToMinutes} from '../utils/manualGames.js';
|
||||
@@ -91,6 +92,7 @@ function AddForm({hit, favorite, onBack, navigate}) {
|
||||
const [status, setStatus] = useState('BACKLOG');
|
||||
const [hours, setHours] = useState('');
|
||||
const [busy, setBusy] = useState(false);
|
||||
const check = usePointsCheck();
|
||||
|
||||
const submit = async (e) => {
|
||||
e.preventDefault();
|
||||
@@ -110,6 +112,7 @@ function AddForm({hit, favorite, onBack, navigate}) {
|
||||
}
|
||||
const {appid} = await response.json();
|
||||
toast.success(t('MANUAL_GAME.ADDED', {name: hit.name}));
|
||||
check(appid, {status, tell: true});
|
||||
navigate(`/library/${appid}`);
|
||||
} catch (err) {
|
||||
console.error('add game error:', err);
|
||||
|
||||
Reference in new issue
Block a user