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
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
Changes
8
Hide 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
{
.container
{
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
--side-box-width
:
400px
;
align-items
:
center
;
--battle-icon-width
:
50px
;
--side-box-width
:
500px
;
--gap-between-side-and-battle
:
30px
;
--border-radius
:
10px
;
--border-radius
:
10px
;
--sider-width
:
300px
;
--sider-width
:
300px
;
.main
{
.content
{
height
:
500px
;
// TODO: 修正这里的高度,或者说修正全局的高度设置。高度不应该超过100%
position
:
relative
;
position
:
relative
;
flex
:
1
;
flex
:
1
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
padding-bottom
:
5%
;
//
padding-bottom: 5%;
transition
:
transform
0
.3s
;
transition
:
transform
0
.3s
;
}
}
.sider
{
.sider
{
...
@@ -30,11 +30,12 @@
...
@@ -30,11 +30,12 @@
.both-side-container
{
.both-side-container
{
display
:
flex
;
display
:
flex
;
gap
:
var
(
--
gap-between-side-and-battle
);
flex-direction
:
column
;
gap
:
30px
;
align-items
:
center
;
align-items
:
center
;
margin-top
:
80px
;
margin-top
:
80px
;
.side-box
{
.side-box
{
height
:
1
2
0px
;
height
:
1
0
0px
;
width
:
var
(
--
side-box-width
);
width
:
var
(
--
side-box-width
);
border-radius
:
var
(
--
border-radius
);
border-radius
:
var
(
--
border-radius
);
background
:
hsla
(
0
,
0%
,
100%
,
0
.1
);
background
:
hsla
(
0
,
0%
,
100%
,
0
.1
);
...
@@ -161,3 +162,7 @@
...
@@ -161,3 +162,7 @@
}
}
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.btn-action
{
margin-top
:
auto
;
}
src/ui/NewWaitRoom/index.tsx
View file @
462ef67b
...
@@ -26,7 +26,7 @@ import { useSnapshot } from "valtio";
...
@@ -26,7 +26,7 @@ import { useSnapshot } from "valtio";
import
{
useConfig
}
from
"
@/config
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
accountStore
,
deckStore
,
IDeck
,
Player
,
roomStore
}
from
"
@/stores
"
;
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
{
Chat
}
from
"
./Chat
"
;
import
styles
from
"
./index.module.scss
"
;
import
styles
from
"
./index.module.scss
"
;
...
@@ -79,7 +79,7 @@ export const Component: React.FC = () => {
...
@@ -79,7 +79,7 @@ export const Component: React.FC = () => {
/>
/>
<
Chat
/>
<
Chat
/>
</
div
>
</
div
>
<
div
className=
{
styles
.
main
}
>
<
div
className=
{
styles
.
content
}
>
{
/* <div className={styles["status-bar"]}>
{
/* <div className={styles["status-bar"]}>
<LoadingOutlined />
<LoadingOutlined />
对方正在选择先后
对方正在选择先后
...
@@ -121,6 +121,10 @@ export const Component: React.FC = () => {
...
@@ -121,6 +121,10 @@ export const Component: React.FC = () => {
/>
/>
<
PlayerZone
who=
{
Who
.
Op
}
player=
{
room
.
getOpPlayer
()
}
/>
<
PlayerZone
who=
{
Who
.
Op
}
player=
{
room
.
getOpPlayer
()
}
/>
</
div
>
</
div
>
<
SpecialButton
className=
{
styles
[
"
btn-action
"
]
}
>
开始游戏
</
SpecialButton
>
</
div
>
</
div
>
</
div
>
</
div
>
</
ConfigProvider
>
</
ConfigProvider
>
...
@@ -283,7 +287,7 @@ const Controller: React.FC<{ onDeckChange: (deckName: string) => void }> = ({
...
@@ -283,7 +287,7 @@ const Controller: React.FC<{ onDeckChange: (deckName: string) => void }> = ({
<
Select
<
Select
title=
"卡组"
title=
"卡组"
showSearch
showSearch
style=
{
{
width
:
30
0
}
}
style=
{
{
width
:
25
0
}
}
defaultValue=
{
snapDeck
.
decks
[
0
].
deckName
}
defaultValue=
{
snapDeck
.
decks
[
0
].
deckName
}
options=
{
snapDeck
.
decks
.
map
((
deck
)
=>
({
options=
{
snapDeck
.
decks
.
map
((
deck
)
=>
({
value
:
deck
.
deckName
,
value
:
deck
.
deckName
,
...
@@ -336,6 +340,9 @@ const Controller: React.FC<{ onDeckChange: (deckName: string) => void }> = ({
...
@@ -336,6 +340,9 @@ const Controller: React.FC<{ onDeckChange: (deckName: string) => void }> = ({
>
>
退出房间
退出房间
</
Button
>
</
Button
>
{
/* <Button size="large" icon={<IconFont type="icon-play" size={12} />}>
开始游戏
</Button> */
}
</
Space
>
</
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";
...
@@ -2,4 +2,5 @@ export * from "./Background";
export
*
from
"
./css
"
;
export
*
from
"
./css
"
;
export
*
from
"
./IconFont
"
;
export
*
from
"
./IconFont
"
;
export
*
from
"
./Select
"
;
export
*
from
"
./Select
"
;
export
*
from
"
./SpecialButton
"
;
export
*
from
"
./YgoCard
"
;
export
*
from
"
./YgoCard
"
;
src/ui/Start/index.module.scss
View file @
462ef67b
...
@@ -31,51 +31,6 @@
...
@@ -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
{
.particles-container
{
...
...
src/ui/Start/index.tsx
View file @
462ef67b
...
@@ -4,7 +4,7 @@ import { useSnapshot } from "valtio";
...
@@ -4,7 +4,7 @@ import { useSnapshot } from "valtio";
import
{
useConfig
}
from
"
@/config
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
accountStore
}
from
"
@/stores
"
;
import
{
accountStore
}
from
"
@/stores
"
;
import
{
Background
}
from
"
@/ui/Shared
"
;
import
{
Background
,
SpecialButton
}
from
"
@/ui/Shared
"
;
import
styles
from
"
./index.module.scss
"
;
import
styles
from
"
./index.module.scss
"
;
...
@@ -54,13 +54,10 @@ const LoginBtn: React.FC<{ logined: boolean }> = ({ logined }) => {
...
@@ -54,13 +54,10 @@ const LoginBtn: React.FC<{ logined: boolean }> = ({ logined }) => {
const
goToMatch
=
()
=>
navigate
(
"
/match
"
);
const
goToMatch
=
()
=>
navigate
(
"
/match
"
);
return
(
return
(
<
span
<
SpecialButton
onClick=
{
logined
?
goToMatch
:
loginViaSSO
}
>
className=
{
styles
[
"
start-btn
"
]
}
onClick=
{
logined
?
goToMatch
:
loginViaSSO
}
>
<
span
>
{
logined
?
"
开始游戏
"
:
"
登录游戏
"
}
</
span
>
<
span
>
{
logined
?
"
开始游戏
"
:
"
登录游戏
"
}
</
span
>
<
RightOutlined
/>
<
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