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
xiaoye
mycard
Commits
a295c6e8
Commit
a295c6e8
authored
Jul 27, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ygopro switch
parent
bc0b3261
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
src/app/app-detail/app-detail.component.html
src/app/app-detail/app-detail.component.html
+1
-1
src/app/ygopro/ygopro.component.ts
src/app/ygopro/ygopro.component.ts
+9
-3
No files found.
src/app/app-detail/app-detail.component.html
View file @
a295c6e8
...
...
@@ -67,7 +67,7 @@
</div>
<!--<button (click)="log(appsService)">test</button>-->
<network
*ngIf=
"currentApp && !currentApp.isYGOPro && currentApp.network && currentApp.network.protocol == 'maotama'"
[currentApp]=
"currentApp"
></network>
<ygopro
*ngIf=
"currentApp.isReady() && currentApp.isYGOPro"
[app]=
"currentApp"
[currentApp]=
"currentApp"
(points)=
"onPoints($event)"
></ygopro>
<ygopro
*ngIf=
"currentApp.isReady() && currentApp.isYGOPro"
[app]=
"currentApp"
(points)=
"onPoints($event)"
></ygopro>
</div>
</div>
...
...
src/app/ygopro/ygopro.component.ts
View file @
a295c6e8
...
...
@@ -10,9 +10,11 @@ import {
Inject
,
Input
,
LOCALE_ID
,
OnChanges
,
OnDestroy
,
OnInit
,
Output
,
SimpleChanges
,
ViewChild
}
from
'
@angular/core
'
;
import
{
clipboard
,
shell
}
from
'
electron
'
;
...
...
@@ -144,12 +146,18 @@ export class DeckAndCategory {
templateUrl
:
'
ygopro.component.html
'
,
styleUrls
:
[
'
ygopro.component.css
'
]
})
export
class
YGOProComponent
implements
OnInit
,
OnDestroy
,
AfterViewInit
{
export
class
YGOProComponent
implements
OnInit
,
OnDestroy
,
AfterViewInit
,
OnChanges
{
@
Input
()
app
:
App
;
@
Input
()
currentApp
:
App
;
async
ngOnChanges
(
changes
:
SimpleChanges
)
{
if
(
changes
.
app
&&
changes
.
app
.
previousValue
&&
changes
.
app
.
currentValue
!==
changes
.
app
.
previousValue
)
{
await
this
.
refreshYGOProData
()
}
}
@
Output
()
points
:
EventEmitter
<
any
>
=
new
EventEmitter
();
decks
:
DeckAndCategory
[]
=
[];
...
...
@@ -340,9 +348,7 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit {
ygoproData
:
YGOProData
;
async
refreshYGOProData
()
{
console
.
log
(
`Refreshing YGOPro Data.`
);
this
.
ygoproData
=
this
.
getYGOProData
(
this
.
app
);
console
.
log
(
JSON
.
stringify
(
this
.
ygoproData
))
this
.
servers
=
this
.
ygoproData
.
servers
;
this
.
selectableServers
=
this
.
servers
.
filter
((
s
)
=>
!
s
.
hidden
);
this
.
currentServer
=
this
.
selectableServers
[
0
];
...
...
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