Browse Source

Folder/device panel header with progress indicator

Ben Schulz 11 years ago
parent
commit
4ff211662a
3 changed files with 20 additions and 4 deletions
  1. 1 0
      AUTHORS
  2. 16 4
      gui/assets/css/overrides.css
  3. 3 0
      gui/index.html

+ 1 - 0
AUTHORS

@@ -5,6 +5,7 @@ Alexander Graf <[email protected]>
 Andrew Dunham <[email protected]>
 Audrius Butkevicius <[email protected]>
 Arthur Axel fREW Schmidt <[email protected]> <[email protected]>
+Ben Schulz <[email protected]>
 Ben Sidhom <[email protected]>
 Brandon Philips <[email protected]>
 Caleb Callaway <[email protected]>

+ 16 - 4
gui/assets/css/overrides.css

@@ -28,6 +28,19 @@ ul+h5 {
     margin-top: 1.5em;
 }
 
+.panel-progress {
+    background: #3498db;
+    height: 3px;
+    left: 0;
+    position: absolute;
+    top: 0;
+    display: block;
+}
+
+.panel-title {
+    position: relative;
+}
+
 identicon {
     display: inline-block;
     position: relative;
@@ -46,15 +59,14 @@ identicon {
 }
 
 .identicon {
-    width: 30px;
-    height: 30px;
+    width: 20px;
+    height: 20px;
 }
 
 .panel-heading .identicon {
     display: block;
     position: absolute;
-    top: -4px;
-    left: -9px;
+    top: 1px;
 }
 
 .panel-heading {

+ 3 - 0
gui/index.html

@@ -91,6 +91,7 @@
         <div class="panel-group" id="folders">
           <div class="panel panel-default" ng-repeat="folder in folderList()">
             <div class="panel-heading" data-toggle="collapse" data-parent="#folders" href="#folder-{{$index}}" style="cursor: pointer">
+              <div class="panel-progress" ng-show="folderStatus(folder) == 'syncing'" ng-attr-style="width: {{syncPercentage(folder.ID)}}%"></div>
               <h3 class="panel-title">
                 <span class="glyphicon glyphicon-hdd"></span>&emsp;{{folder.ID}}
                 <span class="pull-right hidden-xs text-{{folderClass(folder)}}" ng-switch="folderStatus(folder)">
@@ -232,6 +233,7 @@
         <div class="panel-group" id="devices">
           <div class="panel panel-default" ng-repeat="deviceCfg in otherDevices()">
             <div class="panel-heading" data-toggle="collapse" data-parent="#devices" href="#device-{{$index}}" style="cursor: pointer">
+              <div class="panel-progress" ng-show="deviceStatus(deviceCfg) == 'syncing'" ng-attr-style="width: {{completion[deviceCfg.DeviceID]._total | number:0}}%"></div>
               <h3 class="panel-title">
                 <identicon data-value="deviceCfg.DeviceID"></identicon>&emsp;{{deviceName(deviceCfg)}}
                 <span ng-switch="deviceStatus(deviceCfg)" class="pull-right hidden-xs text-{{deviceClass(deviceCfg)}}">
@@ -807,6 +809,7 @@
           <li>Alexander Graf</li>
           <li>Arthur Axel fREW Schmidt</li>
           <li>Audrius Butkevicius</li>
+          <li>Ben Schulz</li>
           <li>Ben Sidhom</li>
           <li>Brandon Philips</li>
           <li>Caleb Callaway</li>