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
f9d61019
Commit
f9d61019
authored
Mar 30, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态加载超先行卡列表
parent
c6d45cc7
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
45 additions
and
61 deletions
+45
-61
.gitlab-ci.yml
.gitlab-ci.yml
+0
-2
neos.config.json
neos.config.json
+1
-0
neos.config.prod.json
neos.config.prod.json
+1
-0
src/api/index.ts
src/api/index.ts
+1
-0
src/api/superPreRelease.ts
src/api/superPreRelease.ts
+24
-0
src/middleware/sqlite/index.ts
src/middleware/sqlite/index.ts
+1
-1
src/stores/initStore.ts
src/stores/initStore.ts
+1
-0
src/superPreRelease/index.ts
src/superPreRelease/index.ts
+0
-5
src/ui/Layout/index.tsx
src/ui/Layout/index.tsx
+2
-0
src/ui/Layout/utils.ts
src/ui/Layout/utils.ts
+9
-0
src/ui/Match/util.ts
src/ui/Match/util.ts
+4
-1
src/ui/Shared/YgoCard/index.tsx
src/ui/Shared/YgoCard/index.tsx
+1
-1
super-pre-release.json
super-pre-release.json
+0
-47
sync_super_prerelease.sh
sync_super_prerelease.sh
+0
-4
No files found.
.gitlab-ci.yml
View file @
f9d61019
...
@@ -62,7 +62,6 @@ ts_check_lint:
...
@@ -62,7 +62,6 @@ ts_check_lint:
tags
:
tags
:
-
linux
-
linux
script
:
script
:
-
sh sync_super_prerelease.sh
-
npx tsc
-
npx tsc
-
npm run lint
-
npm run lint
...
@@ -74,7 +73,6 @@ npm_build:
...
@@ -74,7 +73,6 @@ npm_build:
tags
:
tags
:
-
linux
-
linux
script
:
script
:
-
sh sync_super_prerelease.sh
-
cp neos.config.prod.json neos.config.json
-
cp neos.config.prod.json neos.config.json
-
npm run build:prod
-
npm run build:prod
artifacts
:
artifacts
:
...
...
neos.config.json
View file @
f9d61019
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
"preReleaseImgUrl"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/pics"
,
"preReleaseImgUrl"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/pics"
,
"releaseDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/cards.cdb"
,
"releaseDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/cards.cdb"
,
"preReleaseDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/test-release.cdb"
,
"preReleaseDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/test-release.cdb"
,
"preReleaseConfig"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/test-release-v2.json"
,
"stringsUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/strings.conf"
,
"stringsUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/strings.conf"
,
"lflistUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/lflist.conf"
,
"lflistUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/lflist.conf"
,
"replayUrl"
:
"replay.neos.moe"
,
"replayUrl"
:
"replay.neos.moe"
,
...
...
neos.config.prod.json
View file @
f9d61019
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
"preReleaseImgUrl"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/pics"
,
"preReleaseImgUrl"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/pics"
,
"releaseDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/cards.cdb"
,
"releaseDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/cards.cdb"
,
"preReleaseDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/test-release.cdb"
,
"preReleaseDbUrl"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/test-release.cdb"
,
"preReleaseConfig"
:
"https://cdn02.moecube.com:444/ygopro-super-pre/data/test-release-v2.json"
,
"stringsUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/strings.conf"
,
"stringsUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/strings.conf"
,
"lflistUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/lflist.conf"
,
"lflistUrl"
:
"https://cdn02.moecube.com:444/ygopro-database/zh-CN/lflist.conf"
,
"replayUrl"
:
"replay.neos.moe"
,
"replayUrl"
:
"replay.neos.moe"
,
...
...
src/api/index.ts
View file @
f9d61019
...
@@ -5,3 +5,4 @@ export * from "./mycard";
...
@@ -5,3 +5,4 @@ export * from "./mycard";
export
*
from
"
./ocgcore/idl/ocgcore
"
;
export
*
from
"
./ocgcore/idl/ocgcore
"
;
export
*
from
"
./ocgcore/ocgHelper
"
;
export
*
from
"
./ocgcore/ocgHelper
"
;
export
*
from
"
./strings
"
;
export
*
from
"
./strings
"
;
export
*
from
"
./superPreRelease
"
;
src/api/superPreRelease.ts
0 → 100644
View file @
f9d61019
import
{
useConfig
}
from
"
@/config
"
;
const
{
preReleaseConfig
}
=
useConfig
();
interface
SuperPreInfo
{
/* only use id currently, other fields see:
* https://cdn02.moecube.com:444/ygopro-super-pre/data/test-release-v2.json
* */
id
:
number
;
}
let
superPreList
:
SuperPreInfo
[]
=
[];
export
async
function
initSuperPrerelease
()
{
const
json
=
await
(
await
fetch
(
preReleaseConfig
)).
text
();
const
list
:
SuperPreInfo
[]
=
JSON
.
parse
(
json
);
superPreList
=
list
;
}
export
function
isSuperReleaseCard
(
code
:
number
):
boolean
{
if
(
superPreList
.
length
===
0
)
console
.
warn
(
"
Super pre release config has not been initialized!
"
);
return
superPreList
.
find
(({
id
})
=>
id
===
code
)
!==
undefined
;
}
src/middleware/sqlite/index.ts
View file @
f9d61019
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
import
initSqlJs
,
{
Database
}
from
"
sql.js
"
;
import
initSqlJs
,
{
Database
}
from
"
sql.js
"
;
import
{
isSuperReleaseCard
}
from
"
@/api
"
;
import
{
CardData
,
CardMeta
,
CardText
}
from
"
@/api/cards
"
;
import
{
CardData
,
CardMeta
,
CardText
}
from
"
@/api/cards
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
pfetch
}
from
"
@/infra
"
;
import
{
pfetch
}
from
"
@/infra
"
;
import
{
isSuperReleaseCard
}
from
"
@/superPreRelease
"
;
import
{
FtsParams
,
invokeFts
}
from
"
./fts
"
;
import
{
FtsParams
,
invokeFts
}
from
"
./fts
"
;
...
...
src/stores/initStore.ts
View file @
f9d61019
...
@@ -10,6 +10,7 @@ export const initStore = proxy({
...
@@ -10,6 +10,7 @@ export const initStore = proxy({
i18n
:
false
,
i18n
:
false
,
wasm
:
false
,
wasm
:
false
,
forbidden
:
false
,
// 禁卡表
forbidden
:
false
,
// 禁卡表
superprerelease
:
false
,
// 超先行
// ...
// ...
reset
()
{},
reset
()
{},
}
satisfies
NeosStore
);
}
satisfies
NeosStore
);
src/superPreRelease/index.ts
deleted
100644 → 0
View file @
c6d45cc7
import
SuperReleaseData
from
"
../../super-pre-release.json
"
;
export
function
isSuperReleaseCard
(
code
:
number
):
boolean
{
return
SuperReleaseData
.
find
((
id
)
=>
id
===
code
)
!==
undefined
;
}
src/ui/Layout/index.tsx
View file @
f9d61019
...
@@ -26,6 +26,7 @@ import {
...
@@ -26,6 +26,7 @@ import {
initForbidden
,
initForbidden
,
initI18N
,
initI18N
,
initSqlite
,
initSqlite
,
initSuper
,
initWASM
,
initWASM
,
}
from
"
./utils
"
;
}
from
"
./utils
"
;
...
@@ -38,6 +39,7 @@ export const loader: LoaderFunction = async () => {
...
@@ -38,6 +39,7 @@ export const loader: LoaderFunction = async () => {
initWASM
();
initWASM
();
initForbidden
();
initForbidden
();
initI18N
();
initI18N
();
initSuper
();
return
null
;
return
null
;
};
};
...
...
src/ui/Layout/utils.ts
View file @
f9d61019
...
@@ -5,6 +5,7 @@ import {
...
@@ -5,6 +5,7 @@ import {
forbidden
,
forbidden
,
getCookie
,
getCookie
,
initStrings
,
initStrings
,
initSuperPrerelease
,
setCookie
,
setCookie
,
}
from
"
@/api
"
;
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
useConfig
}
from
"
@/config
"
;
...
@@ -63,6 +64,14 @@ export const initI18N = async () => {
...
@@ -63,6 +64,14 @@ export const initI18N = async () => {
}
}
};
};
/** 加载超先行服配置 */
export
const
initSuper
=
async
()
=>
{
if
(
!
initStore
.
superprerelease
)
{
await
initSuperPrerelease
();
initStore
.
superprerelease
=
true
;
}
};
/** sso登录跳转回来 */
/** sso登录跳转回来 */
export
const
handleSSOLogin
=
async
(
search
:
string
)
=>
{
export
const
handleSSOLogin
=
async
(
search
:
string
)
=>
{
/** 从SSO跳转回的URL之中,解析用户信息 */
/** 从SSO跳转回的URL之中,解析用户信息 */
...
...
src/ui/Match/util.ts
View file @
f9d61019
import
rustInit
from
"
rust-src
"
;
import
rustInit
from
"
rust-src
"
;
import
{
initStrings
}
from
"
@/api
"
;
import
{
initStrings
,
initSuperPrerelease
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
socketMiddleWare
,
{
socketCmd
}
from
"
@/middleware/socket
"
;
import
socketMiddleWare
,
{
socketCmd
}
from
"
@/middleware/socket
"
;
import
sqliteMiddleWare
,
{
sqliteCmd
}
from
"
@/middleware/sqlite
"
;
import
sqliteMiddleWare
,
{
sqliteCmd
}
from
"
@/middleware/sqlite
"
;
...
@@ -34,6 +34,9 @@ export const connectSrvpro = async (params: {
...
@@ -34,6 +34,9 @@ export const connectSrvpro = async (params: {
// 初始化I18N文案
// 初始化I18N文案
await
initStrings
();
await
initStrings
();
// 初始化超先行配置
await
initSuperPrerelease
();
if
(
params
.
replay
&&
params
.
replayData
)
{
if
(
params
.
replay
&&
params
.
replayData
)
{
// 连接回放websocket服务
// 连接回放websocket服务
socketMiddleWare
({
socketMiddleWare
({
...
...
src/ui/Shared/YgoCard/index.tsx
View file @
f9d61019
import
classNames
from
"
classnames
"
;
import
classNames
from
"
classnames
"
;
import
{
CSSProperties
,
useMemo
}
from
"
react
"
;
import
{
CSSProperties
,
useMemo
}
from
"
react
"
;
import
{
isSuperReleaseCard
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
isSuperReleaseCard
}
from
"
@/superPreRelease
"
;
import
styles
from
"
./index.module.scss
"
;
import
styles
from
"
./index.module.scss
"
;
...
...
super-pre-release.json
deleted
100644 → 0
View file @
c6d45cc7
[
101204092
,
101205074
,
100230201
,
100220201
,
100220202
,
100220203
,
100220204
,
100220205
,
100220206
,
101205007
,
101205008
,
101205009
,
101205042
,
101205043
,
101205056
,
101205070
,
101205025
,
101205026
,
101205041
,
101205045
,
101205051
,
101205022
,
101205032
,
101205076
,
101205017
,
101205035
,
101205036
,
101205046
,
101205047
,
101205061
,
101205062
,
101205072
,
101205000
,
101205001
,
101205002
,
101205003
,
101205004
,
101205005
,
101205006
,
101205033
,
101205053
,
101205054
,
101205055
,
101205068
,
101205069
]
sync_super_prerelease.sh
deleted
100755 → 0
View file @
c6d45cc7
#!/bin/bash
# 更新超先行服卡片列表
curl
--proto
'=https'
--tlsv1
.2
-sS
https://cdn02.moecube.com:444/ygopro-super-pre/data/test-release-v2.json | jq
'[.[].id]'
>
super-pre-release.json
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