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
4966752b
Commit
4966752b
authored
Sep 21, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
so far
parent
00ea1b2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
7 deletions
+36
-7
src/app/ygopro/ygopro.component.html
src/app/ygopro/ygopro.component.html
+15
-0
src/app/ygopro/ygopro.component.ts
src/app/ygopro/ygopro.component.ts
+21
-7
No files found.
src/app/ygopro/ygopro.component.html
View file @
4966752b
...
...
@@ -354,3 +354,18 @@
</div>
</div>
</div>
<!-- Modal -->
<div
#resultModal
class=
"modal fade"
id=
"staticBackdrop"
data-bs-backdrop=
"static"
data-bs-keyboard=
"false"
tabindex=
"-1"
aria-labelledby=
"staticBackdropLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"staticBackdropLabel"
>
Modal title
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
<div
class=
"modal-body"
>
...
</div>
</div>
</div>
</div>
src/app/ygopro/ygopro.component.ts
View file @
4966752b
...
...
@@ -30,6 +30,7 @@ import { HttpClient } from '@angular/common/http';
import
{
lastValueFrom
,
Subscription
}
from
'
rxjs
'
;
import
WillNavigateEvent
=
Electron
.
WillNavigateEvent
;
import
Timer
=
NodeJS
.
Timer
;
import
{
Modal
}
from
'
bootstrap
'
;
interface
SystemConf
{
use_d3d
:
string
;
...
...
@@ -151,6 +152,11 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
@
ViewChild
(
'
youtube
'
)
youtube
:
ElementRef
;
@
ViewChild
(
'
resultModal
'
)
resultModal
:
ElementRef
<
HTMLElement
>
;
ygoproMatchResultModel
:
Modal
;
// points: Points;
servers
:
Server
[];
selectableServers
:
Server
[];
...
...
@@ -162,7 +168,7 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
/*reloadCurrentServer() {
this.currentServer = this.servers.find(s => s.id === this.selectingServerId);
}*/
lastDeckFormat
:
RegExp
;
lastDeckFormat
?
:
RegExp
;
default_options
:
Options
=
{
mode
:
1
,
rule
:
this
.
locale
.
startsWith
(
'
zh
'
)
?
0
:
1
,
...
...
@@ -314,7 +320,8 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
return
ygoproData
;
}
async
ngOnInit
()
{
async
refreshYGOProData
()
{
console
.
log
(
`Refreshing YGOPro Data.`
);
const
ygoproData
=
this
.
getYGOProData
(
this
.
app
);
this
.
servers
=
ygoproData
.
servers
;
this
.
selectableServers
=
this
.
servers
.
filter
((
s
)
=>
!
s
.
hidden
);
...
...
@@ -324,16 +331,22 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
if
(
ygoproData
.
ygopro
.
lastDeckFormat
)
{
// console.log(`Deck format pattern: ${ygoproData.ygopro.lastDeckFormat}`)
this
.
lastDeckFormat
=
new
RegExp
(
ygoproData
.
ygopro
.
lastDeckFormat
);
}
else
{
this
.
lastDeckFormat
=
undefined
;
}
this
.
system_conf
=
this
.
app
.
systemConfPath
;
console
.
log
(
`Will load system conf file from
${
this
.
system_conf
}
`
);
await
this
.
refresh
(
true
);
}
async
ngOnInit
()
{
this
.
ygoproMatchResultModel
=
new
Modal
(
this
.
resultModal
.
nativeElement
,
{
keyboard
:
false
})
await
this
.
refreshYGOProData
();
remote
.
ipcMain
.
on
(
'
YGOPro
'
,
(
e
:
any
,
type
:
string
)
=>
{
console
.
log
(
'
rrrrr
'
);
this
.
request_match
(
type
);
});
this
.
system_conf
=
this
.
app
.
systemConfPath
;
console
.
log
(
`Will load system conf file from
${
this
.
system_conf
}
`
);
await
this
.
refresh
(
true
);
}
ngAfterViewInit
()
{
...
...
@@ -711,7 +724,8 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
data
.
exp_rank_ex
=
exp_rank_ex
;
data
.
arena_rank_ex
=
arena_rank_ex
;
// 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);
// }
});
}
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