Compare commits

...

3 Commits

4 changed files with 48 additions and 17 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
# 忽略UserDataDir文件夹 # 忽略UserDataDir文件夹
UserDataDir UserDataDir
.vscode/settings.json .vscode

View File

@ -41,7 +41,7 @@
"mapstock": { "mapstock": {
"tab": { "tab": {
"index": 2, "index": 2,
"label": "🗺存入Stock", "label": "存入Stock",
"description": "保存 99km Stocks 到账户" "description": "保存 99km Stocks 到账户"
}, },
"endpoint": "/mapstock", "endpoint": "/mapstock",
@ -55,13 +55,18 @@
"required": true "required": true
} }
], ],
"confirmBeforeSubmit": true "confirmBeforeSubmit": true,
"confirmCount": 2,
"confirmMessages": [
"警告(1/2)\n\n这将修改ID={music.musicId}账号内的数据",
"警告(2/2)\n\n您是否确认修改这些数据?"
]
}, },
"map": { "map": {
"tab": { "tab": {
"index": 3, "index": 3,
"label": "🗺️领取宝物", "label": "🏃‍➡️一键跑图",
"description": "## 地图宝物领取\n\n可以领取的地图列表:\n- 新手教程(ID: 10001)\n- 樱之林(ID: 10002)\n- 海底遗迹(ID: 10003)\n\n输入地图ID和用户ID即可一键领取该地图所有宝物。" "description": "## 一键完成区域\n\n可以领取的地图列表:\n-\n\n输入地图ID和用户ID即可一键领取该区域所有收藏品。"
}, },
"endpoint": "/map", "endpoint": "/map",
"method": "GET", "method": "GET",
@ -81,7 +86,13 @@
"placeholder": "10001" "placeholder": "10001"
} }
], ],
"confirmBeforeSubmit": true "confirmBeforeSubmit": true,
"confirmCount": 3,
"confirmMessages": [
"警告(1/3)\n\n这将永久修改ID={music.musicId}账号内的数据",
"警告(2/3)\n\n即将修改的数据:\n地图ID: {mapid}\n\n原始请求:\n{rawData}",
"警告(3/3)\n\n您是否确认修改这些数据?"
]
}, },
"unlock": { "unlock": {
"tab": { "tab": {
@ -100,7 +111,12 @@
"required": true "required": true
} }
], ],
"confirmBeforeSubmit": true "confirmBeforeSubmit": true,
"confirmCount": 2,
"confirmMessages": [
"警告(1/2)\n\n这将永久修改ID={music.musicId}账号内的数据",
"警告(2/2)\n\n您是否确认修改这些数据?"
]
}, },
"bonus": { "bonus": {
"tab": { "tab": {
@ -205,7 +221,12 @@
} }
], ],
"confirmBeforeSubmit": true, "confirmBeforeSubmit": true,
"confirmTemplate": "即将发送的数据:\nUserID: {userId}\n歌曲ID: {music.musicId}\nachievement: {music.achievement}\n难度: {music.level}\nFC状态: {music.comboStatus}\nsyncStatus: {music.syncStatus}\nFS状态:{music.syncStatus}\n\n原始请求:\n{rawData}" "confirmCount": 3,
"confirmMessages": [
"警告(1/3)\n\n这将永久修改ID={music.musicId}账号内的数据",
"警告(2/3)\n\n即将修改的数据:\nUserID: {userId}\n歌曲ID: {music.musicId}\n分数: {music.achievement}\n难度: {music.level}\nFC状态: {music.comboStatus}\nFS状态:{music.syncStatus}\n\n原始请求:\n{rawData}",
"警告(3/3)\n\n您是否确认修改这些数据?"
]
} }
} }
} }

BIN
image/og.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -13,7 +13,9 @@
<!-- OpenGraph 标签 --> <!-- OpenGraph 标签 -->
<meta property="og:title" content="TsumugiBoshi|纺星"> <meta property="og:title" content="TsumugiBoshi|纺星">
<meta property="og:description" content="神秘API调试工具"> <meta property="og:description" content="神秘API调试工具">
<meta property="og:image" content="image/og-image.png"> <meta property="og:image" content="https://s2.loli.net/2025/01/29/1KPvmysVrAdLW3C.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://s2.loli.net/2025/01/29/1KPvmysVrAdLW3C.png" />
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<title>TsumugiBoshi|纺星</title> <title>TsumugiBoshi|纺星</title>
@ -334,14 +336,22 @@
const handleSubmit = async () => { const handleSubmit = async () => {
if (formConfig.confirmBeforeSubmit) { if (formConfig.confirmBeforeSubmit) {
let confirmMessage = formConfig.confirmTemplate || "确认提交数据?"; const confirmCount = formConfig.confirmCount || 1;
if (formConfig.confirmTemplate) { const messages = formConfig.confirmMessages || Array(confirmCount).fill("确认提交数据?");
confirmMessage = confirmMessage.replace(/\{([^}]+)\}/g, (_, key) => {
return key === 'rawData' ? JSON.stringify(formData, null, 2) : for (let i = 0; i < confirmCount; i++) {
key.split('.').reduce((obj, k) => obj && obj[k], formData) || ''; let confirmMessage = messages[i] || "确认提交数据?";
}); if (confirmMessage) {
confirmMessage = confirmMessage.replace(/\{([^}]+)\}/g, (_, key) => {
return key === 'rawData' ? JSON.stringify(formData, null, 2) :
key.split('.').reduce((obj, k) => obj && obj[k], formData) || '';
});
}
if (!confirm(confirmMessage)) {
return;
}
} }
if (!confirm(confirmMessage)) return;
} }
onSubmit(formData); onSubmit(formData);
}; };
@ -705,7 +715,7 @@
{/* 移动后端选择器到底部 */} {/* 移动后端选择器到底部 */}
<Paper elevation={3} className="backend-selector"> <Paper elevation={3} className="backend-selector">
<Typography variant="h6" gutterBottom> <Typography variant="h6" gutterBottom>
后端设置 ⚙️ 后端设置
</Typography> </Typography>
<FormControl fullWidth> <FormControl fullWidth>
<InputLabel>选择后端地址</InputLabel> <InputLabel>选择后端地址</InputLabel>