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
d31203f0
Commit
d31203f0
authored
Jul 28, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e7e8311d
Pipeline
#22812
passed with stages
in 12 minutes and 59 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
13 deletions
+8
-13
src/main.tsx
src/main.tsx
+5
-10
src/ui/Neos.tsx
src/ui/Neos.tsx
+1
-1
src/ui/SSO/index.module.scss
src/ui/SSO/index.module.scss
+0
-0
src/ui/SSO/index.tsx
src/ui/SSO/index.tsx
+2
-2
No files found.
src/main.tsx
View file @
d31203f0
/*
* Neos是基于[React](https://reactjs.org/)
和[Babylon.js](https://www.babylonjs.com/)
框架
* Neos是基于[React](https://reactjs.org/)框架
* 研发的Web版[Ygopro](https://github.com/Fluorohydride/ygopro),游戏王对战平台。
*
* - 路由管理:[React Router](https://reactrouter.com/en/main)
* - 状态管理:[Redux](https://redux.js.org/)
* - 3D渲染:[Babylon.js](https://www.babylonjs.com/)
* - 状态管理:[valtio](https://valtio.pmnd.rs/)
*
* 项目整体架构分为以下模块:
* - UI模块:
使用React组件和Babylon.js提供的渲染能力进行UI展示
;
* - UI模块:
基于HTML+CSS进行UI渲染
;
* - Service模块:一些具体业务逻辑的实现,通常是一些事件处理函数;
* - MiddleWare(中间件)模块:收敛Websocket长连接的处理逻辑;
* - Adapter模块:进行ygopro数据协议从二进制buffer到TypeScript结构体之间的转换;
* - Api模块:提供长连接以外请求网络数据的接口,比如获取卡组数据;
* - Reducer模块:进行全局的状态更新;
* - Store模块:存储全局状态。
*
* 在设计上各个模块之间都是解耦的,模块之间的依赖应该通过调用接口,而非调用实例。
* 在进行代码开发的时候需要注意这点。
* - Api模块:提供长连接以外请求网络数据的接口,比如登录萌卡账号;
* - Store模块:进行全局状态的管理。
*
* */
import
{
ProConfigProvider
}
from
"
@ant-design/pro-provider
"
;
...
...
src/ui/Neos.tsx
View file @
d31203f0
...
...
@@ -9,7 +9,7 @@ const WaitRoom = React.lazy(() => import("./WaitRoom"));
const
Mora
=
React
.
lazy
(()
=>
import
(
"
./Mora
"
));
const
NeosDuel
=
React
.
lazy
(()
=>
import
(
"
./Duel/Main
"
));
const
Replay
=
React
.
lazy
(()
=>
import
(
"
./Replay
"
));
const
SSO
=
React
.
lazy
(()
=>
import
(
"
./S
so
"
));
const
SSO
=
React
.
lazy
(()
=>
import
(
"
./S
SO
"
));
export
default
function
()
{
return
(
...
...
src/ui/SSO/index.module.scss
0 → 100644
View file @
d31203f0
src/ui/S
so
.tsx
→
src/ui/S
SO/index
.tsx
View file @
d31203f0
...
...
@@ -5,7 +5,7 @@ import { accountStore, User } from "@/stores";
const
NeosConfig
=
useConfig
();
const
S
so
:
React
.
FC
=
()
=>
{
const
S
SO
:
React
.
FC
=
()
=>
{
const
sso
=
new
URL
(
location
.
href
).
searchParams
.
get
(
"
sso
"
);
const
user
:
User
|
undefined
=
sso
?
getSSOUser
(
new
URLSearchParams
(
atob
(
sso
)))
...
...
@@ -56,4 +56,4 @@ function getSSOUser(searchParams: URLSearchParams): User {
return
sso
as
any
;
}
export
default
S
so
;
export
default
S
SO
;
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