mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-19 15:59:57 +00:00
add a new preferences page for encryption
This commit is contained in:
parent
a207e1010b
commit
58c3b60ca7
81
deluge/ui/web/js/Deluge.Preferences.Encryption.js
Normal file
81
deluge/ui/web/js/Deluge.Preferences.Encryption.js
Normal file
@ -0,0 +1,81 @@
|
||||
Ext.namespace('Ext.deluge.preferences');
|
||||
Ext.deluge.preferences.Encryption = Ext.extend(Ext.form.FormPanel, {
|
||||
constructor: function(config) {
|
||||
config = Ext.apply({
|
||||
border: false,
|
||||
title: _('Encryption'),
|
||||
layout: 'form'
|
||||
}, config);
|
||||
Ext.deluge.preferences.Encryption.superclass.constructor.call(this, config);
|
||||
},
|
||||
|
||||
initComponent: function() {
|
||||
Ext.deluge.preferences.Encryption.superclass.initComponent.call(this);
|
||||
|
||||
var optMan = Deluge.Preferences.getOptionsManager();
|
||||
|
||||
var fieldset = this.add({
|
||||
xtype: 'fieldset',
|
||||
border: false,
|
||||
title: _('Settings'),
|
||||
autoHeight: true,
|
||||
defaultType: 'combo'
|
||||
});
|
||||
optMan.bind('enc_in_policy', fieldset.add({
|
||||
fieldLabel: _('Inbound'),
|
||||
mode: 'local',
|
||||
width: 150,
|
||||
store: new Ext.data.SimpleStore({
|
||||
fields: ['id', 'text'],
|
||||
data: [
|
||||
[0, _('Forced')],
|
||||
[1, _('Enabled')],
|
||||
[2, _('Disabled')]
|
||||
]
|
||||
}),
|
||||
triggerAction: 'all',
|
||||
valueField: 'id',
|
||||
displayField: 'text'
|
||||
}));
|
||||
optMan.bind('enc_out_policy', fieldset.add({
|
||||
fieldLabel: _('Outbound'),
|
||||
mode: 'local',
|
||||
width: 150,
|
||||
store: new Ext.data.SimpleStore({
|
||||
fields: ['id', 'text'],
|
||||
data: [
|
||||
[0, _('Forced')],
|
||||
[1, _('Enabled')],
|
||||
[2, _('Disabled')]
|
||||
]
|
||||
}),
|
||||
triggerAction: 'all',
|
||||
valueField: 'id',
|
||||
displayField: 'text'
|
||||
}));
|
||||
optMan.bind('enc_level', fieldset.add({
|
||||
fieldLabel: _('Level'),
|
||||
mode: 'local',
|
||||
width: 150,
|
||||
store: new Ext.data.SimpleStore({
|
||||
fields: ['id', 'text'],
|
||||
data: [
|
||||
[0, _('Handshake')],
|
||||
[1, _('Full Stream')],
|
||||
[2, _('Either')]
|
||||
]
|
||||
}),
|
||||
triggerAction: 'all',
|
||||
valueField: 'id',
|
||||
displayField: 'text'
|
||||
}));
|
||||
optMan.bind('enc_prefer_rc4', fieldset.add({
|
||||
xtype: 'checkbox',
|
||||
name: 'enc_prefer_rc4',
|
||||
height: 40,
|
||||
hideLabel: true,
|
||||
boxLabel: _('Encrypt entire stream')
|
||||
}));
|
||||
}
|
||||
});
|
||||
Deluge.Preferences.addPage(new Ext.deluge.preferences.Encryption());
|
@ -1,4 +1,4 @@
|
||||
DELUGE_FILES="Deluge.js Deluge.Formatters.js Deluge.Menus.js Deluge.Events.js Deluge.OptionsManager.js Deluge.MultiOptionsManager.js Deluge.Add.js Deluge.Add.File.js Deluge.Add.Url.js Deluge.Client.js Deluge.ConnectionManager.js Deluge.Details.js Deluge.Details.Status.js Deluge.Details.Details.js Deluge.Details.Files.js Deluge.Details.Peers.js Deluge.Details.Options.js Deluge.EditTrackers.js Deluge.Keys.js Deluge.Login.js Deluge.Preferences.js Deluge.Preferences.Downloads.js Deluge.Preferences.Network.js Deluge.Preferences.Bandwidth.js Deluge.Preferences.Interface.js Deluge.Preferences.Other.js Deluge.Preferences.Daemon.js Deluge.Preferences.Queue.js Deluge.Preferences.Proxy.js Deluge.Preferences.Notification.js Deluge.Preferences.Cache.js Deluge.Preferences.Plugins.js Deluge.Remove.js Deluge.Sidebar.js Deluge.Statusbar.js Deluge.Toolbar.js Deluge.Torrents.js Deluge.UI.js"
|
||||
DELUGE_FILES="Deluge.js Deluge.Formatters.js Deluge.Menus.js Deluge.Events.js Deluge.OptionsManager.js Deluge.MultiOptionsManager.js Deluge.Add.js Deluge.Add.File.js Deluge.Add.Url.js Deluge.Client.js Deluge.ConnectionManager.js Deluge.Details.js Deluge.Details.Status.js Deluge.Details.Details.js Deluge.Details.Files.js Deluge.Details.Peers.js Deluge.Details.Options.js Deluge.EditTrackers.js Deluge.Keys.js Deluge.Login.js Deluge.Preferences.js Deluge.Preferences.Downloads.js Deluge.Preferences.Network.js Deluge.Preferences.Encryption.js Deluge.Preferences.Bandwidth.js Deluge.Preferences.Interface.js Deluge.Preferences.Other.js Deluge.Preferences.Daemon.js Deluge.Preferences.Queue.js Deluge.Preferences.Proxy.js Deluge.Preferences.Notification.js Deluge.Preferences.Cache.js Deluge.Preferences.Plugins.js Deluge.Remove.js Deluge.Sidebar.js Deluge.Statusbar.js Deluge.Toolbar.js Deluge.Torrents.js Deluge.UI.js"
|
||||
ALL_FILES="ext-extensions-debug.js $DELUGE_FILES"
|
||||
|
||||
[ -e /usr/bin/jsdoc_toolkit ] && JSDOC="/usr/bin/jsdoc_toolkit"
|
||||
|
@ -301,6 +301,7 @@ class TopLevel(resource.Resource):
|
||||
"/js/Deluge.Preferences.js",
|
||||
"/js/Deluge.Preferences.Downloads.js",
|
||||
"/js/Deluge.Preferences.Network.js",
|
||||
"/js/Deluge.Preferences.Encryption.js",
|
||||
"/js/Deluge.Preferences.Bandwidth.js",
|
||||
"/js/Deluge.Preferences.Interface.js",
|
||||
"/js/Deluge.Preferences.Other.js",
|
||||
|
Loading…
x
Reference in New Issue
Block a user