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
b6f722a4
Commit
b6f722a4
authored
Jul 16, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'optimize/loading' into 'main'
add loading for Start See merge request
!392
parents
9c95d331
3fffebe1
Pipeline
#28437
passed with stages
in 9 minutes and 33 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
33 deletions
+33
-33
src/ui/Match/util.ts
src/ui/Match/util.ts
+3
-8
src/ui/Start/index.tsx
src/ui/Start/index.tsx
+30
-25
No files found.
src/ui/Match/util.ts
View file @
b6f722a4
...
...
@@ -4,12 +4,13 @@ import { initStrings, initSuperPrerelease } from "@/api";
import
{
useConfig
}
from
"
@/config
"
;
import
{
getUIContainer
,
initUIContainer
}
from
"
@/container/compat
"
;
import
{
initReplaySocket
,
initSocket
}
from
"
@/middleware/socket
"
;
import
sqliteMiddleWare
,
{
sqliteCmd
}
from
"
@/middleware/sqlite
"
;
import
{
pollSocketLooper
,
pollSocketLooperWithAgent
,
}
from
"
@/service/executor
"
;
import
{
initSqlite
}
from
"
../Layout/utils
"
;
const
NeosConfig
=
useConfig
();
// 连接SRVPRO服务
...
...
@@ -29,13 +30,7 @@ export const connectSrvpro = async (params: {
await
rustInit
(
url
);
// 初始化sqlite
await
sqliteMiddleWare
({
cmd
:
sqliteCmd
.
INIT
,
initInfo
:
{
releaseDbUrl
:
NeosConfig
.
releaseDbUrl
,
preReleaseDbUrl
:
NeosConfig
.
preReleaseDbUrl
,
},
});
await
initSqlite
();
// 初始化I18N文案
await
initStrings
();
...
...
src/ui/Start/index.tsx
View file @
b6f722a4
...
...
@@ -6,8 +6,8 @@ import { useSnapshot } from "valtio";
import
{
getSSOSignInUrl
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
AudioActionType
,
changeScene
}
from
"
@/infra/audio
"
;
import
{
accountStore
}
from
"
@/stores
"
;
import
{
Background
,
SpecialButton
}
from
"
@/ui/Shared
"
;
import
{
accountStore
,
initStore
}
from
"
@/stores
"
;
import
{
Background
,
Loading
,
SpecialButton
}
from
"
@/ui/Shared
"
;
import
styles
from
"
./index.module.scss
"
;
...
...
@@ -22,33 +22,38 @@ export const loader: LoaderFunction = async () => {
export
const
Component
:
React
.
FC
=
()
=>
{
const
{
t
}
=
useTranslation
(
"
Start
"
);
const
{
user
}
=
useSnapshot
(
accountStore
);
const
{
progress
}
=
useSnapshot
(
initStore
.
sqlite
);
return
(
<>
<
Background
/>
<
div
className=
{
styles
.
wrap
}
>
<
main
className=
{
styles
.
main
}
>
<
div
className=
{
styles
.
left
}
>
<
img
className=
{
styles
[
"
neos-logo
"
]
}
src=
{
`${NeosConfig.assetsPath}/neos-logo.svg`
}
alt=
"YGO NEOS"
/>
<
div
className=
{
styles
.
title
}
>
{
t
(
"
Title
"
)
}
</
div
>
<
div
className=
{
styles
.
keywords
}
>
{
t
(
"
Keywords
"
)
}
</
div
>
<
div
className=
{
styles
.
details
}
>
{
t
(
"
Details
"
)
}
</
div
>
<
LoginBtn
logined=
{
Boolean
(
user
)
}
/>
</
div
>
<
div
className=
{
styles
.
right
}
>
<
img
className=
{
styles
[
"
neos-main-bg
"
]
}
src=
{
`${NeosConfig.assetsPath}/neos-main-bg.webp`
}
/>
<
img
className=
{
styles
[
"
neos-main
"
]
}
src=
{
`${NeosConfig.assetsPath}/neos-main.webp`
}
/>
</
div
>
</
main
>
{
progress
===
1
?
(
<
main
className=
{
styles
.
main
}
>
<
div
className=
{
styles
.
left
}
>
<
img
className=
{
styles
[
"
neos-logo
"
]
}
src=
{
`${NeosConfig.assetsPath}/neos-logo.svg`
}
alt=
"YGO NEOS"
/>
<
div
className=
{
styles
.
title
}
>
{
t
(
"
Title
"
)
}
</
div
>
<
div
className=
{
styles
.
keywords
}
>
{
t
(
"
Keywords
"
)
}
</
div
>
<
div
className=
{
styles
.
details
}
>
{
t
(
"
Details
"
)
}
</
div
>
<
LoginBtn
logined=
{
Boolean
(
user
)
}
/>
</
div
>
<
div
className=
{
styles
.
right
}
>
<
img
className=
{
styles
[
"
neos-main-bg
"
]
}
src=
{
`${NeosConfig.assetsPath}/neos-main-bg.webp`
}
/>
<
img
className=
{
styles
[
"
neos-main
"
]
}
src=
{
`${NeosConfig.assetsPath}/neos-main.webp`
}
/>
</
div
>
</
main
>
)
:
(
<
Loading
progress=
{
progress
*
100
}
/>
)
}
</
div
>
</>
);
...
...
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