Sfoglia il codice sorgente

Set title to include hostname if hostname is present

Christopher Mullins 6 anni fa
parent
commit
1799599ce9
2 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  1. 2 2
      dist/index.html.gz.h
  2. 6 0
      web/src/js/script.js

File diff suppressed because it is too large
+ 2 - 2
dist/index.html.gz.h


+ 6 - 0
web/src/js/script.js

@@ -584,6 +584,12 @@ var loadSettings = function() {
       }
     });
 
+    if (val.hostname) {
+      var title = "MiLight Hub: " + val.hostname;
+      document.title = title;
+      $('.navbar-brand').html(title);
+    }
+
     if (val.group_id_aliases) {
       aliasesSelectize.clearOptions();
       Object.entries(val.group_id_aliases).forEach(function(entry) {