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
bcfa471d
Commit
bcfa471d
authored
May 21, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/url' into 'main'
fix url with See merge request
mycard/Neos!203
parents
eb513dfd
5c792ba1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
src/ui/Login.tsx
src/ui/Login.tsx
+3
-1
src/ui/Mora.tsx
src/ui/Mora.tsx
+1
-1
src/ui/WaitRoom.tsx
src/ui/WaitRoom.tsx
+1
-1
No files found.
src/ui/Login.tsx
View file @
bcfa471d
...
@@ -38,7 +38,9 @@ export default function Login() {
...
@@ -38,7 +38,9 @@ export default function Login() {
setIp
(
event
.
target
.
value
);
setIp
(
event
.
target
.
value
);
};
};
const
handleSubmit
=
()
=>
navigate
(
`/room/
${
player
}
/
${
passWd
}
/
${
ip
}
`
);
// 因为萌卡服务器的房间密码会有`#`等特殊字符,因此这里用`encodeURIComponent`做下转义
const
handleSubmit
=
()
=>
navigate
(
`/room/
${
player
}
/
${
encodeURIComponent
(
passWd
)}
/
${
ip
}
`
);
useEffect
(()
=>
{
useEffect
(()
=>
{
// 如果开启了AI模式,直接进入房间
// 如果开启了AI模式,直接进入房间
...
...
src/ui/Mora.tsx
View file @
bcfa471d
...
@@ -44,7 +44,7 @@ const Mora = () => {
...
@@ -44,7 +44,7 @@ const Mora = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
// 若对局已经开始,自动跳转
// 若对局已经开始,自动跳转
if
(
meLife
>
0
)
{
if
(
meLife
>
0
)
{
navigate
(
`/duel/
${
player
}
/
${
passWd
}
/
${
ip
}
`
);
navigate
(
`/duel/
${
player
}
/
${
encodeURIComponent
(
passWd
??
""
)
}
/${ip}`
)
;
}
}
},
[
meLife
]);
},
[
meLife
]);
...
...
src/ui/WaitRoom.tsx
View file @
bcfa471d
...
@@ -194,7 +194,7 @@ const WaitRoom = () => {
...
@@ -194,7 +194,7 @@ const WaitRoom = () => {
// 若当前玩家是房主并且对战双方都已准备完毕,跳转到猜拳页面;
// 若当前玩家是房主并且对战双方都已准备完毕,跳转到猜拳页面;
// 否则停留在当前页面。
// 否则停留在当前页面。
if
(
duelStart
)
{
if
(
duelStart
)
{
navigate
(
`/mora/
${
player
}
/
${
passWd
}
/
${
ip
}
`
);
navigate
(
`/mora/
${
player
}
/
${
encodeURIComponent
(
passWd
??
""
)
}
/${ip}`
)
;
}
}
},
[
duelStart
]);
},
[
duelStart
]);
...
...
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