diff --git a/package-lock.json b/package-lock.json index 1b802937..7cd472e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5716,9 +5716,9 @@ } }, "node_modules/engine.io": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.0.tgz", - "integrity": "sha512-ErhZOVu2xweCjEfYcTdkCnEYUiZgkAcBBAhW4jbIvNG8SLU3orAqoJCiytZjYF7eTpVmmCrLDjLIEaPlUAs1uw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.1.tgz", + "integrity": "sha512-AyMc20q8JUUdvKd46+thc9o7yCZ6iC6MoBCChG5Z1XmFMpp+2+y/oKvwpZTUJB0KCjxScw1dV9c2h5pjiYBLuQ==", "dev": true, "dependencies": { "@types/cookie": "^0.4.1", @@ -6581,9 +6581,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz", - "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==", + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", + "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", "dev": true, "funding": [ { @@ -12925,9 +12925,9 @@ } }, "node_modules/selfsigned": { - "version": "1.10.11", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz", - "integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==", + "version": "1.10.14", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.14.tgz", + "integrity": "sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==", "dev": true, "dependencies": { "node-forge": "^0.10.0" @@ -19416,9 +19416,9 @@ } }, "engine.io": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.0.tgz", - "integrity": "sha512-ErhZOVu2xweCjEfYcTdkCnEYUiZgkAcBBAhW4jbIvNG8SLU3orAqoJCiytZjYF7eTpVmmCrLDjLIEaPlUAs1uw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.1.tgz", + "integrity": "sha512-AyMc20q8JUUdvKd46+thc9o7yCZ6iC6MoBCChG5Z1XmFMpp+2+y/oKvwpZTUJB0KCjxScw1dV9c2h5pjiYBLuQ==", "dev": true, "requires": { "@types/cookie": "^0.4.1", @@ -20050,9 +20050,9 @@ "dev": true }, "follow-redirects": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz", - "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==", + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", + "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", "dev": true }, "foreach": { @@ -24837,9 +24837,9 @@ } }, "selfsigned": { - "version": "1.10.11", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz", - "integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==", + "version": "1.10.14", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.14.tgz", + "integrity": "sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==", "dev": true, "requires": { "node-forge": "^0.10.0" diff --git a/src/app/module-blueprint/components/dialogs/dialog-about/dialog-about.component.html b/src/app/module-blueprint/components/dialogs/dialog-about/dialog-about.component.html index ca8802c7..c3d91470 100644 --- a/src/app/module-blueprint/components/dialogs/dialog-about/dialog-about.component.html +++ b/src/app/module-blueprint/components/dialogs/dialog-about/dialog-about.component.html @@ -18,7 +18,7 @@

What is this website ?

  • You can cycle between various overlays. each overlay will hightlight different buildings
  • You can save your blueprints
  • You can share your blueprints, by exporting png images for each overlay
  • -
  • Or by sharing a link that will directly open your blueprint! click here to open my SPOM in a new tab!
  • +
  • Or by sharing a link that will directly open your blueprint! click here to open my SPOM in a new tab!
  • diff --git a/src/app/module-blueprint/components/dialogs/dialog-share-url/dialog-share-url.component.ts b/src/app/module-blueprint/components/dialogs/dialog-share-url/dialog-share-url.component.ts index 644cd439..000e1020 100644 --- a/src/app/module-blueprint/components/dialogs/dialog-share-url/dialog-share-url.component.ts +++ b/src/app/module-blueprint/components/dialogs/dialog-share-url/dialog-share-url.component.ts @@ -17,7 +17,7 @@ export class DialogShareUrlComponent implements OnInit { get url() { return this.blueprintService.id != null ? - BlueprintService.baseUrl + 'b/' + this.blueprintService.id : '' + BlueprintService.baseUrl + '/b/' + this.blueprintService.id : '' } ngOnInit() { diff --git a/src/app/module-blueprint/services/blueprint-service.ts b/src/app/module-blueprint/services/blueprint-service.ts index ce7478f1..b0facf92 100644 --- a/src/app/module-blueprint/services/blueprint-service.ts +++ b/src/app/module-blueprint/services/blueprint-service.ts @@ -10,7 +10,7 @@ import * as yaml from 'node_modules/js-yaml/lib/js-yaml'; export class BlueprintService implements IObsBlueprintChange { //static baseUrl: string = 'blueprintnotincluded.com/'; - static baseUrl: string = 'https://blueprintnotincluded.com/'; + static baseUrl: string = location.origin; id: string; name: string; @@ -18,9 +18,9 @@ export class BlueprintService implements IObsBlueprintChange // TODO not sure getter setters are useful blueprint_: Blueprint; get blueprint() { return this.blueprint_; } - set blueprint(value: Blueprint) { + set blueprint(value: Blueprint) { this.blueprint_ = value; - //this.observersBlueprintChanged.map((observer) => { observer.blueprintChanged(this.blueprint_); }) + //this.observersBlueprintChanged.map((observer) => { observer.blueprintChanged(this.blueprint_); }) } thumbnail: string; thumbnailStyle: Display; @@ -92,7 +92,7 @@ export class BlueprintService implements IObsBlueprintChange let newBlueprint = new Blueprint(); this.name = templateJson.friendlyname; newBlueprint.importFromBni(templateJson); - + this.observersBlueprintChanged.map((observer) => { observer.blueprintChanged(newBlueprint); }) } @@ -106,7 +106,7 @@ export class BlueprintService implements IObsBlueprintChange { let newBlueprint = new Blueprint(); newBlueprint.importFromBinary(template); - + this.observersBlueprintChanged.map((observer) => { observer.blueprintChanged(newBlueprint); }) } @@ -130,7 +130,7 @@ export class BlueprintService implements IObsBlueprintChange reset() { this.id = null; this.likedByMe = false; - } + } suppressChanges: boolean; undoStates: MdbBlueprint[]; @@ -181,7 +181,7 @@ export class BlueprintService implements IObsBlueprintChange // If we are in the middle of the states, doing anythings scraps the further redos if (this.undoIndex < this.undoStates.length - 1) this.undoStates.splice(this.undoIndex + 1); - + let newState = this.blueprint.toMdbBlueprint(); /*if (this.undoStates.length > 0) { let oldState = this.undoStates[this.undoStates.length - 1]; @@ -191,8 +191,8 @@ export class BlueprintService implements IObsBlueprintChange } else */this.undoStates.push(newState); - - + + while (this.undoStates.length > 50) this.undoStates.splice(0, 1); @@ -250,10 +250,10 @@ export class BlueprintService implements IObsBlueprintChange return request; } - - getBlueprints(olderThan: Date, filterUserId: string, filterName: string, getDuplicates: boolean) { + + getBlueprints(olderThan: Date, filterUserId: string, filterName: string, getDuplicates: boolean) { let parameterOlderThan = 'olderthan='+olderThan.getTime().toString(); - + let parameterFilterUserId = ''; if (filterUserId != null) parameterFilterUserId = '&filterUserId='+filterUserId; @@ -265,7 +265,7 @@ export class BlueprintService implements IObsBlueprintChange let parameters = parameterOlderThan+parameterFilterUserId+parameterGetDuplicates+parameterFilterName; - let request = this.authService.isLoggedIn() ? + let request = this.authService.isLoggedIn() ? this.http.get('/api/getblueprintsSecure?'+parameters, { headers: { Authorization: `Bearer ${this.authService.getToken()}` }}) : this.http.get('/api/getblueprints?'+parameters) ; @@ -349,4 +349,4 @@ export interface ExportImageOptions { gridLines: boolean; selectedOverlays: Overlay[]; pixelsPerTile: number; -} \ No newline at end of file +}