Compare commits
No commits in common. "b8ba97cb2e8f10e2a0111e1e81f191afcbb9994a" and "1e7a347c83d23101a2e2063dfd467b60ecc8c085" have entirely different histories.
b8ba97cb2e
...
1e7a347c83
@ -7,5 +7,6 @@
|
||||
</div>
|
||||
<skirda-text>description</skirda-text>
|
||||
</div>
|
||||
<skirda-icon *ngIf="!collapsed" name="play" size="24" (click)="run(game)" color="var(--sk-primary-accent)"></skirda-icon>
|
||||
</div>
|
||||
</a>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<skirda-section-label *ngIf="!collapsed">
|
||||
Games <div class="count">{{games.length}}</div>
|
||||
Pinned games <div class="count">{{games.length}}</div>
|
||||
</skirda-section-label>
|
||||
<skirda-icon name="library" size="20" *ngIf="collapsed"></skirda-icon>
|
||||
<div class="games">
|
||||
|
@ -47,7 +47,7 @@
|
||||
<!-- 6. Вызываем в нужном месте (в html компонента) открытие попап окна и передаем в метод из ts шаблон
|
||||
(название переменной popupContent должно совпадать с аттрибутом
|
||||
у описанного шаблона из пункта 2 (<ng-template #popupContent>)) -->
|
||||
<skirda-button size="large" appearance="primary" (click)="run(game)">
|
||||
<skirda-button size="large" appearance="primary" (click)="openPopup(popupContent)">
|
||||
<skirda-icon name="play" size="32"></skirda-icon>
|
||||
<skirda-heading size="1">Play</skirda-heading>
|
||||
</skirda-button>
|
||||
|
@ -5,7 +5,6 @@ import { PopupService } from 'projects/ui/src/lib/popup/popup.service'
|
||||
import { Subscription } from 'rxjs'
|
||||
import { Game } from 'src/app/interfaces/game.interface'
|
||||
import { UiService } from 'src/app/services/ui.service'
|
||||
import { LauncherService } from 'src/app/services/launcher.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-game-page',
|
||||
@ -44,17 +43,10 @@ export class GamePageComponent implements OnInit, OnDestroy {
|
||||
constructor(
|
||||
private router: Router,
|
||||
|
||||
private launcher: LauncherService,
|
||||
|
||||
// 4. Импортировать сервис для попап окон
|
||||
private popup: PopupService
|
||||
) {}
|
||||
|
||||
run(game: Game) {
|
||||
//console.log('Game to run ' + game.title)
|
||||
this.launcher.RunGame(game)
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.observeNavigation()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user