Commit b37889a4 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'fix/super-pre-release' into 'main'

修复超先行服功能

See merge request mycard/Neos!339
parents 53342352 c0a43842
Pipeline #25507 passed with stages
in 18 minutes and 49 seconds
...@@ -13,9 +13,6 @@ import { connectSrvpro } from "./util"; ...@@ -13,9 +13,6 @@ import { connectSrvpro } from "./util";
const NeosConfig = useConfig(); const NeosConfig = useConfig();
const serverConfig = NeosConfig.servers; const serverConfig = NeosConfig.servers;
const KOISHI = "koishi";
const PRERELEASE = "pre-release";
const { const {
defaults: { defaultPlayer, defaultPassword }, defaults: { defaultPlayer, defaultPassword },
automation: { isAiMode }, automation: { isAiMode },
...@@ -31,6 +28,7 @@ const defaultProps: Props = { ...@@ -31,6 +28,7 @@ const defaultProps: Props = {
export const matchStore = proxy<Props>(defaultProps); export const matchStore = proxy<Props>(defaultProps);
// TODO: support MC server
export const MatchModal: React.FC = ({}) => { export const MatchModal: React.FC = ({}) => {
const { message } = App.useApp(); const { message } = App.useApp();
const { open } = useSnapshot(matchStore); const { open } = useSnapshot(matchStore);
...@@ -46,18 +44,7 @@ export const MatchModal: React.FC = ({}) => { ...@@ -46,18 +44,7 @@ export const MatchModal: React.FC = ({}) => {
setPlayer(event.target.value); setPlayer(event.target.value);
}; };
let handleServerChange = (value: any) => { let handleServerChange = (value: any) => {
switch (value) { setServerId(value);
case KOISHI: {
setServerId(0);
break;
}
case PRERELEASE: {
setServerId(2);
break;
}
default:
break;
}
}; };
let handlePasswdChange = (event: ChangeEvent<HTMLInputElement>) => { let handlePasswdChange = (event: ChangeEvent<HTMLInputElement>) => {
setPasswd(event.target.value); setPasswd(event.target.value);
...@@ -112,14 +99,14 @@ export const MatchModal: React.FC = ({}) => { ...@@ -112,14 +99,14 @@ export const MatchModal: React.FC = ({}) => {
<Select <Select
className={styles.select} className={styles.select}
title="服务器" title="服务器"
value={KOISHI} value={serverId}
options={[ options={[
{ {
value: KOISHI, value: 0,
label: "Koishi服", label: "Koishi服",
}, },
{ {
value: PRERELEASE, value: 2,
label: "超先行服", label: "超先行服",
}, },
]} ]}
......
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