mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
deluge: Minor fixes and styling
- Updated comments - Start the daemon before enabling Apache configuration. - Warn the user about editing the Apache configuration for Deluge. - Other minor updates.
This commit is contained in:
1 parent
6a57dc78f3
commit
a6fa7abbad
5 files changed
+17
-11
No files matched your search
@@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
"""
|
||||
Plinth module to configure a Deluge web client
|
||||
Plinth module to configure a Deluge web client.
|
||||
"""
|
||||
|
||||
from gettext import gettext as _
|
||||
@@ -28,7 +28,7 @@ depends = ['plinth.modules.apps']
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the BitTorrent module."""
|
||||
"""Initialize the Deluge module."""
|
||||
menu = cfg.main_menu.get('apps:index')
|
||||
menu.add_urlname(_('BitTorrent (Deluge)'), 'glyphicon-magnet',
|
||||
'deluge:index', 60)
|
||||
@@ -26,5 +26,5 @@ from gettext import gettext as _
|
||||
class DelugeForm(forms.Form):
|
||||
"""Deluge configuration form."""
|
||||
enabled = forms.BooleanField(
|
||||
label=_('Enable Deluge web client'),
|
||||
label=_('Enable Deluge'),
|
||||
required=False)
|
||||
@@ -49,19 +49,19 @@
|
||||
|
||||
<p>
|
||||
{% if status.is_running %}
|
||||
|
||||
<span class="running-status active"></span> deluge-web is running
|
||||
<form class="form" method="post" action="{% url 'deluge:stop' %}">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="btn btn-primary"
|
||||
value="Stop deluge-web »"/>
|
||||
<input type="submit" class="btn btn-primary" value="Stop deluge-web"/>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
|
||||
<span class="running-status inactive"></span> deluge-web is not running
|
||||
<form class="form" method="post" action="{% url 'deluge:start' %}">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="btn btn-primary"
|
||||
value="Start deluge-web »"/>
|
||||
<input type="submit" class="btn btn-primary" value="Start deluge-web"/>
|
||||
</form>
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -78,7 +78,7 @@ def get_status():
|
||||
enabled = (output.strip() == 'yes')
|
||||
|
||||
output = actions.run('deluge', ['is-running'])
|
||||
is_running = ('yes' in output.strip())
|
||||
is_running = (output.strip() == 'yes')
|
||||
|
||||
status = {'enabled': enabled,
|
||||
'is_running': is_running}
|
||||
|
||||
Reference in new issue
Block a user