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
673e87ab
Commit
673e87ab
authored
Aug 14, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize replay modal style
parent
a4e6c32f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
19 deletions
+36
-19
src/ui/BuildDeck/DeckSelect.tsx
src/ui/BuildDeck/DeckSelect.tsx
+7
-14
src/ui/Match/ReplayModal.tsx
src/ui/Match/ReplayModal.tsx
+8
-5
src/ui/Shared/Uploader/index.tsx
src/ui/Shared/Uploader/index.tsx
+20
-0
src/ui/Shared/index.ts
src/ui/Shared/index.ts
+1
-0
No files found.
src/ui/BuildDeck/DeckSelect.tsx
View file @
673e87ab
...
@@ -3,15 +3,15 @@ import {
...
@@ -3,15 +3,15 @@ import {
DeleteOutlined
,
DeleteOutlined
,
DownloadOutlined
,
DownloadOutlined
,
FileAddOutlined
,
FileAddOutlined
,
InboxOutlined
,
PlusOutlined
,
PlusOutlined
,
}
from
"
@ant-design/icons
"
;
}
from
"
@ant-design/icons
"
;
import
{
App
,
Button
,
Dropdown
,
MenuProps
,
Upload
,
Upload
Props
}
from
"
antd
"
;
import
{
App
,
Button
,
Dropdown
,
MenuProps
,
UploadProps
}
from
"
antd
"
;
import
React
,
{
useRef
,
useState
}
from
"
react
"
;
import
React
,
{
useRef
,
useState
}
from
"
react
"
;
import
YGOProDeck
from
"
ygopro-deck-encode
"
;
import
YGOProDeck
from
"
ygopro-deck-encode
"
;
import
{
deckStore
,
IDeck
}
from
"
@/stores
"
;
import
{
deckStore
,
IDeck
}
from
"
@/stores
"
;
import
{
Uploader
}
from
"
../Shared
"
;
import
styles
from
"
./DeckSelect.module.scss
"
;
import
styles
from
"
./DeckSelect.module.scss
"
;
export
const
DeckSelect
:
React
.
FC
<
{
export
const
DeckSelect
:
React
.
FC
<
{
...
@@ -211,18 +211,11 @@ const DeckUploader: React.FC<{ onLoaded: (deck: IDeck) => void }> = ({
...
@@ -211,18 +211,11 @@ const DeckUploader: React.FC<{ onLoaded: (deck: IDeck) => void }> = ({
};
};
return
(
return
(
<
div
>
<
Uploader
<
Upload
.
Dragger
{
...
uploadProps
}
{
...
uploadProps
}
text=
"单击或拖动文件到此区域进行上传"
style=
{
{
width
:
"
100%
"
,
margin
:
"
20px 0 10px
"
}
}
hint=
"仅支持后缀名为ydk的卡组文件。"
>
/>
<
p
className=
"ant-upload-drag-icon"
>
<
InboxOutlined
/>
</
p
>
<
p
className=
"ant-upload-text"
>
单击或拖动文件到此区域进行上传
</
p
>
<
p
className=
"ant-upload-hint"
>
仅支持后缀名为ydk的卡组文件。
</
p
>
</
Upload
.
Dragger
>
</
div
>
);
);
};
};
...
...
src/ui/Match/ReplayModal.tsx
View file @
673e87ab
import
{
UploadOutlined
}
from
"
@ant-design/icons
"
;
import
{
Button
,
message
,
Modal
,
UploadProps
}
from
"
antd
"
;
import
{
Button
,
message
,
Modal
,
Upload
,
UploadProps
}
from
"
antd
"
;
import
React
,
{
useEffect
,
useState
}
from
"
react
"
;
import
React
,
{
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
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
{
Uploader
}
from
"
../Shared
"
;
import
{
init
}
from
"
./util
"
;
import
{
init
}
from
"
./util
"
;
const
localStore
=
proxy
({
const
localStore
=
proxy
({
...
@@ -22,6 +22,7 @@ export const ReplayModal: React.FC = () => {
...
@@ -22,6 +22,7 @@ export const ReplayModal: React.FC = () => {
onChange
(
info
)
{
onChange
(
info
)
{
info
.
file
.
status
=
"
done
"
;
info
.
file
.
status
=
"
done
"
;
},
},
accept
:
"
.yrp3d
"
,
beforeUpload
(
file
,
_
)
{
beforeUpload
(
file
,
_
)
{
const
reader
=
new
FileReader
();
const
reader
=
new
FileReader
();
reader
.
readAsArrayBuffer
(
file
);
reader
.
readAsArrayBuffer
(
file
);
...
@@ -78,9 +79,11 @@ export const ReplayModal: React.FC = () => {
...
@@ -78,9 +79,11 @@ export const ReplayModal: React.FC = () => {
}
}
onCancel=
{
()
=>
(
localStore
.
open
=
false
)
}
onCancel=
{
()
=>
(
localStore
.
open
=
false
)
}
>
>
<
Upload
{
...
uploadProps
}
>
<
Uploader
<
Button
icon=
{
<
UploadOutlined
/>
}
>
点击上传录像文件
</
Button
>
{
...
uploadProps
}
</
Upload
>
text=
"单击或拖动文件到此区域进行上传"
hint=
"仅支持后缀名为yrp3d的录像文件。"
/>
</
Modal
>
</
Modal
>
);
);
};
};
...
...
src/ui/Shared/Uploader/index.tsx
0 → 100644
View file @
673e87ab
import
{
InboxOutlined
}
from
"
@ant-design/icons
"
;
import
{
Upload
,
UploadProps
}
from
"
antd
"
;
import
React
from
"
react
"
;
export
const
Uploader
:
React
.
FC
<
UploadProps
&
{
text
?:
string
;
hint
?:
string
}
>
=
({
text
,
hint
,
...
uploadProps
})
=>
(
<
div
>
<
Upload
.
Dragger
{
...
uploadProps
}
style=
{
{
width
:
"
100%
"
,
margin
:
"
20px 0 10px
"
}
}
>
<
p
className=
"ant-upload-drag-icon"
>
<
InboxOutlined
/>
</
p
>
<
p
className=
"ant-upload-text"
>
{
text
}
</
p
>
<
p
className=
"ant-upload-hint"
>
{
hint
}
</
p
>
</
Upload
.
Dragger
>
</
div
>
);
src/ui/Shared/index.ts
View file @
673e87ab
...
@@ -6,4 +6,5 @@ export * from "./Loading";
...
@@ -6,4 +6,5 @@ export * from "./Loading";
export
*
from
"
./Scrollbar
"
;
export
*
from
"
./Scrollbar
"
;
export
*
from
"
./Select
"
;
export
*
from
"
./Select
"
;
export
*
from
"
./SpecialButton
"
;
export
*
from
"
./SpecialButton
"
;
export
*
from
"
./Uploader
"
;
export
*
from
"
./YgoCard
"
;
export
*
from
"
./YgoCard
"
;
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