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
96826a5f
Commit
96826a5f
authored
Feb 05, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
423c93c0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
18 deletions
+22
-18
src/middleware/sqlite.ts
src/middleware/sqlite.ts
+3
-3
src/ui/WaitRoom.tsx
src/ui/WaitRoom.tsx
+19
-15
No files found.
src/middleware/sqlite.ts
View file @
96826a5f
...
...
@@ -83,9 +83,10 @@ export default async function (action: sqliteAction): Promise<sqliteResult> {
const
ftsMetas
:
CardMeta
[]
=
[];
const
textStmt
=
YGODB
.
prepare
(
"
SELECT * FROM texts WHERE name LIKE
'%$query%'
"
"
SELECT * FROM texts WHERE name LIKE
$query
"
);
textStmt
.
bind
({
$query
:
query
});
textStmt
.
bind
({
$query
:
`%
${
query
}
%`
});
while
(
textStmt
.
step
())
{
const
row
=
textStmt
.
getAsObject
();
ftsTexts
.
push
(
row
);
...
...
@@ -93,7 +94,6 @@ export default async function (action: sqliteAction): Promise<sqliteResult> {
for
(
const
text
of
ftsTexts
)
{
const
id
=
text
.
id
;
if
(
id
)
{
const
dataStmt
=
YGODB
.
prepare
(
"
SELECT * FROM datas WHERE ID = $id
"
...
...
src/ui/WaitRoom.tsx
View file @
96826a5f
...
...
@@ -40,6 +40,7 @@ export default function WaitRoom() {
useEffect
(()
=>
{
if
(
ip
&&
player
&&
player
.
length
!=
0
&&
passWd
&&
passWd
.
length
!=
0
)
{
const
init
=
async
()
=>
{
// 页面第一次渲染时,通过socket中间件向ygopro服务端请求建立长连接
socketMiddleWare
({
cmd
:
socketCmd
.
CONNECT
,
...
...
@@ -49,13 +50,16 @@ export default function WaitRoom() {
passWd
,
},
});
}
// 初始化sqlite
sqliteMiddleWare
({
await
sqliteMiddleWare
({
cmd
:
sqliteCmd
.
INIT
,
initInfo
:
{
dbUrl
:
"
/ygopro-database/locales/zh-CN/cards.cdb
"
},
});
};
init
();
}
},
[]);
const
dispatch
=
store
.
dispatch
;
...
...
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