diff --git a/src/app/adjectives.ts b/src/app/adjectives.ts index fdba473..0eb5a0a 100644 --- a/src/app/adjectives.ts +++ b/src/app/adjectives.ts @@ -1,6 +1,6 @@ export const Adjectives = [ 'Strict', - 'poor', + 'Poor', 'Old', 'Hot', 'Huge', diff --git a/src/app/services/sync.service.ts b/src/app/services/sync.service.ts index bbfe8d4..b7b76fa 100644 --- a/src/app/services/sync.service.ts +++ b/src/app/services/sync.service.ts @@ -98,11 +98,10 @@ export class SyncService { load(mapCode: string, username: string) { this.mapCode = mapCode; - this.username = username; + this.username = username.replace(/\s/g, ''); this.mapDoc = this.db.collection(MAP_COLLECTION).doc(mapCode); this.locationDoc = this.mapDoc.collection(LOCATION_COLLECTION).doc(username); - this.mapSub = combineLatest(this.mapDoc.valueChanges(), this.mapDoc.collection(LOCATION_COLLECTION, ref => { let aMinuteAgo = new Date(); aMinuteAgo.setMinutes(aMinuteAgo.getMinutes() - 1); diff --git a/src/app/views/map/map.component.ts b/src/app/views/map/map.component.ts index b8ee831..6c3d666 100644 --- a/src/app/views/map/map.component.ts +++ b/src/app/views/map/map.component.ts @@ -1,4 +1,4 @@ -import {Component, isDevMode, OnDestroy, OnInit} from "@angular/core"; +import {Component, OnDestroy, OnInit} from "@angular/core"; import {PhysicsService} from "../../services/physics.service"; import {filter, finalize, skip, take} from "rxjs/operators"; import {MatBottomSheet, MatSnackBar} from "@angular/material"; @@ -12,7 +12,7 @@ import {ActivatedRoute} from "@angular/router"; import {DimensionsDialogComponent} from "../../components/dimensionsDialog/dimensionsDialog.component"; import {MatDialog} from "@angular/material/dialog"; import {SyncService} from "../../services/sync.service"; -import {MapData, MapSymbol, Marker} from "../../models/mapSymbol"; +import {MapData, Marker} from "../../models/mapSymbol"; import {Adjectives} from "../../adjectives"; import {Nouns} from "../../nounes"; import {EditSymbolComponent} from "../../components/editSymbol/editSymbol.component"; @@ -44,7 +44,7 @@ export class MapComponent implements OnDestroy, OnInit { constructor(public physicsService: PhysicsService, public syncService: SyncService, private snackBar: MatSnackBar, private bottomSheet: MatBottomSheet, private dialog: MatDialog, private route: ActivatedRoute) { this.name = localStorage.getItem('callSign'); if(!this.name) { - this.name = Adjectives[Math.floor(Math.random() * Adjectives.length)] + Nouns[Math.floor(Math.random() * Nouns.length)]; + this.name = Adjectives[Math.floor(Math.random() * Adjectives.length)] + ' ' + Nouns[Math.floor(Math.random() * Nouns.length)]; localStorage.setItem('callSign', this.name); }