Explorar o código

gui: Make icons and directory information in local device summary consistent with folders (fixes #4100)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4200
snugghash %!s(int64=8) %!d(string=hai) anos
pai
achega
3395992abd

+ 6 - 1
gui/default/index.html

@@ -496,7 +496,12 @@
                   </tr>
                   </tr>
                   <tr>
                   <tr>
                     <th><span class="fa fa-fw fa-home"></span>&nbsp;<span translate>Local State (Total)</span></th>
                     <th><span class="fa fa-fw fa-home"></span>&nbsp;<span translate>Local State (Total)</span></th>
-                    <td class="text-right">{{localStateTotal.files | alwaysNumber}} <span translate>items</span>, ~{{localStateTotal.bytes | binary}}B</td>
+                    <td class="text-right">
+                        <span tooltip data-original-title="{{localStateTotal.files | alwaysNumber}} {{'files' | translate}}, {{ localStateTotal.directories | alwaysNumber}} {{'directories' | translate}}, ~{{ localStateTotal.bytes | binary}}B">
+                        <span class="fa fa-files-o"></span>&nbsp;{{localStateTotal.files | alwaysNumber}}&ensp;
+                        <span class="fa fa-folder-o"></span>&nbsp;{{localStateTotal.directories| alwaysNumber}}&ensp;
+                        <span class="fa fa-hdd-o"></span>&nbsp;~{{localStateTotal.bytes | binary}}B
+                    </td>
                   </tr>
                   </tr>
                   <tr>
                   <tr>
                     <th><span class="fa fa-fw fa-th"></span>&nbsp;<span translate>RAM Utilization</span></th>
                     <th><span class="fa fa-fw fa-th"></span>&nbsp;<span translate>RAM Utilization</span></th>

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

@@ -79,6 +79,7 @@ angular.module('syncthing.core')
 
 
         $scope.localStateTotal = {
         $scope.localStateTotal = {
             bytes: 0,
             bytes: 0,
+            directories: 0,
             files: 0
             files: 0
         };
         };
 
 
@@ -448,12 +449,14 @@ angular.module('syncthing.core')
         function recalcLocalStateTotal () {
         function recalcLocalStateTotal () {
             $scope.localStateTotal = {
             $scope.localStateTotal = {
                 bytes: 0,
                 bytes: 0,
+                directories: 0,
                 files: 0
                 files: 0
             };
             };
 
 
             for (var f in $scope.model) {
             for (var f in $scope.model) {
                $scope.localStateTotal.bytes += $scope.model[f].localBytes;
                $scope.localStateTotal.bytes += $scope.model[f].localBytes;
                $scope.localStateTotal.files += $scope.model[f].localFiles;
                $scope.localStateTotal.files += $scope.model[f].localFiles;
+               $scope.localStateTotal.directories += $scope.model[f].localDirectories;
             }
             }
         }
         }