Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
love_飞影
Neos
Commits
c0a43842
Commit
c0a43842
authored
Feb 22, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix match modal
parent
53342352
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
18 deletions
+5
-18
src/ui/Match/MatchModal.tsx
src/ui/Match/MatchModal.tsx
+5
-18
No files found.
src/ui/Match/MatchModal.tsx
View file @
c0a43842
...
...
@@ -13,9 +13,6 @@ import { connectSrvpro } from "./util";
const
NeosConfig
=
useConfig
();
const
serverConfig
=
NeosConfig
.
servers
;
const
KOISHI
=
"
koishi
"
;
const
PRERELEASE
=
"
pre-release
"
;
const
{
defaults
:
{
defaultPlayer
,
defaultPassword
},
automation
:
{
isAiMode
},
...
...
@@ -31,6 +28,7 @@ const defaultProps: Props = {
export
const
matchStore
=
proxy
<
Props
>
(
defaultProps
);
// TODO: support MC server
export
const
MatchModal
:
React
.
FC
=
({})
=>
{
const
{
message
}
=
App
.
useApp
();
const
{
open
}
=
useSnapshot
(
matchStore
);
...
...
@@ -46,18 +44,7 @@ export const MatchModal: React.FC = ({}) => {
setPlayer
(
event
.
target
.
value
);
};
let
handleServerChange
=
(
value
:
any
)
=>
{
switch
(
value
)
{
case
KOISHI
:
{
setServerId
(
0
);
break
;
}
case
PRERELEASE
:
{
setServerId
(
2
);
break
;
}
default
:
break
;
}
setServerId
(
value
);
};
let
handlePasswdChange
=
(
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
{
setPasswd
(
event
.
target
.
value
);
...
...
@@ -112,14 +99,14 @@ export const MatchModal: React.FC = ({}) => {
<
Select
className=
{
styles
.
select
}
title=
"服务器"
value=
{
KOISHI
}
value=
{
serverId
}
options=
{
[
{
value
:
KOISHI
,
value
:
0
,
label
:
"
Koishi服
"
,
},
{
value
:
PRERELEASE
,
value
:
2
,
label
:
"
超先行服
"
,
},
]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment