improve the statusbar css and add diskspace and incoming connections to
it
This commit is contained in:
parent
ec1513a2c4
commit
ccdb270b38
|
@ -53,7 +53,11 @@
|
||||||
<li id="connections" />
|
<li id="connections" />
|
||||||
<li id="downspeed" />
|
<li id="downspeed" />
|
||||||
<li id="upspeed" />
|
<li id="upspeed" />
|
||||||
|
<li id="incoming_connections">
|
||||||
|
$_('No Incoming Connections!')
|
||||||
|
</li>
|
||||||
<li id="dht" />
|
<li id="dht" />
|
||||||
|
<li id="free_space" />
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,6 +27,7 @@ ul.mooui-menu li.mooui-menu-icon {
|
||||||
|
|
||||||
ul.mooui-menu li.mooui-menu-sep {
|
ul.mooui-menu li.mooui-menu-sep {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
|
line-height: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.mooui-menu li.mooui-menu-toggle input {
|
ul.mooui-menu li.mooui-menu-toggle input {
|
||||||
|
|
|
@ -31,6 +31,7 @@ Deluge.Widgets.StatusBar = new Class({
|
||||||
this.element.getElements('li').each(function(el) {
|
this.element.getElements('li').each(function(el) {
|
||||||
this[el.id] = el;
|
this[el.id] = el;
|
||||||
}, this);
|
}, this);
|
||||||
|
this.incoming_connections.setStyle('display', 'none');
|
||||||
},
|
},
|
||||||
|
|
||||||
update: function(stats) {
|
update: function(stats) {
|
||||||
|
@ -38,6 +39,12 @@ Deluge.Widgets.StatusBar = new Class({
|
||||||
this.downspeed.set('text', stats.download_rate.toSpeed());
|
this.downspeed.set('text', stats.download_rate.toSpeed());
|
||||||
this.upspeed.set('text', stats.upload_rate.toSpeed());
|
this.upspeed.set('text', stats.upload_rate.toSpeed());
|
||||||
this.dht.set('text', stats.dht_nodes);
|
this.dht.set('text', stats.dht_nodes);
|
||||||
|
this.free_space.set('text', stats.free_space.toBytes());
|
||||||
|
if (stats.has_incoming_connections) {
|
||||||
|
this.incoming_connections.setStyle('display', 'none');
|
||||||
|
} else {
|
||||||
|
this.incoming_connections.setStyle('display', 'inline');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -215,8 +215,11 @@ Number.implement({
|
||||||
|
|
||||||
if (bytes < 1024) { return bytes.toFixed(1) + 'KiB'; }
|
if (bytes < 1024) { return bytes.toFixed(1) + 'KiB'; }
|
||||||
else { bytes = bytes / 1024; }
|
else { bytes = bytes / 1024; }
|
||||||
|
|
||||||
|
if (bytes < 1024) { return bytes.toFixed(1) + 'MiB'; }
|
||||||
|
else { bytes = bytes / 1024; }
|
||||||
|
|
||||||
return bytes.toFixed(1) + 'MiB'
|
return bytes.toFixed(1) + 'GiB'
|
||||||
},
|
},
|
||||||
toSpeed: function() {
|
toSpeed: function() {
|
||||||
var bits = this
|
var bits = this
|
||||||
|
@ -1357,11 +1360,13 @@ Widgets.DataGrid = new Class({
|
||||||
},
|
},
|
||||||
|
|
||||||
filter: function() {
|
filter: function() {
|
||||||
this.filterer = (this.filterer) ? this.filterer : $lambda(true);
|
if (!$chk(this.filterer)) {
|
||||||
this.displayRows.empty();
|
this.filterer = $lambda(true)
|
||||||
this.rows.each(function(row) {
|
}
|
||||||
if (this.filterer(row)) {this.displayRows.include(row)}
|
this.displayRows.empty()
|
||||||
}.bind(this));
|
this.rows.each(function(r) {
|
||||||
|
if (this.filterer(r)) {this.displayRows.include(r)}
|
||||||
|
}.bind(this))
|
||||||
},
|
},
|
||||||
|
|
||||||
getById: function(id) {
|
getById: function(id) {
|
||||||
|
@ -1388,8 +1393,8 @@ Widgets.DataGrid = new Class({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
this.filter();
|
this.filter()
|
||||||
this.resort();
|
this.resort()
|
||||||
var rows = [], rowIds = []
|
var rows = [], rowIds = []
|
||||||
this.rows.each(function(row) {
|
this.rows.each(function(row) {
|
||||||
if (this.displayRows.contains(row)) {
|
if (this.displayRows.contains(row)) {
|
||||||
|
|
|
@ -98,7 +98,9 @@ body {
|
||||||
#status #info #connections {background-image:url(/static/images/tango/connections.png)}
|
#status #info #connections {background-image:url(/static/images/tango/connections.png)}
|
||||||
#status #info #downspeed {background-image:url(/pixmaps/downloading16.png)}
|
#status #info #downspeed {background-image:url(/pixmaps/downloading16.png)}
|
||||||
#status #info #upspeed {background-image:url(/pixmaps/seeding16.png)}
|
#status #info #upspeed {background-image:url(/pixmaps/seeding16.png)}
|
||||||
|
#status #info #incoming_connections { background-image: url('/pixmaps/alert16.png'); }
|
||||||
#status #info #dht {background-image:url(/pixmaps/dht16.png)}
|
#status #info #dht {background-image:url(/pixmaps/dht16.png)}
|
||||||
|
#status #info #free_space {background-image:url(/static/images/tango/drive-harddisk.png)}
|
||||||
|
|
||||||
#labels .all { background-image: url('/pixmaps/dht16.png'); }
|
#labels .all { background-image: url('/pixmaps/dht16.png'); }
|
||||||
#labels .downloading { background-image: url('/pixmaps/downloading16.png'); }
|
#labels .downloading { background-image: url('/pixmaps/downloading16.png'); }
|
||||||
|
|
|
@ -100,19 +100,11 @@ html, body {
|
||||||
}
|
}
|
||||||
|
|
||||||
#status #info li {
|
#status #info li {
|
||||||
|
width: auto;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
width: 30px;
|
|
||||||
padding-left: 21px;
|
padding-left: 21px;
|
||||||
}
|
margin-right: 10px;
|
||||||
|
|
||||||
#status #info #connections {
|
|
||||||
width: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#status #info #downspeed, #status #info #upspeed {
|
|
||||||
background-position: 4px 2px;
|
|
||||||
margin-right: 25px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.categories {
|
.categories {
|
||||||
|
|
Loading…
Reference in New Issue