Compare commits
No commits in common. "4e457268d59f5e8e8d7ea8dd7086501fa2c8b903" and "3076900a0778cdd135fe5660a53078474a2224ed" have entirely different histories.
4e457268d5
...
3076900a07
@ -27,11 +27,6 @@
|
|||||||
"assets": [
|
"assets": [
|
||||||
"src/favicon.ico",
|
"src/favicon.ico",
|
||||||
"src/assets",
|
"src/assets",
|
||||||
{
|
|
||||||
"glob": "**/*",
|
|
||||||
"input": "node_modules/@taiga-ui/icons/src",
|
|
||||||
"output": "assets/taiga-ui/icons"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"glob": "**/*",
|
"glob": "**/*",
|
||||||
"input": "node_modules/@taiga-ui/icons/src",
|
"input": "node_modules/@taiga-ui/icons/src",
|
||||||
|
88
package-lock.json
generated
88
package-lock.json
generated
@ -32,7 +32,6 @@
|
|||||||
"@angular-devkit/build-angular": "^14.1.3",
|
"@angular-devkit/build-angular": "^14.1.3",
|
||||||
"@angular/cli": "~14.1.3",
|
"@angular/cli": "~14.1.3",
|
||||||
"@angular/compiler-cli": "^14.1.0",
|
"@angular/compiler-cli": "^14.1.0",
|
||||||
"@schematics/angular": "^14.2.6",
|
|
||||||
"@types/dompurify": "2.2.3",
|
"@types/dompurify": "2.2.3",
|
||||||
"@types/jasmine": "~4.0.0",
|
"@types/jasmine": "~4.0.0",
|
||||||
"jasmine-core": "~4.2.0",
|
"jasmine-core": "~4.2.0",
|
||||||
@ -462,22 +461,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@angular/cli/node_modules/@schematics/angular": {
|
|
||||||
"version": "14.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.1.3.tgz",
|
|
||||||
"integrity": "sha512-hhH4MGfBD1oxrd9PFZwgaqXAT9dYTK/6AtoIcr40OwEbnS5ZoZwzrgb0OOT2NW3bmL0dg3YeJei3Sf89hlI5eg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@angular-devkit/core": "14.1.3",
|
|
||||||
"@angular-devkit/schematics": "14.1.3",
|
|
||||||
"jsonc-parser": "3.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^14.15.0 || >=16.10.0",
|
|
||||||
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
||||||
"yarn": ">= 1.13.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@angular/cli/node_modules/rxjs": {
|
"node_modules/@angular/cli/node_modules/rxjs": {
|
||||||
"version": "6.6.7",
|
"version": "6.6.7",
|
||||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
|
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
|
||||||
@ -2859,13 +2842,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@schematics/angular": {
|
"node_modules/@schematics/angular": {
|
||||||
"version": "14.2.6",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.1.3.tgz",
|
||||||
"integrity": "sha512-oeyMAQr3Q9nvAX+5FRgXcTMX9lqqenElBmAuwfqqdB0qD1jmkJ8TpWRuvYVA/931njpIwhfyLrzmzeNnJb23Sg==",
|
"integrity": "sha512-hhH4MGfBD1oxrd9PFZwgaqXAT9dYTK/6AtoIcr40OwEbnS5ZoZwzrgb0OOT2NW3bmL0dg3YeJei3Sf89hlI5eg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/core": "14.2.6",
|
"@angular-devkit/core": "14.1.3",
|
||||||
"@angular-devkit/schematics": "14.2.6",
|
"@angular-devkit/schematics": "14.1.3",
|
||||||
"jsonc-parser": "3.1.0"
|
"jsonc-parser": "3.1.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -2874,22 +2857,30 @@
|
|||||||
"yarn": ">= 1.13.0"
|
"yarn": ">= 1.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@schematics/angular/node_modules/@angular-devkit/schematics": {
|
"node_modules/@schematics/angular/node_modules/@angular-devkit/core": {
|
||||||
"version": "14.2.6",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-14.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-14.1.3.tgz",
|
||||||
"integrity": "sha512-mSFtc4M49mWrYsgJx/P6bA6SzXb8SeZqmppKRMoEQxiXI1bwFdGLNWzAmzEsGvS96h/nPIaOfcX5cKJSp++4FA==",
|
"integrity": "sha512-YBxhRl7hKgirjcKeurfejVrIgmw31GcfKKCyQiIudoLCYjonnSMdDEx2y8BNMANvxe5YmuZsIYJtgVlqp3mMDg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/core": "14.2.6",
|
"ajv": "8.11.0",
|
||||||
|
"ajv-formats": "2.1.1",
|
||||||
"jsonc-parser": "3.1.0",
|
"jsonc-parser": "3.1.0",
|
||||||
"magic-string": "0.26.2",
|
"rxjs": "6.6.7",
|
||||||
"ora": "5.4.1",
|
"source-map": "0.7.4"
|
||||||
"rxjs": "6.6.7"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.15.0 || >=16.10.0",
|
"node": "^14.15.0 || >=16.10.0",
|
||||||
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
||||||
"yarn": ">= 1.13.0"
|
"yarn": ">= 1.13.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"chokidar": "^3.5.2"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"chokidar": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@schematics/angular/node_modules/rxjs": {
|
"node_modules/@schematics/angular/node_modules/rxjs": {
|
||||||
@ -12061,17 +12052,6 @@
|
|||||||
"source-map": "0.7.4"
|
"source-map": "0.7.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@schematics/angular": {
|
|
||||||
"version": "14.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.1.3.tgz",
|
|
||||||
"integrity": "sha512-hhH4MGfBD1oxrd9PFZwgaqXAT9dYTK/6AtoIcr40OwEbnS5ZoZwzrgb0OOT2NW3bmL0dg3YeJei3Sf89hlI5eg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@angular-devkit/core": "14.1.3",
|
|
||||||
"@angular-devkit/schematics": "14.1.3",
|
|
||||||
"jsonc-parser": "3.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rxjs": {
|
"rxjs": {
|
||||||
"version": "6.6.7",
|
"version": "6.6.7",
|
||||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
|
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
|
||||||
@ -13631,27 +13611,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@schematics/angular": {
|
"@schematics/angular": {
|
||||||
"version": "14.2.6",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.1.3.tgz",
|
||||||
"integrity": "sha512-oeyMAQr3Q9nvAX+5FRgXcTMX9lqqenElBmAuwfqqdB0qD1jmkJ8TpWRuvYVA/931njpIwhfyLrzmzeNnJb23Sg==",
|
"integrity": "sha512-hhH4MGfBD1oxrd9PFZwgaqXAT9dYTK/6AtoIcr40OwEbnS5ZoZwzrgb0OOT2NW3bmL0dg3YeJei3Sf89hlI5eg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@angular-devkit/core": "14.2.6",
|
"@angular-devkit/core": "14.1.3",
|
||||||
"@angular-devkit/schematics": "14.2.6",
|
"@angular-devkit/schematics": "14.1.3",
|
||||||
"jsonc-parser": "3.1.0"
|
"jsonc-parser": "3.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/schematics": {
|
"@angular-devkit/core": {
|
||||||
"version": "14.2.6",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-14.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-14.1.3.tgz",
|
||||||
"integrity": "sha512-mSFtc4M49mWrYsgJx/P6bA6SzXb8SeZqmppKRMoEQxiXI1bwFdGLNWzAmzEsGvS96h/nPIaOfcX5cKJSp++4FA==",
|
"integrity": "sha512-YBxhRl7hKgirjcKeurfejVrIgmw31GcfKKCyQiIudoLCYjonnSMdDEx2y8BNMANvxe5YmuZsIYJtgVlqp3mMDg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@angular-devkit/core": "14.2.6",
|
"ajv": "8.11.0",
|
||||||
|
"ajv-formats": "2.1.1",
|
||||||
"jsonc-parser": "3.1.0",
|
"jsonc-parser": "3.1.0",
|
||||||
"magic-string": "0.26.2",
|
"rxjs": "6.6.7",
|
||||||
"ora": "5.4.1",
|
"source-map": "0.7.4"
|
||||||
"rxjs": "6.6.7"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rxjs": {
|
"rxjs": {
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
"@angular/cli": "~14.1.3",
|
"@angular/cli": "~14.1.3",
|
||||||
"@angular/compiler-cli": "^14.1.0",
|
"@angular/compiler-cli": "^14.1.0",
|
||||||
"@schematics/angular": "^14.2.6",
|
"@schematics/angular": "^14.2.6",
|
||||||
"@types/dompurify": "2.2.3",
|
|
||||||
"@types/jasmine": "~4.0.0",
|
"@types/jasmine": "~4.0.0",
|
||||||
"jasmine-core": "~4.2.0",
|
"jasmine-core": "~4.2.0",
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
import { GetVersion, GetVersionCallbackDetail, RunGame } from './services/go';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@ -16,10 +17,10 @@ export class AppComponent {
|
|||||||
if (!(event instanceof CustomEvent<string>)) return;
|
if (!(event instanceof CustomEvent<string>)) return;
|
||||||
this.version = event.detail;
|
this.version = event.detail;
|
||||||
});
|
});
|
||||||
//GetVersion();
|
GetVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
RunGame() {
|
RunGame() {
|
||||||
//RunGame();
|
RunGame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,15 +10,16 @@ import {
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppRoutingModule } from './modules/app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
import { GamesBarComponent } from './games-bar/games-bar.component';
|
||||||
|
import { GameButtonComponent } from './games-bar/game-button/game-button.component';
|
||||||
import { TuiAvatarModule } from "@taiga-ui/kit";
|
import { TuiAvatarModule } from "@taiga-ui/kit";
|
||||||
import { GamesBarModule } from "./components/games-bar/games-bar.module";
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent, GamesBarComponent, GameButtonComponent],
|
||||||
imports: [BrowserModule, AppRoutingModule, BrowserAnimationsModule, TuiRootModule, TuiDialogModule, TuiAlertModule, TuiButtonModule, TuiAvatarModule, GamesBarModule],
|
imports: [BrowserModule, AppRoutingModule, BrowserAnimationsModule, TuiRootModule, TuiDialogModule, TuiAlertModule, TuiButtonModule, TuiAvatarModule],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: APP_BASE_HREF, useValue: '/' },
|
{ provide: APP_BASE_HREF, useValue: '/' },
|
||||||
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
||||||
|
@ -1,20 +1,2 @@
|
|||||||
<h1>{{game.title}}</h1>
|
<h1>{{game.title}}</h1>
|
||||||
<p>{{game.description}}</p>
|
<p>{{game.description}}</p>
|
||||||
<ng-template #icon>
|
|
||||||
<tui-avatar
|
|
||||||
size="xs"
|
|
||||||
[rounded]="true"
|
|
||||||
[avatarUrl]="'http://jpg.jpg'"
|
|
||||||
></tui-avatar>
|
|
||||||
</ng-template>
|
|
||||||
|
|
||||||
<button
|
|
||||||
tuiButton
|
|
||||||
type="button"
|
|
||||||
appearance="primary"
|
|
||||||
[icon]="icon"
|
|
||||||
class="tui-space_right-3 tui-space_bottom-3"
|
|
||||||
(click)= "runGame()"
|
|
||||||
>
|
|
||||||
<ng-content></ng-content>
|
|
||||||
</button>
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { Game } from 'src/app/interfaces/game.interface';
|
import { Game } from 'src/app/interfaces/game.interface';
|
||||||
import {TuiButtonModule} from '@taiga-ui/core';
|
|
||||||
import { LauncherService } from 'src/app/services/launcher.service';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-game-info[game]',
|
selector: 'app-game-info[game]',
|
||||||
@ -11,12 +9,7 @@ import { LauncherService } from 'src/app/services/launcher.service';
|
|||||||
export class GameInfoComponent implements OnInit {
|
export class GameInfoComponent implements OnInit {
|
||||||
@Input() game!: Game;
|
@Input() game!: Game;
|
||||||
|
|
||||||
constructor(private launcher: LauncherService) {}
|
constructor() {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
|
||||||
runGame(){
|
|
||||||
//console.log("hello")
|
|
||||||
this.launcher.RunGame(this.game)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -21,9 +21,6 @@ export class GamesBarComponent implements OnInit {
|
|||||||
GetGames().then((value) => {
|
GetGames().then((value) => {
|
||||||
console.log(value);
|
console.log(value);
|
||||||
this.games = value;
|
this.games = value;
|
||||||
if (this.games.length > 0){
|
|
||||||
this.activeGame = 0
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,10 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { GamesBarComponent } from './games-bar.component';
|
import { GamesBarComponent } from './games-bar.component';
|
||||||
import { GameItemComponent } from './game-item/game-item.component';
|
import { GameItemComponent } from './game-item/game-item.component';
|
||||||
import { GameInfoComponent } from './game-info/game-info.component';
|
import { GameInfoComponent } from './game-info/game-info.component';
|
||||||
import {TuiButtonModule} from '@taiga-ui/core';
|
|
||||||
import { TuiAvatarComponent, TuiAvatarModule } from '@taiga-ui/kit';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [GamesBarComponent, GameItemComponent, GameInfoComponent],
|
declarations: [GamesBarComponent, GameItemComponent, GameInfoComponent],
|
||||||
imports: [CommonModule,TuiButtonModule, TuiAvatarModule],
|
imports: [CommonModule],
|
||||||
exports: [GamesBarComponent, GameItemComponent, GameInfoComponent],
|
exports: [GamesBarComponent, GameItemComponent, GameInfoComponent],
|
||||||
})
|
})
|
||||||
export class GamesBarModule {}
|
export class GamesBarModule {}
|
||||||
|
@ -3,5 +3,4 @@ export interface Game {
|
|||||||
title: string;
|
title: string;
|
||||||
image: string;
|
image: string;
|
||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,14 +2,13 @@ import { Game } from '../interfaces/game.interface';
|
|||||||
|
|
||||||
export interface Go extends Window {
|
export interface Go extends Window {
|
||||||
GetGames: () => Promise<Game[]>;
|
GetGames: () => Promise<Game[]>;
|
||||||
GoRunGame: (gameId: number) => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GoCallback extends Window {
|
export interface GoCallback extends Window {
|
||||||
SetVersion: (value: string) => void;
|
SetVersion: (value: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
let { GetGames, GoRunGame } = window as unknown as Go;
|
let { GetGames } = window as unknown as Go;
|
||||||
let { SetVersion } = window as unknown as GoCallback;
|
let { SetVersion } = window as unknown as GoCallback;
|
||||||
|
|
||||||
let w = window as unknown as GoCallback;
|
let w = window as unknown as GoCallback;
|
||||||
@ -30,4 +29,4 @@ let w = window as unknown as GoCallback;
|
|||||||
// document.dispatchEvent(event);
|
// document.dispatchEvent(event);
|
||||||
// };
|
// };
|
||||||
|
|
||||||
export { GetGames, SetVersion, GoRunGame };
|
export { GetGames, SetVersion };
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Game } from '../interfaces/game.interface';
|
import { Game } from './oxana.service';
|
||||||
import { GoRunGame } from './go';
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
@ -8,13 +7,13 @@ export class LauncherService {
|
|||||||
|
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
// public GetGames(): Game[]{
|
public GetGames(): Game[]{
|
||||||
// var currentGames :Game[]
|
var currentGames :Game[] = [
|
||||||
// return currentGames
|
{ name: "ad", icon: "string", id: "string"},
|
||||||
// }
|
{ name: "qwet", icon: "string", id: "string"},
|
||||||
|
{ name: "1233", icon: "string", id: "string"},
|
||||||
public RunGame(game: Game){
|
{ name: "ghjghj", icon: "string", id: "string"}
|
||||||
//console.log(game)
|
]
|
||||||
GoRunGame(game.id)
|
return currentGames
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { LauncherService } from './launcher.service';
|
import { LauncherService } from './launcher.service';
|
||||||
import { Game } from '../interfaces/game.interface';
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@ -17,3 +16,8 @@ export class OxanaService {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Game {
|
||||||
|
name: string
|
||||||
|
icon: string
|
||||||
|
id: string
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user