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
462ef67b
Commit
462ef67b
authored
Aug 07, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: new start btn in waitroom
parent
93ca14a9
Pipeline
#22943
failed with stages
in 11 minutes and 14 seconds
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
82 additions
and
62 deletions
+82
-62
neos-protobuf
neos-protobuf
+1
-1
src/ui/NewWaitRoom/index.module.scss
src/ui/NewWaitRoom/index.module.scss
+12
-7
src/ui/NewWaitRoom/index.tsx
src/ui/NewWaitRoom/index.tsx
+10
-3
src/ui/Shared/SpecialButton/index.module.scss
src/ui/Shared/SpecialButton/index.module.scss
+44
-0
src/ui/Shared/SpecialButton/index.tsx
src/ui/Shared/SpecialButton/index.tsx
+11
-0
src/ui/Shared/index.ts
src/ui/Shared/index.ts
+1
-0
src/ui/Start/index.module.scss
src/ui/Start/index.module.scss
+0
-45
src/ui/Start/index.tsx
src/ui/Start/index.tsx
+3
-6
No files found.
neos-protobuf
@
30f4ea7a
Subproject commit
d6c01dd88fd72f22c432a52ba74eee9ece267499
Subproject commit
30f4ea7acd79b9cb18a358548520ca939e22dc5f
src/ui/NewWaitRoom/index.module.scss
View file @
462ef67b
.container
{
height
:
100%
;
display
:
flex
;
--side-box-width
:
400px
;
--battle-icon-width
:
50px
;
--gap-between-side-and-battle
:
30px
;
align-items
:
center
;
--side-box-width
:
500px
;
--border-radius
:
10px
;
--sider-width
:
300px
;
.main
{
.content
{
height
:
500px
;
// TODO: 修正这里的高度,或者说修正全局的高度设置。高度不应该超过100%
position
:
relative
;
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
padding-bottom
:
5%
;
//
padding-bottom: 5%;
transition
:
transform
0
.3s
;
}
.sider
{
...
...
@@ -30,11 +30,12 @@
.both-side-container
{
display
:
flex
;
gap
:
var
(
--
gap-between-side-and-battle
);
flex-direction
:
column
;
gap
:
30px
;
align-items
:
center
;
margin-top
:
80px
;
.side-box
{
height
:
1
2
0px
;
height
:
1
0
0px
;
width
:
var
(
--
side-box-width
);
border-radius
:
var
(
--
border-radius
);
background
:
hsla
(
0
,
0%
,
100%
,
0
.1
);
...
...
@@ -161,3 +162,7 @@
}
overflow
:
hidden
;
}
.btn-action
{
margin-top
:
auto
;
}
src/ui/NewWaitRoom/index.tsx
View file @
462ef67b
...
...
@@ -26,7 +26,7 @@ import { useSnapshot } from "valtio";
import
{
useConfig
}
from
"
@/config
"
;
import
{
accountStore
,
deckStore
,
IDeck
,
Player
,
roomStore
}
from
"
@/stores
"
;
import
{
Background
,
IconFont
,
Select
}
from
"
@/ui/Shared
"
;
import
{
Background
,
IconFont
,
Select
,
SpecialButton
}
from
"
@/ui/Shared
"
;
import
{
Chat
}
from
"
./Chat
"
;
import
styles
from
"
./index.module.scss
"
;
...
...
@@ -79,7 +79,7 @@ export const Component: React.FC = () => {
/>
<
Chat
/>
</
div
>
<
div
className=
{
styles
.
main
}
>
<
div
className=
{
styles
.
content
}
>
{
/* <div className={styles["status-bar"]}>
<LoadingOutlined />
对方正在选择先后
...
...
@@ -121,6 +121,10 @@ export const Component: React.FC = () => {
/>
<
PlayerZone
who=
{
Who
.
Op
}
player=
{
room
.
getOpPlayer
()
}
/>
</
div
>
<
SpecialButton
className=
{
styles
[
"
btn-action
"
]
}
>
开始游戏
</
SpecialButton
>
</
div
>
</
div
>
</
ConfigProvider
>
...
...
@@ -283,7 +287,7 @@ const Controller: React.FC<{ onDeckChange: (deckName: string) => void }> = ({
<
Select
title=
"卡组"
showSearch
style=
{
{
width
:
30
0
}
}
style=
{
{
width
:
25
0
}
}
defaultValue=
{
snapDeck
.
decks
[
0
].
deckName
}
options=
{
snapDeck
.
decks
.
map
((
deck
)
=>
({
value
:
deck
.
deckName
,
...
...
@@ -336,6 +340,9 @@ const Controller: React.FC<{ onDeckChange: (deckName: string) => void }> = ({
>
退出房间
</
Button
>
{
/* <Button size="large" icon={<IconFont type="icon-play" size={12} />}>
开始游戏
</Button> */
}
</
Space
>
);
};
src/ui/Shared/SpecialButton/index.module.scss
0 → 100644
View file @
462ef67b
.special-btn
{
cursor
:
pointer
;
width
:
200px
;
position
:
relative
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
gap
:
4px
;
padding
:
12px
40px
;
border
:
3px
solid
hsla
(
0
,
0%
,
100%
,
0
.3
);
border-radius
:
8px
;
background-clip
:
padding-box
;
background-color
:
hsla
(
0
,
0%
,
100%
,
0
.9
);
color
:
#0d0d0d
;
font-size
:
14px
;
font-weight
:
500
;
letter-spacing
:
0
.2px
;
transition
:
0
.2s
;
&
:hover
{
background-color
:
hsla
(
0
,
0%
,
100%
,
1
.1
);
}
&
:
:
before
{
position
:
absolute
;
z-index
:
-1
;
top
:
5px
;
right
:
5px
;
bottom
:
0
;
left
:
5px
;
border-radius
:
6px
;
background
:
conic-gradient
(
from
147
.14deg
at
50%
50%
,
#0294fe
-55
.68deg
,
#ff2136
113
.23deg
,
#9b4dff
195deg
,
#0294fe
304
.32deg
,
#ff2136
473
.23deg
);
content
:
""
;
filter
:
blur
(
20px
);
opacity
:
0
.6
;
}
}
src/ui/Shared/SpecialButton/index.tsx
0 → 100644
View file @
462ef67b
import
classNames
from
"
classnames
"
;
import
styles
from
"
./index.module.scss
"
;
export
const
SpecialButton
:
React
.
FC
<
React
.
PropsWithChildren
<
React
.
ComponentProps
<
"
span
"
>>
>
=
({
children
,
className
,
...
rest
})
=>
(
<
span
className=
{
classNames
(
styles
[
"
special-btn
"
],
className
)
}
{
...
rest
}
>
{
children
}
</
span
>
);
src/ui/Shared/index.ts
View file @
462ef67b
...
...
@@ -2,4 +2,5 @@ export * from "./Background";
export
*
from
"
./css
"
;
export
*
from
"
./IconFont
"
;
export
*
from
"
./Select
"
;
export
*
from
"
./SpecialButton
"
;
export
*
from
"
./YgoCard
"
;
src/ui/Start/index.module.scss
View file @
462ef67b
...
...
@@ -31,51 +31,6 @@
}
}
.start-btn
{
cursor
:
pointer
;
width
:
200px
;
position
:
relative
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
gap
:
4px
;
padding
:
12px
40px
;
border
:
3px
solid
hsla
(
0
,
0%
,
100%
,
0
.3
);
border-radius
:
8px
;
background-clip
:
padding-box
;
background-color
:
hsla
(
0
,
0%
,
100%
,
0
.9
);
color
:
#0d0d0d
;
font-size
:
14px
;
font-weight
:
500
;
letter-spacing
:
0
.2px
;
transition
:
0
.2s
;
&
:hover
{
background-color
:
hsla
(
0
,
0%
,
100%
,
1
.1
);
}
&
:
:
before
{
position
:
absolute
;
z-index
:
-1
;
top
:
5px
;
right
:
5px
;
bottom
:
0
;
left
:
5px
;
border-radius
:
6px
;
background
:
conic-gradient
(
from
147
.14deg
at
50%
50%
,
#0294fe
-55
.68deg
,
#ff2136
113
.23deg
,
#9b4dff
195deg
,
#0294fe
304
.32deg
,
#ff2136
473
.23deg
);
content
:
""
;
filter
:
blur
(
20px
);
opacity
:
0
.6
;
}
}
// 以下是粒子动画的样式
.particles-container
{
...
...
src/ui/Start/index.tsx
View file @
462ef67b
...
...
@@ -4,7 +4,7 @@ import { useSnapshot } from "valtio";
import
{
useConfig
}
from
"
@/config
"
;
import
{
accountStore
}
from
"
@/stores
"
;
import
{
Background
}
from
"
@/ui/Shared
"
;
import
{
Background
,
SpecialButton
}
from
"
@/ui/Shared
"
;
import
styles
from
"
./index.module.scss
"
;
...
...
@@ -54,13 +54,10 @@ const LoginBtn: React.FC<{ logined: boolean }> = ({ logined }) => {
const
goToMatch
=
()
=>
navigate
(
"
/match
"
);
return
(
<
span
className=
{
styles
[
"
start-btn
"
]
}
onClick=
{
logined
?
goToMatch
:
loginViaSSO
}
>
<
SpecialButton
onClick=
{
logined
?
goToMatch
:
loginViaSSO
}
>
<
span
>
{
logined
?
"
开始游戏
"
:
"
登录游戏
"
}
</
span
>
<
RightOutlined
/>
</
spa
n
>
</
SpecialButto
n
>
);
};
...
...
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