Quellcode durchsuchen

Set title to include hostname if hostname is present

Christopher Mullins vor 6 Jahren
Ursprung
Commit
1799599ce9
2 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen
  1. 2 2
      dist/index.html.gz.h
  2. 6 0
      web/src/js/script.js

Datei-Diff unterdrückt, da er zu groß ist
+ 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) {