mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 20:44:00 +02:00
New: Show source/seed info in manual search
This commit is contained in:
28
src/UI/Release/ProtocolCell.js
Normal file
28
src/UI/Release/ProtocolCell.js
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
define(['backgrid'], function (Backgrid) {
|
||||
return Backgrid.Cell.extend({
|
||||
|
||||
className : 'protocol-cell',
|
||||
|
||||
render : function () {
|
||||
var protocol = this.model.get('protocol') || 'Unknown';
|
||||
|
||||
var label = '??';
|
||||
|
||||
if (protocol) {
|
||||
if (protocol === 'torrent') {
|
||||
label = 'torrent';
|
||||
}
|
||||
else if (protocol === 'usenet') {
|
||||
label = 'nzb';
|
||||
}
|
||||
|
||||
this.$el.html('<div class="label label-default protocol-{0}" title="{0}">{1}</div>'.format(protocol, label));
|
||||
}
|
||||
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user