Преглед на файлове

gui: Pretty theme names

Audrius Butkevicius преди 9 години
родител
ревизия
4b6c2d0d3d
променени са 3 файла, в които са добавени 10 реда и са изтрити 4 реда
  1. 6 0
      gui/default/syncthing/core/syncthingController.js
  2. 3 3
      gui/default/syncthing/settings/settingsModalView.html
  3. 1 1
      lib/auto/gui.files.go

+ 6 - 0
gui/default/syncthing/core/syncthingController.js

@@ -1551,6 +1551,12 @@ angular.module('syncthing.core')
             return randomStringFromCharset(5, charset) + "-" + randomStringFromCharset(5, charset);
             return randomStringFromCharset(5, charset) + "-" + randomStringFromCharset(5, charset);
         };
         };
 
 
+        $scope.themeName = function (theme) {
+            return theme.replace('-', ' ').replace(/(?:^|\s)\S/g, function (a) {
+                return a.toUpperCase();
+            });
+        };
+
         // pseudo main. called on all definitions assigned
         // pseudo main. called on all definitions assigned
         initController();
         initController();
     });
     });

+ 3 - 3
gui/default/syncthing/settings/settingsModalView.html

@@ -139,9 +139,9 @@
 
 
             <div class="form-group" ng-if="system.themes.length > 1">
             <div class="form-group" ng-if="system.themes.length > 1">
               <label>GUI Theme</label>
               <label>GUI Theme</label>
-              <select class="form-control" ng-model="tmpGUI.theme" ng->
-                <option ng-repeat="theme in system.themes" value="{{ theme }}">
-                  {{ theme.charAt(0).toUpperCase() + theme.slice(1) }}
+              <select class="form-control" ng-model="tmpGUI.theme">
+                <option ng-repeat="theme in system.themes.sort()" value="{{ theme }}">
+                  {{ themeName(theme) }}
                 </option>
                 </option>
               </select>
               </select>
             </div>
             </div>

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
lib/auto/gui.files.go


Някои файлове не бяха показани, защото твърде много файлове са промени