-
+
@@ -262,8 +262,8 @@
- - + +
Found: {{totalDownloads}} / {{totalAria2Downloads()}}
@@ -275,12 +275,10 @@ class="row download" data-gid="{{download.gid}}"> - - {{getName(download)}} + + {{getName(download)}} - +
@@ -348,194 +346,171 @@ - + -
    +
      -
    • - Status: {{download.status}} +
    • +   {{download.status}}
    • -
    • - ETA: {{getEta(download) | time}} +
    • +   {{download.downloadSpeed | bspeed}}
    • -
    • - Size: {{download.totalLength | blength}} +
    • +   {{download.uploadSpeed | bspeed}}
    • -
    • - Downloaded: {{download.completedLength | blength}} +
    • +   {{getEta(download) | time}}
    • -
    • - Progress: {{getProgress(download)}}% +
    • +   {{download.totalLength | blength}}
    • -
    • - Speed: {{download.downloadSpeed | bspeed}} +
    • +   {{download.completedLength | blength}}
    • - +
    • +   {{getProgress(download)}}% +
    • +
    + +
      -
    • - Status: {{download.status}} +
    • +   {{download.status}}
    • -
    • - Size: {{download.totalLength | blength}} +
    • +   {{download.totalLength | blength}}
    • -
    • - Downloaded: {{download.completedLength | blength}} +
    • +   {{download.completedLength | blength}}
    • -
    • - Path: {{download.dir}} +
    • +   {{download.dir}}
    • +
    + +
      + +
    • +   {{download.status}} +
    • + +
    • +   {{download.fmtTotalLength}} +
    • + +
    • +   {{download.fmtCompletedLength}} +
    • + +
    • +   {{download.dir}} +
    • + + +
    + +
      -
    • - Status: {{download.status}} +
    • +   {{download.status}}
    • -
    • - Path: {{download.dir}} +
    • +   {{download.dir}}
    • -
    • - Size: {{download.totalLength | blength}} +
    • +   {{download.totalLength | blength}}
    • +
    + +
      -
    • - Status: {{download.status}} +
    • +   {{download.status}}
    • -
    • - Path: {{download.dir}} +   {{download.dir}}
    • -
    • - Size: {{download.totalLength | blength}} -
    • - - -
    • - Status: {{download.status}} -
    • - -
    • - Path: {{download.dir}} -
    • - -
    • - Size: {{download.totalLength | blength}} +   {{download.totalLength | blength}}
    + +
      + +
    • +   {{download.status}} +
    • + +
    • +   {{download.dir}} +
    • + +
    • +   {{download.totalLength | blength}} +
    • + +
    + - - -
    + +
    - -
    -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    -
    - - - + +
    - -
      -
    • Status: {{download.status}}
    • -
    • GID: {{download.gid}}
    • -
    • Dir: {{download.dir}}
    • -
    • Size: {{download.totalLength | blength}}
    • -
    • Downloaded: {{download.completedLength | blength}}
    • -
    • Num of Pieces: {{download.numPieces}}
    • -
    • Piece Length: {{download.pieceLength | blength}}
    • -
    • ETA: {{getEta(download) | time}}
    • -
    • Down Speed: {{download.downloadSpeed | bspeed}}
    • +
      + +
      +
        +
      •   {{download.dir}}
      • +
      •   {{getEta(download) | time}}
      • +
      •   {{download.totalLength | blength}}
      • +
      •   {{download.completedLength | blength}}
      • +
      •   {{download.downloadSpeed | bspeed}}
      • -
      • Upload Speed: {{download.uploadSpeed | bspeed}}
      • -
      • Upload Length: {{download.uploadLength | blength}}
      • +
      •   {{download.uploadSpeed | bspeed}}
      • +
      •   {{download.uploadLength | blength}}
      • -
      • Connections: {{download.connections}}
      • +
      •   {{download.connections}}
      • + +
      •   {{download.gid}}
      • +
      • # of   {{download.numPieces}}
      • +
      • Length  {{download.pieceLength | blength}}
      - -

      Download Files

      -
        +
        • {{file.path | prelative:download.dir}} ({{file.length | blength}})
        - -
        +
        diff --git a/js/ctrls/alert.js b/js/ctrls/alert.js index a198b42..331a499 100644 --- a/js/ctrls/alert.js +++ b/js/ctrls/alert.js @@ -17,7 +17,7 @@ angular.module('webui.ctrls.alert', [ setTimeout(function() { var ind = scope.pendingAlerts.indexOf(obj); if (ind != -1) scope.removeAlert(ind); - }, 10000); + }, type == "error" ? 10000 : 3000); scope.$digest(); }); diff --git a/js/ctrls/download.js b/js/ctrls/download.js index cd03b17..ee175ef 100644 --- a/js/ctrls/download.js +++ b/js/ctrls/download.js @@ -144,7 +144,7 @@ function( scope.totalDownloads = downloads.length; - scope.totalPages = Math.ceil(scope.totalDownloads / scope.pageSize) + scope.totalPages = Math.ceil(scope.totalDownloads / scope.pageSize) || 1; // fix the bug when downloads are deleted until no left on a specific page if (scope.currentPage > scope.totalPages) @@ -242,6 +242,23 @@ function( return (d.totalLength-d.completedLength) / d.downloadSpeed; } + scope.getProgressClass = function(d) { + switch (d.status) { + case "paused": + return "progress-info"; + case "error": + return "progress-danger"; + case "removed": + return "progress-warning"; + case "active": + return "progress-active"; + case "complete": + return "progress-success"; + default: + return ""; + } + }; + // gets the progress in percentages scope.getProgress = function(d) { var percentage = (d.completedLength / d.totalLength)*100 || 0;