Sfoglia il codice sorgente

[frontend] Update app

Dima 1 anno fa
parent
commit
d4452c534e

File diff suppressed because it is too large
+ 0 - 0
web/public/assets/index-a1413657.js


+ 1 - 1
web/public/index.html

@@ -6,7 +6,7 @@
     <title>Homethings</title>
     <link rel="icon" href="/assets/favicon-ef41fc5b.ico">
     
-  <script type="module" crossorigin src="/assets/index-7dfe232a.js"></script>
+  <script type="module" crossorigin src="/assets/index-a1413657.js"></script>
   <link rel="stylesheet" href="/assets/index-7639778d.css">
 </head>
 <body>

+ 5 - 1
web/src/client/client.js

@@ -56,7 +56,11 @@ export const routeUpdateNotification = "/api/v1/things/notifications/{thingId}"
 export const routeDeleteNotification = "/api/v1/things/notifications/{thingId}"
 
 export function getHost() {
-    return window.location.protocol + "//" + window.location.hostname + ":" + serverPort;
+    if (window.location.hostname === "localhost") {
+        return window.location.protocol + "//" + window.location.hostname + ":" + serverPort;
+    }
+
+    return window.location.protocol + "//" + window.location.hostname;
 }
 
 export function jsonRequest(method, url, data) {

Some files were not shown because too many files changed in this diff