diff --git a/index.html b/index.html
index abc2f46..e7be6f9 100755
--- a/index.html
+++ b/index.html
@@ -107,12 +107,12 @@
By URIs
-
By Metalinks
@@ -194,7 +194,7 @@
-
+
@@ -521,6 +521,7 @@
+
Global Statistics
+
+
+
Miscellaneous
Aria2 Version {{miscellaneous.version}}
@@ -546,9 +550,11 @@
Or you can open the latest version in browser through http://ziahamza.github.com/webui-aria2
+
+
diff --git a/js/ctrls/download.js b/js/ctrls/download.js
index 60487c8..3211b2d 100644
--- a/js/ctrls/download.js
+++ b/js/ctrls/download.js
@@ -11,7 +11,7 @@ function(
fsettings, activeInclude, waitingExclude
) {
scope.active = [], scope.waiting = [], scope.stopped = [];
- scope.gstats = scope.miscellaneous = {};
+ scope.gstats = {};
// pause the download
// d: the download ctx
diff --git a/js/ctrls/nav.js b/js/ctrls/nav.js
index cb57346..4774f69 100644
--- a/js/ctrls/nav.js
+++ b/js/ctrls/nav.js
@@ -17,6 +17,8 @@ angular
// app name
scope.name = name;
+ scope.isFeatureEnabled = function(f) { return rhelpers.isFeatureEnabled(f) };
+
// initially collapsed in mobile resolution
scope.collapsed = true;
diff --git a/js/services/rpc/helpers.js b/js/services/rpc/helpers.js
index 4705845..615edae 100644
--- a/js/services/rpc/helpers.js
+++ b/js/services/rpc/helpers.js
@@ -2,12 +2,19 @@ angular.module('webui.services.rpc.helpers', [
'webui.services.deps', 'webui.services.rpc', 'webui.services.alerts'
])
.factory('$rpchelpers', ['$_', '$rpc', '$alerts', function(_, rpc, alerts) {
+ var miscellaneous = {version: '', enabledFeatures: []};
+ rpc.once('getVersion', [], function(data) { miscellaneous = data[0]});
return {
+ isFeatureEnabled: function(feature) {
+ return miscellaneous.enabledFeatures.indexOf(feature) != -1;
+ },
+ getAria2Version: function() {
+ return miscellaneous.version;
+ },
addUris: function(uris) {
_.each(uris, function(uri) {
// passing true to batch all the addUri calls
rpc.once('addUri', [uri], angular.noop, true);
-
});
// now dispatch all addUri syscalls