Merge remote-tracking branch 'origin/main'

This commit is contained in:
svensken 2022-11-04 03:46:04 +03:00
commit 8456ab78e9
3 changed files with 9 additions and 3 deletions

View File

@ -6,7 +6,7 @@
<div class="head-subtitle">Session page will be here</div> <div class="head-subtitle">Session page will be here</div>
</div> </div>
<div class="section-content"> <div class="section-content">
<skirda-button> <skirda-button (click)="RunSession()" >
<skirda-icon name="play" size="16"></skirda-icon> <skirda-icon name="play" size="16"></skirda-icon>
Run session Run session
</skirda-button> </skirda-button>

View File

@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { GoRunSession } from 'src/app/services/go';
@Component({ @Component({
selector: 'app-session-page', selector: 'app-session-page',
@ -12,4 +13,8 @@ export class SessionPageComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
} }
RunSession(){
GoRunSession("gmod-test")
}
} }

View File

@ -5,6 +5,7 @@ export interface Go extends Window {
GoGetGames: () => Promise<Game[]>; GoGetGames: () => Promise<Game[]>;
GoGetSessions: () => Promise<Session[]> GoGetSessions: () => Promise<Session[]>
GoRunGame: (gameId: string) => void; GoRunGame: (gameId: string) => void;
GoRunSession: (sessionId: string) => void;
GoWebViewInit: () => void; GoWebViewInit: () => void;
} }
@ -13,7 +14,7 @@ export interface GoCallback extends Window {
GoChangeRoute: (value: string) => void; GoChangeRoute: (value: string) => void;
} }
let { GoGetGames, GoRunGame, GoGetSessions, GoWebViewInit } = window as unknown as Go; let { GoGetGames, GoRunGame, GoGetSessions, GoRunSession, GoWebViewInit } = window as unknown as Go;
let { SetVersion, GoChangeRoute } = window as unknown as GoCallback; let { SetVersion, GoChangeRoute } = window as unknown as GoCallback;
let w = window as unknown as GoCallback; let w = window as unknown as GoCallback;
@ -36,4 +37,4 @@ let w = window as unknown as GoCallback;
document.dispatchEvent(event); document.dispatchEvent(event);
}; };
export { GoGetGames, GoGetSessions, SetVersion, GoRunGame, GoChangeRoute, GoWebViewInit }; export { GoGetGames, GoGetSessions, SetVersion, GoRunGame, GoChangeRoute, GoWebViewInit, GoRunSession };