Add method to run session
This commit is contained in:
parent
c068b91a73
commit
49a362ef89
@ -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>
|
||||||
|
@ -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")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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 };
|
||||||
|
Loading…
Reference in New Issue
Block a user