Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
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
syntax_j
mycard
Commits
bc0b3261
Commit
bc0b3261
authored
Sep 21, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modal and reload
parent
5e48de4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
+19
-16
src/app/ygopro/ygopro.component.html
src/app/ygopro/ygopro.component.html
+2
-2
src/app/ygopro/ygopro.component.ts
src/app/ygopro/ygopro.component.ts
+17
-14
No files found.
src/app/ygopro/ygopro.component.html
View file @
bc0b3261
...
@@ -357,11 +357,11 @@
...
@@ -357,11 +357,11 @@
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"staticBackdropLabel"
>
Modal title
</h5>
<h5
class=
"modal-title"
id=
"staticBackdropLabel"
>
决斗结果
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
...
{{ matchResultData.myname }} {{ matchResultData.athletic_win }}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/ygopro/ygopro.component.ts
View file @
bc0b3261
...
@@ -171,7 +171,7 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
...
@@ -171,7 +171,7 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
@
ViewChild
(
'
resultModal
'
)
@
ViewChild
(
'
resultModal
'
)
resultModal
:
ElementRef
<
HTMLElement
>
;
resultModal
:
ElementRef
<
HTMLElement
>
;
ygoproMatchResultMod
e
l
:
Modal
;
ygoproMatchResultMod
a
l
:
Modal
;
// points: Points;
// points: Points;
servers
:
Server
[]
=
[];
servers
:
Server
[]
=
[];
...
@@ -342,6 +342,7 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
...
@@ -342,6 +342,7 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
async
refreshYGOProData
()
{
async
refreshYGOProData
()
{
console
.
log
(
`Refreshing YGOPro Data.`
);
console
.
log
(
`Refreshing YGOPro Data.`
);
this
.
ygoproData
=
this
.
getYGOProData
(
this
.
app
);
this
.
ygoproData
=
this
.
getYGOProData
(
this
.
app
);
console
.
log
(
JSON
.
stringify
(
this
.
ygoproData
))
this
.
servers
=
this
.
ygoproData
.
servers
;
this
.
servers
=
this
.
ygoproData
.
servers
;
this
.
selectableServers
=
this
.
servers
.
filter
((
s
)
=>
!
s
.
hidden
);
this
.
selectableServers
=
this
.
servers
.
filter
((
s
)
=>
!
s
.
hidden
);
this
.
currentServer
=
this
.
selectableServers
[
0
];
this
.
currentServer
=
this
.
selectableServers
[
0
];
...
@@ -366,8 +367,8 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
...
@@ -366,8 +367,8 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
}
}
async
ngOnInit
()
{
async
ngOnInit
()
{
this
.
ygoproMatchResultModel
=
new
Modal
(
this
.
resultModal
.
nativeElement
,
{
keyboard
:
false
})
await
this
.
refreshYGOProData
();
await
this
.
refreshYGOProData
();
this
.
ygoproMatchResultModal
=
new
Modal
(
this
.
resultModal
.
nativeElement
,
{
keyboard
:
false
})
remote
.
ipcMain
.
on
(
'
YGOPro
'
,
(
e
:
any
,
type
:
string
)
=>
{
remote
.
ipcMain
.
on
(
'
YGOPro
'
,
(
e
:
any
,
type
:
string
)
=>
{
console
.
log
(
'
rrrrr
'
);
console
.
log
(
'
rrrrr
'
);
this
.
request_match
(
type
);
this
.
request_match
(
type
);
...
@@ -702,8 +703,10 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
...
@@ -702,8 +703,10 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
return
this
.
join
(
'
AI#
'
+
name
,
this
.
currentServer
);
return
this
.
join
(
'
AI#
'
+
name
,
this
.
currentServer
);
}
}
matchResultData
:
any
=
{};
async
start_game
(
action
:
string
,
param
:
any
)
{
async
start_game
(
action
:
string
,
param
:
any
)
{
let
data
:
any
;
//
let data: any;
let
start_time
:
string
;
let
start_time
:
string
;
let
exp_rank_ex
:
number
;
let
exp_rank_ex
:
number
;
let
arena_rank_ex
:
number
;
let
arena_rank_ex
:
number
;
...
@@ -762,8 +765,8 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
...
@@ -762,8 +765,8 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
}
}
})
})
).
then
((
d
)
=>
{
).
then
((
d
)
=>
{
d
ata
=
d
.
data
[
0
];
this
.
matchResultD
ata
=
d
.
data
[
0
];
d
ata
.
myname
=
this
.
loginService
.
user
.
username
;
this
.
matchResultD
ata
.
myname
=
this
.
loginService
.
user
.
username
;
});
});
await
lastValueFrom
(
await
lastValueFrom
(
...
@@ -773,17 +776,17 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
...
@@ -773,17 +776,17 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
}
}
})
})
).
then
((
data2
)
=>
{
).
then
((
data2
)
=>
{
d
ata
.
athletic_win
=
data2
.
athletic_win
;
this
.
matchResultD
ata
.
athletic_win
=
data2
.
athletic_win
;
d
ata
.
athletic_lose
=
data2
.
athletic_lose
;
this
.
matchResultD
ata
.
athletic_lose
=
data2
.
athletic_lose
;
d
ata
.
entertain_win
=
data2
.
entertain_win
;
this
.
matchResultD
ata
.
entertain_win
=
data2
.
entertain_win
;
d
ata
.
entertain_lose
=
data2
.
entertain_lose
;
this
.
matchResultD
ata
.
entertain_lose
=
data2
.
entertain_lose
;
d
ata
.
exp_rank
=
data2
.
exp_rank
;
this
.
matchResultD
ata
.
exp_rank
=
data2
.
exp_rank
;
d
ata
.
arena_rank
=
data2
.
arena_rank
;
this
.
matchResultD
ata
.
arena_rank
=
data2
.
arena_rank
;
d
ata
.
exp_rank_ex
=
exp_rank_ex
;
this
.
matchResultD
ata
.
exp_rank_ex
=
exp_rank_ex
;
d
ata
.
arena_rank_ex
=
arena_rank_ex
;
this
.
matchResultD
ata
.
arena_rank_ex
=
arena_rank_ex
;
// if (start_time !== data.start_time) {
// if (start_time !== data.start_time) {
// this.appsService.showResult('projects/ygopro-result/end_YGOPro_single.html', data, 202, 222);
// this.appsService.showResult('projects/ygopro-result/end_YGOPro_single.html', data, 202, 222);
this
.
ygoproMatchResultModal
.
show
();
// }
// }
});
});
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
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