add: toast achievement & message

This commit is contained in:
Vick Scarlet
2026-08-16 20:06:16 +08:00
committed by 神戸小鳥
parent 31ea679a17
commit 1e87b8fb34
19 changed files with 329 additions and 25 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ import { achievements, events, talents } from '@remake/data'
import { properties } from '@/display'
import { AutoInterval } from '@/config'
import { format } from '@remake/vitex'
import { toastAchvs } from '@/toast/Achv'
import './Play.css'
function LogTalent({ id }: { id: number }) {
@@ -153,13 +154,13 @@ export function Play() {
const handleNext = useCallback(() => {
if (ended) return
const achievements = next()
// TODO: Show achievements
toastAchvs(achievements)
console.debug('Achievements:', achievements)
}, [ended, next])
const handleGotoSummary = useCallback(() => {
if (!ended) return
const achievements = gotoSummary()
// TODO: Show achievements
toastAchvs(achievements)
console.debug('Achievements:', achievements)
}, [ended, gotoSummary])
useLayoutEffect(() => {