[+] Import player data, tested with maimai

This commit is contained in:
Clansty
2024-08-01 08:41:11 +08:00
parent 7c4f887ef4
commit a71c2bd8ec
5 changed files with 177 additions and 0 deletions

View File

@@ -82,6 +82,8 @@ export const EN_REF_HOME = {
'home.join-discord-description': 'Join our Discord server to chat with other players and get help.',
'home.setup': 'Setup Connection',
'home.setup-description': 'If you own a cab or arcade setup, begin setting up the connection.',
'home.import': 'Import Player Data',
'home.import-description': 'If you are from another server, you can import your data here.',
'home.linkcard.cards': 'Your Cards',
'home.linkcard.description': 'Here are the cards you have linked to your account',
'home.linkcard.account-card': 'Account Card',
@@ -109,6 +111,9 @@ export const EN_REF_HOME = {
'home.setup.ask': 'If you have any questions, please ask in our',
'home.setup.support': 'server',
'home.setup.keychip-tips': 'This is your unique keychip, do not share it with anyone',
'home.import.unknown-game': 'Unknown game type',
'home.import.new-data': 'Data to import',
'home.import.data-conflict': 'Proceed will override your current data',
}
export const EN_REF_SETTINGS = {

View File

@@ -91,6 +91,8 @@ const zhHome: typeof EN_REF_HOME = {
'home.join-discord-description': '加入我们的 Discord 群,与其他玩家聊天、获取帮助',
'home.setup': '连接到 AquaDX',
'home.setup-description': '如果您有街机框体或者手台,点击这里设置服务器的连接',
'home.import': '导入玩家数据',
'home.import-description': '如果你来自其他在线服,可以点击这里导入从其他服务器导出的数据',
'home.linkcard.cards': "已绑卡片",
'home.linkcard.description': "这些是您绑定到帐户的卡",
'home.linkcard.account-card': "账户卡",
@@ -118,6 +120,9 @@ const zhHome: typeof EN_REF_HOME = {
'home.setup.ask': "如果您有任何问题, 请加入我们的",
'home.setup.support': "以获取支持",
'home.setup.keychip-tips': "这是你的狗号, 不要与任何人分享",
'home.import.unknown-game': '未知游戏类型',
'home.import.new-data': '要导入的数据',
'home.import.data-conflict': '继续导入将覆盖现有数据',
}
const zhSettings: typeof EN_REF_SETTINGS = {

View File

@@ -303,6 +303,8 @@ export const GAME = {
post(`/api/v2/game/${game}/change-name`, { newName }),
export: (game: GameName): Promise<Record<string, any>> =>
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) }),
}
export const DATA = {