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
Biluo Shen
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";
...
@@ -13,6 +13,7 @@ import styles from "./index.module.scss";
interface
CustomRoomProps
{
interface
CustomRoomProps
{
options
:
Options
;
options
:
Options
;
isPrivate
:
boolean
;
isPrivate
:
boolean
;
friendPrivateID
?:
number
;
}
}
const
defaultProps
:
CustomRoomProps
=
{
const
defaultProps
:
CustomRoomProps
=
{
...
@@ -25,7 +26,7 @@ export const mcCustomRoomStore = proxy<CustomRoomProps>(defaultProps);
...
@@ -25,7 +26,7 @@ export const mcCustomRoomStore = proxy<CustomRoomProps>(defaultProps);
export
const
CustomRoomContent
:
React
.
FC
=
()
=>
{
export
const
CustomRoomContent
:
React
.
FC
=
()
=>
{
const
{
message
}
=
App
.
useApp
();
const
{
message
}
=
App
.
useApp
();
const
user
=
useSnapshot
(
accountStore
).
user
;
const
user
=
useSnapshot
(
accountStore
).
user
;
const
{
options
}
=
useSnapshot
(
mcCustomRoomStore
);
const
{
options
,
friendPrivateID
}
=
useSnapshot
(
mcCustomRoomStore
);
const
privateRoomID
=
getPrivateRoomID
(
user
?.
external_id
??
0
);
const
privateRoomID
=
getPrivateRoomID
(
user
?.
external_id
??
0
);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -75,6 +76,9 @@ export const CustomRoomContent: React.FC = () => {
...
@@ -75,6 +76,9 @@ export const CustomRoomContent: React.FC = () => {
const
onChangeAutoDeath
:
CheckboxProps
[
"
onChange
"
]
=
(
e
)
=>
{
const
onChangeAutoDeath
:
CheckboxProps
[
"
onChange
"
]
=
(
e
)
=>
{
mcCustomRoomStore
.
options
.
auto_death
=
e
.
target
.
checked
;
mcCustomRoomStore
.
options
.
auto_death
=
e
.
target
.
checked
;
};
};
const
onChangePrivateID
=
(
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
{
mcCustomRoomStore
.
friendPrivateID
=
Number
(
event
.
target
.
value
);
};
return
(
return
(
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
.
container
}
>
...
@@ -181,6 +185,12 @@ export const CustomRoomContent: React.FC = () => {
...
@@ -181,6 +185,12 @@ export const CustomRoomContent: React.FC = () => {
>
>
40分自动加时
40分自动加时
</
Checkbox
>
</
Checkbox
>
<
Input
value=
{
friendPrivateID
}
onChange=
{
onChangePrivateID
}
placeholder=
"在这输入你朋友的私密房间密码"
type=
"number"
/>
</
div
>
</
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