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
d0b02466
Commit
d0b02466
authored
Mar 11, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add friendPrivateID
parent
165026cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
src/ui/Match/CustomRoomContent/index.tsx
src/ui/Match/CustomRoomContent/index.tsx
+11
-1
No files found.
src/ui/Match/CustomRoomContent/index.tsx
View file @
d0b02466
...
...
@@ -13,6 +13,7 @@ import styles from "./index.module.scss";
interface
CustomRoomProps
{
options
:
Options
;
isPrivate
:
boolean
;
friendPrivateID
?:
number
;
}
const
defaultProps
:
CustomRoomProps
=
{
...
...
@@ -25,7 +26,7 @@ export const mcCustomRoomStore = proxy<CustomRoomProps>(defaultProps);
export
const
CustomRoomContent
:
React
.
FC
=
()
=>
{
const
{
message
}
=
App
.
useApp
();
const
user
=
useSnapshot
(
accountStore
).
user
;
const
{
options
}
=
useSnapshot
(
mcCustomRoomStore
);
const
{
options
,
friendPrivateID
}
=
useSnapshot
(
mcCustomRoomStore
);
const
privateRoomID
=
getPrivateRoomID
(
user
?.
external_id
??
0
);
useEffect
(()
=>
{
...
...
@@ -75,6 +76,9 @@ export const CustomRoomContent: React.FC = () => {
const
onChangeAutoDeath
:
CheckboxProps
[
"
onChange
"
]
=
(
e
)
=>
{
mcCustomRoomStore
.
options
.
auto_death
=
e
.
target
.
checked
;
};
const
onChangePrivateID
=
(
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
{
mcCustomRoomStore
.
friendPrivateID
=
Number
(
event
.
target
.
value
);
};
return
(
<
div
className=
{
styles
.
container
}
>
...
...
@@ -181,6 +185,12 @@ export const CustomRoomContent: React.FC = () => {
>
40分自动加时
</
Checkbox
>
<
Input
value=
{
friendPrivateID
}
onChange=
{
onChangePrivateID
}
placeholder=
"在这输入你朋友的私密房间密码"
type=
"number"
/>
</
div
>
);
};
...
...
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