This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit } from '@angular/core'; | |
| import { PlayerService } from '../player.service'; | |
| import io from 'socket.io-client'; | |
| import { environment } from '../../../environments/environment'; | |
| @Component({ | |
| selector: 'app-poker', | |
| templateUrl: './poker.component.html', | |
| styleUrls: ['./poker.component.scss'] | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { BehaviorSubject } from 'rxjs'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class PlayerService { | |
| private currentPlayerSource = new BehaviorSubject(0); // 0 is the default value | |
| currentPlayer = this.currentPlayerSource.asObservable(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| div { | |
| background-size: cover; | |
| background-position: center; | |
| background-color: rgb(199, 199, 199); | |
| overflow: hidden; | |
| box-sizing: border-box; | |
| width: 100px; | |
| height: 100px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| div { | |
| background-size: cover; | |
| background-position: center; | |
| background-color: rgb(199, 199, 199); | |
| overflow: hidden; | |
| box-sizing: border-box; | |
| width: 100px; | |
| height: 100px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <app-image | |
| [domClass]="'video-or-pic'" | |
| [imageUrl]="'https://picsum.photos/seed/'+currentUser.id+'1/500'" | |
| ></app-image> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div | |
| class="{{domClass}}" | |
| [ngStyle]="{'background-image':'url('+imageUrl+')'}" | |
| ></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, Input } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-image', | |
| templateUrl: './image.component.html', | |
| styleUrls: ['./image.component.scss'] | |
| }) | |
| export class ImageComponent implements OnInit { | |
| @Input() imageUrl: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, Input } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-image', | |
| templateUrl: './image.component.html', | |
| styleUrls: ['./image.component.scss'] | |
| }) | |
| export class ImageComponent implements OnInit { | |
| @Input() imageUrl: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, Input } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-image', | |
| templateUrl: './image.component.html', | |
| styleUrls: ['./image.component.scss'] | |
| }) | |
| export class ImageComponent implements OnInit { | |
| @Input() imageUrl: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class User < ApplicationRecord | |
| def anon_display_name | |
| if self.anonymous_user | |
| self.anonymous_user.display_name | |
| else | |
| nil | |
| end | |
| end |
NewerOlder