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
28af313d
Commit
28af313d
authored
Aug 03, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: card build
parent
f7a5a096
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
334 additions
and
17 deletions
+334
-17
src/styles/core.scss
src/styles/core.scss
+1
-2
src/styles/utils.scss
src/styles/utils.scss
+20
-0
src/ui/Build/index.tsx
src/ui/Build/index.tsx
+0
-2
src/ui/BuildDeck/index.module.scss
src/ui/BuildDeck/index.module.scss
+110
-0
src/ui/BuildDeck/index.tsx
src/ui/BuildDeck/index.tsx
+179
-0
src/ui/Duel/PlayMat/LifeBar/index.module.scss
src/ui/Duel/PlayMat/LifeBar/index.module.scss
+1
-1
src/ui/Layout/index.module.scss
src/ui/Layout/index.module.scss
+2
-2
src/ui/NeosRouter.tsx
src/ui/NeosRouter.tsx
+1
-1
src/ui/NewMatch/index.tsx
src/ui/NewMatch/index.tsx
+20
-9
No files found.
src/styles/core.scss
View file @
28af313d
...
@@ -25,7 +25,6 @@ table {
...
@@ -25,7 +25,6 @@ table {
#root
{
#root
{
margin
:
0
auto
;
margin
:
0
auto
;
text-align
:
center
;
width
:
100%
;
width
:
100%
;
}
}
...
@@ -114,5 +113,5 @@ nav {
...
@@ -114,5 +113,5 @@ nav {
body
{
body
{
--theme-font
:
"Electrolize"
,
sans-serif
;
--theme-font
:
"Electrolize"
,
sans-serif
;
--nav-height
:
48
px
;
--nav-height
:
56
px
;
}
}
src/styles/utils.scss
0 → 100644
View file @
28af313d
@mixin
scrollbar
{
overflow-y
:
overlay
;
&
:
:-
webkit-scrollbar
{
background
:
transparent
;
width
:
5px
;
}
&
:
:-
webkit-scrollbar-track
{
background
:
transparent
;
width
:
5px
;
}
&
:
:-
webkit-scrollbar-thumb
{
background
:
rgba
(
136
,
136
,
136
,
0
.417
);
}
&
:
:-
webkit-scrollbar-thumb
:
hover
{
background
:
rgba
(
136
,
136
,
136
,
0
.6
);
}
&
:
:-
webkit-scrollbar-thumb
:
active
{
background
:
rgba
(
136
,
136
,
136
,
0
.8
);
}
}
src/ui/Build/index.tsx
deleted
100644 → 0
View file @
f7a5a096
export
const
Component
=
()
=>
<>
build
</>;
Component
.
displayName
=
"
Build
"
;
src/ui/BuildDeck/index.module.scss
0 → 100644
View file @
28af313d
@use
"/src/styles/utils.scss"
;
.layout
{
position
:
fixed
;
left
:
0
;
top
:
var
(
--
nav-height
);
height
:
calc
(
100%
-
var
(
--
nav-height
));
}
.sider
{
max-height
:
100%
;
min-height
:
100%
;
overflow-x
:
hidden
;
overflow-y
:
overlay
;
background
:
transparent
!
important
;
@include
utils
.
scrollbar
;
.menu
{
min-height
:
100%
;
}
.btn-add
{
position
:
absolute
;
bottom
:
40px
;
left
:
50%
;
transform
:
translate
(
-50%
);
background-color
:
rgb
(
59
,
0
,
169
);
box-shadow
:
0
0
10px
0
rgba
(
0
,
0
,
0
,
0
.5
);
&
:hover
{
background-color
:
rgb
(
78
,
0
,
223
);
transform
:
translate
(
-50%
)
scale
(
1
.3
);
}
}
}
.content
{
display
:
flex
;
padding-bottom
:
0
;
padding-right
:
1rem
;
.deck
{
width
:
620px
;
}
.select
{
flex
:
1
;
.select-btns
{
padding
:
5px
;
display
:
flex
;
}
}
}
.container
{
height
:
calc
(
100%
-
20px
);
border
:
1px
solid
rgba
(
255
,
255
,
255
,
0
.2
);
display
:
flex
;
flex-direction
:
column
;
&
>
*
:not
(
:last-of-type
)
{
border-bottom
:
1px
solid
rgba
(
255
,
255
,
255
,
0
.2
);
}
.title
{
height
:
44px
;
flex
:
0
0
44px
;
}
.deck-zone
{
@include
utils
.
scrollbar
;
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
}
.main
,
.extra
,
.side
{
border-bottom
:
1px
solid
rgba
(
255
,
255
,
255
,
0
.2
);
padding
:
0
.75rem
;
}
.main
{
flex
:
3
;
}
.extra
{
flex
:
1
;
}
.side
{
flex
:
1
;
}
.card-continer
{
display
:
grid
;
grid-template-columns
:
repeat
(
10
,
1fr
);
gap
:
5px
;
}
}
.select
.container
{
border-left
:
none
;
}
.card
{
width
:
100%
;
background-color
:
rgb
(
32
,
36
,
71
);
aspect-ratio
:
var
(
--
card-ratio
);
}
.search-cards-container
{
overflow-y
:
scroll
;
@include
utils
.
scrollbar
;
.search-cards
{
--card-width
:
80px
;
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
var
(
--
card-width
)
,
1fr
));
padding
:
0
.75rem
;
gap
:
10px
;
}
}
src/ui/BuildDeck/index.tsx
0 → 100644
View file @
28af313d
import
{
Menu
,
Layout
,
type
MenuProps
,
ConfigProvider
,
type
ThemeConfig
,
Input
,
Button
,
Space
,
}
from
"
antd
"
;
import
{
Background
}
from
"
../Shared
"
;
import
styles
from
"
./index.module.scss
"
;
import
classNames
from
"
classnames
"
;
import
{
SearchOutlined
,
DeleteOutlined
,
UndoOutlined
,
CheckOutlined
,
FilterOutlined
,
SortAscendingOutlined
,
EditOutlined
,
PlusOutlined
,
}
from
"
@ant-design/icons
"
;
const
{
Content
,
Sider
}
=
Layout
;
type
MenuItem
=
Required
<
MenuProps
>
[
"
items
"
][
number
];
// 生成伪菜单栏
function
getItem
(
label
:
React
.
ReactNode
,
key
:
React
.
Key
,
icon
?:
React
.
ReactNode
,
children
?:
MenuItem
[],
type
?:
"
group
"
):
MenuItem
{
return
{
key
,
icon
,
children
,
label
,
type
,
}
as
MenuItem
;
}
const
items
:
MenuProps
[
"
items
"
]
=
Array
.
from
({
length
:
15
}).
map
((
_
,
i
)
=>
getItem
(
`卡组
${
i
}
`
,
i
.
toString
())
);
const
theme
:
ThemeConfig
=
{
components
:
{
Menu
:
{
colorItemBg
:
"
#ffffff00
"
,
colorItemBgSelected
:
"
#ffffff33
"
,
colorItemTextSelected
:
"
#ffffff
"
,
colorActiveBarBorderSize
:
0
,
fontSize
:
12
,
fontSizeLG
:
12
,
},
Layout
:
{
colorBgBody
:
"
transparent
"
,
},
},
};
export
const
Component
:
React
.
FC
=
()
=>
{
return
(
<
ConfigProvider
theme=
{
theme
}
>
<
Background
/>
<
Layout
className=
{
styles
.
layout
}
style=
{
{
width
:
"
100%
"
}
}
>
<
Sider
width=
{
220
}
className=
{
styles
.
sider
}
>
<
Menu
className=
{
styles
.
menu
}
defaultSelectedKeys=
{
[
"
1
"
]
}
defaultOpenKeys=
{
[
"
sub1
"
]
}
items=
{
items
}
/>
<
Button
className=
{
styles
[
"
btn-add
"
]
}
icon=
{
<
PlusOutlined
/>
}
shape=
"circle"
type=
"text"
></
Button
>
</
Sider
>
<
Content
className=
{
styles
.
content
}
>
<
Deck
/>
<
Select
/>
</
Content
>
</
Layout
>
</
ConfigProvider
>
);
};
Component
.
displayName
=
"
Build
"
;
const
Deck
:
React
.
FC
=
()
=>
{
return
(
<
div
className=
{
styles
.
deck
}
>
<
div
className=
{
styles
.
container
}
>
<
Space
className=
{
styles
.
title
}
style=
{
{
justifyContent
:
"
space-between
"
}
}
>
<
Input
placeholder=
"我的卡组"
bordered=
{
false
}
prefix=
{
<
EditOutlined
/>
}
/>
<
Space
style=
{
{
marginRight
:
6
}
}
>
<
Button
type=
"text"
size=
"small"
icon=
{
<
DeleteOutlined
/>
}
>
清空
</
Button
>
<
Button
type=
"text"
size=
"small"
icon=
{
<
UndoOutlined
/>
}
>
重置
</
Button
>
<
Button
type=
"text"
size=
"small"
icon=
{
<
CheckOutlined
/>
}
>
保存
</
Button
>
</
Space
>
</
Space
>
<
div
className=
{
styles
[
"
deck-zone
"
]
}
>
<
div
className=
{
styles
.
main
}
>
<
div
className=
{
styles
[
"
card-continer
"
]
}
>
{
Array
.
from
({
length
:
60
}).
map
((
_
,
i
)
=>
(
<
div
className=
{
styles
.
card
}
key=
{
i
}
/>
))
}
</
div
>
</
div
>
<
div
className=
{
styles
.
extra
}
>
<
div
className=
{
styles
[
"
card-continer
"
]
}
>
{
Array
.
from
({
length
:
15
}).
map
((
_
,
i
)
=>
(
<
div
className=
{
styles
.
card
}
key=
{
i
}
/>
))
}
</
div
>
</
div
>
<
div
className=
{
styles
.
side
}
>
<
div
className=
{
styles
[
"
card-continer
"
]
}
>
{
Array
.
from
({
length
:
15
}).
map
((
_
,
i
)
=>
(
<
div
className=
{
styles
.
card
}
key=
{
i
}
/>
))
}
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
);
};
const
Select
:
React
.
FC
=
()
=>
{
return
(
<
div
className=
{
styles
.
select
}
>
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
.
title
}
>
<
Input
placeholder=
"搜索卡片"
bordered=
{
false
}
suffix=
{
<
Button
type=
"text"
icon=
{
<
SearchOutlined
/>
}
/>
}
/>
</
div
>
<
div
className=
{
styles
[
"
select-btns
"
]
}
>
<
Button
block
type=
"text"
icon=
{
<
FilterOutlined
/>
}
>
筛选
</
Button
>
<
Button
block
type=
"text"
icon=
{
<
SortAscendingOutlined
/>
}
>
排列
</
Button
>
<
Button
block
type=
"text"
icon=
{
<
DeleteOutlined
/>
}
>
重置
</
Button
>
</
div
>
<
div
className=
{
styles
[
"
search-cards-container
"
]
}
>
<
div
className=
{
styles
[
"
search-cards
"
]
}
>
{
Array
.
from
({
length
:
60
}).
map
((
_
,
i
)
=>
(
<
div
className=
{
styles
.
card
}
key=
{
i
}
/>
))
}
</
div
>
</
div
>
</
div
>
</
div
>
);
};
src/ui/Duel/PlayMat/LifeBar/index.module.scss
View file @
28af313d
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
padding
:
1rem
;
padding
:
1rem
;
padding-bottom
:
0
.6rem
;
padding-bottom
:
0
.6rem
;
border-radius
:
8px
;
border-radius
:
8px
;
text-align
:
left
;
//
text-align: left;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
gap
:
8px
;
gap
:
8px
;
...
...
src/ui/Layout/index.module.scss
View file @
28af313d
...
@@ -20,10 +20,10 @@
...
@@ -20,10 +20,10 @@
line-height
:
var
(
--
nav-height
);
line-height
:
var
(
--
nav-height
);
transition
:
0
.3s
;
transition
:
0
.3s
;
&
:hover
{
&
:hover
{
opacity
:
0
.8
;
box-shadow
:
0px
2px
0
0
white
inset
;
}
}
&
:global
(
.active
)
{
&
:global
(
.active
)
{
box-shadow
:
0px
-
2px
0
0
white
inset
;
box-shadow
:
0px
2px
0
0
white
inset
;
}
}
}
}
}
}
...
...
src/ui/NeosRouter.tsx
View file @
28af313d
...
@@ -27,7 +27,7 @@ const _router = createBrowserRouter([
...
@@ -27,7 +27,7 @@ const _router = createBrowserRouter([
},
},
{
{
path
:
"
/build
"
,
path
:
"
/build
"
,
lazy
:
()
=>
import
(
"
./Build
"
),
lazy
:
()
=>
import
(
"
./Build
Deck
"
),
},
},
{
{
path
:
"
/profile
"
,
path
:
"
/profile
"
,
...
...
src/ui/NewMatch/index.tsx
View file @
28af313d
import
{
Select
,
Space
}
from
"
antd
"
;
import
{
Select
,
Space
,
ConfigProvider
}
from
"
antd
"
;
import
classNames
from
"
classnames
"
;
import
classNames
from
"
classnames
"
;
import
{
type
LoaderFunction
}
from
"
react-router-dom
"
;
import
{
type
LoaderFunction
}
from
"
react-router-dom
"
;
...
@@ -72,13 +72,24 @@ const CustomSelect: React.FC<
...
@@ -72,13 +72,24 @@ const CustomSelect: React.FC<
React
.
ComponentProps
<
typeof
Select
>
&
{
title
:
string
}
React
.
ComponentProps
<
typeof
Select
>
&
{
title
:
string
}
>
=
({
title
,
className
,
...
rest
})
=>
{
>
=
({
title
,
className
,
...
rest
})
=>
{
return
(
return
(
<
div
className=
{
styles
[
"
custom-select
"
]
}
>
<
ConfigProvider
<
span
className=
{
styles
.
prefix
}
>
{
title
}
</
span
>
theme=
{
{
<
Select
components
:
{
className=
{
classNames
(
styles
.
select
,
className
)
}
Select
:
{
size=
"large"
colorBgElevated
:
"
#00132Dff
"
,
{
...
rest
}
controlItemBgActive
:
"
#00286055
"
,
/>
},
</
div
>
},
}
}
>
<
div
className=
{
styles
[
"
custom-select
"
]
}
>
<
span
className=
{
styles
.
prefix
}
>
{
title
}
</
span
>
<
Select
className=
{
classNames
(
styles
.
select
,
className
)
}
size=
"large"
{
...
rest
}
/>
</
div
>
</
ConfigProvider
>
);
);
};
};
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