[+] mai2: support adding rival

This commit is contained in:
Clansty
2024-08-05 20:37:18 +08:00
parent 94ba1f0b09
commit 473f4a4295
14 changed files with 88 additions and 20 deletions

View File

@@ -99,6 +99,7 @@ export interface GenericGameSummary {
lastVersion: string
ratingComposition: { [key: string]: any }
recent: GenericGamePlaylog[]
rival?: boolean
}
export interface MusicMeta {

View File

@@ -24,6 +24,8 @@ export const EN_REF_USER = {
'UserHome.RankDetail.Title': 'Achievement Details',
'UserHome.RankDetail.Level': 'Level',
'UserHome.B50': 'B50',
'UserHome.AddRival': "Add to Rival",
'UserHome.RemoveRival': "Remove from Rival",
}
export const EN_REF_Welcome = {

View File

@@ -33,6 +33,8 @@ const zhUser: typeof EN_REF_USER = {
'UserHome.RankDetail.Title': '评分详细',
'UserHome.RankDetail.Level': "等级",
'UserHome.B50': "B50",
'UserHome.AddRival': "添加劲敌",
'UserHome.RemoveRival': "移除劲敌",
}
const zhWelcome: typeof EN_REF_Welcome = {

View File

@@ -305,6 +305,8 @@ export const GAME = {
post(`/api/v2/game/${game}/export`),
import: (game: GameName, data: any): Promise<Record<string, any>> =>
post(`/api/v2/game/${game}/import`, {}, { body: JSON.stringify(data) }),
setRival: (game: GameName, rivalUserName: string, isAdd: boolean) =>
post(`/api/v2/game/${game}/set-rival`, { rivalUserName, isAdd }),
}
export const DATA = {