Commit 34d53f09 authored by Chunchi Che's avatar Chunchi Che

fix something

parent f80a8f42
Pipeline #23623 passed with stages
in 14 minutes and 7 seconds
......@@ -12,7 +12,11 @@ export async function initStrings() {
for (const line of lineIter) {
if (!line.startsWith("#") && line !== "") {
let [region, code, value] = line.split(" ", 3);
try {
localStorage.setItem(`${region}_${code}`, value);
} catch (error) {
alert(`set item in local storage error: ${error}`);
}
}
}
}
......
......@@ -52,7 +52,7 @@ export const Component: React.FC = () => {
if (matchInfo) {
await connectSrvpro({
ip: matchInfo.address + ":" + (matchInfo.port + 1),
ip: matchInfo.address + ":" + (matchInfo.port + 1), // 分配给Neos的Websocket端口是TCP端口+1
player: user.username,
passWd: matchInfo.password,
});
......@@ -69,7 +69,7 @@ export const Component: React.FC = () => {
// 初始化,然后等待后端通知成功加入房间后跳转页面
await connectSrvpro({
ip: server,
player: user?.name ?? "Guest",
player: user?.username ?? "Guest",
passWd: "AI",
});
};
......
......@@ -90,7 +90,7 @@ export const Component: React.FC = () => {
if (deck) {
setDeck(deck);
} else {
alert(`Deck ${deckName} not found`);
message.error(`Deck ${deckName} not found`);
}
}}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment