Add support for PWA (#1005)
* Add logic for dynamically generating web manifest * Make PWA icon get autogenerated * Make service worker work * Tweak things for PWA * Handle apple icons and refactor * Update prod dockerfile * Remove jimp * Remove unnecessary option * Use different function syntax
This commit is contained in:
parent
c5fd084577
commit
b19b51c78c
15 changed files with 1074 additions and 226 deletions
|
|
@ -6,7 +6,7 @@ import {
|
|||
Websocket as WS,
|
||||
WebsocketBuilder,
|
||||
} from "websocket-ts";
|
||||
import { wsUri } from "../env";
|
||||
import { getWsUri } from "../env";
|
||||
import { isBrowser } from "../utils";
|
||||
|
||||
export class WebSocketService {
|
||||
|
|
@ -18,7 +18,7 @@ export class WebSocketService {
|
|||
let firstConnect = true;
|
||||
|
||||
this.subject = new Observable((obs: any) => {
|
||||
this.ws = new WebsocketBuilder(wsUri)
|
||||
this.ws = new WebsocketBuilder(getWsUri())
|
||||
.onMessage((_i, e) => {
|
||||
try {
|
||||
obs.next(JSON.parse(e.data.toString()));
|
||||
|
|
@ -27,7 +27,7 @@ export class WebSocketService {
|
|||
}
|
||||
})
|
||||
.onOpen(() => {
|
||||
console.log(`Connected to ${wsUri}`);
|
||||
console.log(`Connected to ${getWsUri()}`);
|
||||
|
||||
if (!firstConnect) {
|
||||
let res = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue