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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
MyCard
Neos
Commits
4669c900
Commit
4669c900
authored
Aug 17, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize small
parent
f100852d
Pipeline
#23177
passed with stages
in 10 minutes and 55 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
src/ui/Match/MatchModal.tsx
src/ui/Match/MatchModal.tsx
+3
-2
src/ui/Match/index.tsx
src/ui/Match/index.tsx
+5
-4
src/ui/Side/index.tsx
src/ui/Side/index.tsx
+2
-2
No files found.
src/ui/Match/MatchModal.tsx
View file @
4669c900
import
{
Button
,
Input
,
Modal
}
from
"
antd
"
;
import
{
App
,
Button
,
Input
,
Modal
}
from
"
antd
"
;
import
React
,
{
ChangeEvent
,
useEffect
,
useState
}
from
"
react
"
;
import
React
,
{
ChangeEvent
,
useEffect
,
useState
}
from
"
react
"
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
proxy
,
useSnapshot
}
from
"
valtio
"
;
import
{
proxy
,
useSnapshot
}
from
"
valtio
"
;
...
@@ -27,6 +27,7 @@ const defaultProps: Props = {
...
@@ -27,6 +27,7 @@ const defaultProps: Props = {
export
const
matchStore
=
proxy
<
Props
>
(
defaultProps
);
export
const
matchStore
=
proxy
<
Props
>
(
defaultProps
);
export
const
MatchModal
:
React
.
FC
=
({})
=>
{
export
const
MatchModal
:
React
.
FC
=
({})
=>
{
const
{
message
}
=
App
.
useApp
();
const
{
open
}
=
useSnapshot
(
matchStore
);
const
{
open
}
=
useSnapshot
(
matchStore
);
const
{
user
}
=
useSnapshot
(
accountStore
);
const
{
user
}
=
useSnapshot
(
accountStore
);
const
{
joined
,
errorMsg
}
=
useSnapshot
(
roomStore
);
const
{
joined
,
errorMsg
}
=
useSnapshot
(
roomStore
);
...
@@ -70,7 +71,7 @@ export const MatchModal: React.FC = ({}) => {
...
@@ -70,7 +71,7 @@ export const MatchModal: React.FC = ({}) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
// 出现错误
// 出现错误
if
(
errorMsg
!==
undefined
&&
errorMsg
!==
""
)
{
if
(
errorMsg
!==
undefined
&&
errorMsg
!==
""
)
{
alert
(
errorMsg
);
message
.
error
(
errorMsg
);
setConfirmLoading
(
false
);
setConfirmLoading
(
false
);
roomStore
.
errorMsg
=
undefined
;
roomStore
.
errorMsg
=
undefined
;
}
}
...
...
src/ui/Match/index.tsx
View file @
4669c900
...
@@ -4,7 +4,7 @@ import {
...
@@ -4,7 +4,7 @@ import {
PlayCircleOutlined
,
PlayCircleOutlined
,
SettingFilled
,
SettingFilled
,
}
from
"
@ant-design/icons
"
;
}
from
"
@ant-design/icons
"
;
import
{
Button
,
Space
}
from
"
antd
"
;
import
{
App
,
Button
,
Space
}
from
"
antd
"
;
import
{
useEffect
,
useState
}
from
"
react
"
;
import
{
useEffect
,
useState
}
from
"
react
"
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
import
{
useSnapshot
}
from
"
valtio
"
;
...
@@ -22,6 +22,7 @@ import { connectSrvpro } from "./util";
...
@@ -22,6 +22,7 @@ import { connectSrvpro } from "./util";
const
NeosConfig
=
useConfig
();
const
NeosConfig
=
useConfig
();
export
const
Component
:
React
.
FC
=
()
=>
{
export
const
Component
:
React
.
FC
=
()
=>
{
const
{
message
}
=
App
.
useApp
();
const
serverList
=
NeosConfig
.
servers
;
const
serverList
=
NeosConfig
.
servers
;
const
[
server
,
setServer
]
=
useState
(
const
[
server
,
setServer
]
=
useState
(
`
${
serverList
[
0
].
ip
}
:
${
serverList
[
0
].
port
}
`
,
`
${
serverList
[
0
].
ip
}
:
${
serverList
[
0
].
port
}
`
,
...
@@ -73,7 +74,7 @@ export const Component: React.FC = () => {
...
@@ -73,7 +74,7 @@ export const Component: React.FC = () => {
if
(
item
)
{
if
(
item
)
{
setDeck
(
item
);
setDeck
(
item
);
}
else
{
}
else
{
alert
(
`Deck ${value} not found`
);
message
.
error
(
`Deck ${value} not found`
);
}
}
}
}
}
}
options=
{
decks
.
map
((
deck
)
=>
({
options=
{
decks
.
map
((
deck
)
=>
({
...
@@ -94,7 +95,7 @@ export const Component: React.FC = () => {
...
@@ -94,7 +95,7 @@ export const Component: React.FC = () => {
title=
"竞技匹配"
title=
"竞技匹配"
desc=
"与天梯其他数万名玩家激战,追求胜利登顶最强。每月最后一天晚上10点结算成绩,获取奖励与公布排名。"
desc=
"与天梯其他数万名玩家激战,追求胜利登顶最强。每月最后一天晚上10点结算成绩,获取奖励与公布排名。"
icon=
{
<
IconFont
type=
"icon-battle"
size=
{
32
}
/>
}
icon=
{
<
IconFont
type=
"icon-battle"
size=
{
32
}
/>
}
onClick=
{
()
=>
alert
(
"
开发中,敬请期待
"
)
}
onClick=
{
()
=>
message
.
error
(
"
开发中,敬请期待
"
)
}
/>
/>
<
Mode
<
Mode
title=
"娱乐匹配"
title=
"娱乐匹配"
...
@@ -165,7 +166,7 @@ export const Component: React.FC = () => {
...
@@ -165,7 +166,7 @@ export const Component: React.FC = () => {
title=
"观战列表"
title=
"观战列表"
desc=
"观看MyCard上正在进行的决斗"
desc=
"观看MyCard上正在进行的决斗"
icon=
{
<
PlayCircleOutlined
/>
}
icon=
{
<
PlayCircleOutlined
/>
}
onClick=
{
()
=>
alert
(
"
开发中,敬请期待
"
)
}
onClick=
{
()
=>
message
.
error
(
"
开发中,敬请期待
"
)
}
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/ui/Side/index.tsx
View file @
4669c900
...
@@ -24,8 +24,8 @@ export const Component: React.FC = () => {
...
@@ -24,8 +24,8 @@ export const Component: React.FC = () => {
<
Background
/>
<
Background
/>
<
DeckEditor
<
DeckEditor
deck=
{
deck
}
deck=
{
deck
}
onClear=
{
()
=>
message
.
info
(
"
对局中清空卡组不怕找不回来吗?!
"
)
}
onClear=
{
()
=>
message
.
error
(
"
对局中清空卡组不怕找不回来吗?!
"
)
}
onSave=
{
()
=>
message
.
info
(
"
点击右下角按钮确认副卡组更换完毕
"
)
}
onSave=
{
()
=>
message
.
error
(
"
点击右下角按钮确认副卡组更换完毕
"
)
}
onReset=
{
async
()
=>
{
onReset=
{
async
()
=>
{
editDeckStore
.
set
(
await
iDeckToEditingDeck
(
deck
));
editDeckStore
.
set
(
await
iDeckToEditingDeck
(
deck
));
}
}
}
}
...
...
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