Add mobile, web and desktop client for modules

Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
Prachi Srivastava 2017-09-19 11:19:28 +05:30 committed by Joseph Nuthalapati
parent bc5cd164f2
commit 83430f4031
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35
20 changed files with 149 additions and 7 deletions

View File

@ -25,6 +25,7 @@ from plinth import actions
from plinth import action_utils
from plinth import frontpage
from plinth import service as service_module
from plinth.client import web_client
from plinth.menu import main_menu
from plinth.modules.users import add_group
@ -52,11 +53,14 @@ description = [
reserved_usernames = ['debian-deluged']
web_clients = [web_client(name='Deluge', url='/deluge')]
def init():
"""Initialize the Deluge module."""
menu = main_menu.get('apps')
menu.add_urlname(name, 'glyphicon-magnet', 'deluge:index', short_description)
menu.add_urlname(name, 'glyphicon-magnet',
'deluge:index', short_description)
global service
setup_helper = globals()['setup_helper']

View File

@ -34,6 +34,7 @@ from plinth import service as service_module
from plinth.menu import main_menu
from plinth.signals import pre_hostname_change, post_hostname_change
from plinth.signals import domainname_change
from plinth.client import web_client
version = 1
@ -59,6 +60,10 @@ description = [
box_name=_(cfg.box_name))
]
web_clients = [web_client(name='JSXC', url='/plinth/apps/jsxc'),
web_client(name='XMPP client', url='http://xmpp.org/xmpp'
'-software/clients')]
reserved_usernames = ['ejabberd']
service = None

View File

@ -28,6 +28,7 @@ from plinth import cfg
from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.client import web_client
version = 1
@ -57,6 +58,7 @@ description = [
'permissions or add new users.'), box_name=_(cfg.box_name))
]
web_clients = [web_client(name='ikiwiki', url='/ikiwiki')]
def init():
"""Initialize the ikiwiki module."""

View File

@ -30,6 +30,7 @@ from plinth import service as service_module
from plinth.menu import main_menu
from plinth.utils import format_lazy
from plinth.views import ServiceView
from plinth.client import desktop_client
version = 1
@ -54,6 +55,8 @@ description = [
box_name=_(cfg.box_name)),
]
desktop_clients = [desktop_client(name='Gobby', url='https://gobby.github.io/')]
def init():
"""Initialize the infinoted module."""

View File

@ -30,6 +30,7 @@ from plinth import action_utils
from plinth import actions
from plinth import frontpage
from plinth import service as service_module
from plinth.client import desktop_client, web_client, mobile_client
from plinth.menu import main_menu
version = 2
@ -57,6 +58,20 @@ description = [
'client is recommended.')
]
web_clients = [web_client(name='Riot', url='https://riot.im/app/#/home')]
desktop_clients = [desktop_client(name='Riot',
url='https://riot.im/desktop.html'),
desktop_client(name='WeeChat CLI',
url='https://weechat.org/')]
mobile_clients = [mobile_client(name='Riot',
fully_qualified_name='im.vector.alpha',
play_store_url='https://play.google.com/store/apps/'
'details?id=im.vector.alpha',
fdroid_url='https://f-droid.org/packages/'
'im.vector.alpha/')]
service = None
logger = logging.getLogger(__name__)

View File

@ -31,6 +31,7 @@ from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.utils import format_lazy
from plinth.client import desktop_client, mobile_client
version = 2
@ -58,6 +59,16 @@ description = [
'is needed.'), box_name=_(cfg.box_name)),
]
desktop_clients = [desktop_client(name='Minetest',
url= 'https://www.minetest.net/downloads/')]
mobile_clients = [
mobile_client(name='Minetest',
fully_qualified_name='net.minetest.mintest',
fdroid_url='https://f-droid.org/packages/net.minetest.minetest/',
play_store_url='https://play.google.com/store/apps/details?'
'id=net.minetest.minetest')]
reserved_usernames = ['Debian-minetest']
CONFIG_FILE = '/etc/minetest/minetest.conf'

View File

@ -28,6 +28,7 @@ from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.views import ServiceView
from plinth.client import desktop_client, mobile_client
version = 1
@ -51,6 +52,18 @@ description = [
'from your desktop and Android devices are available.')
]
desktop_clients = [
desktop_client(name='Mumble',url= 'https://wiki.mumble.info/wiki/Main_Page')]
mobile_clients = [
mobile_client(name='Mumble',
fully_qualified_name='com.morlunk.mumbleclient',
fdroid_url='https://f-droid.org/packages/com.morlunk'
'.mumbleclient/',
play_store_url='https://play.google.com/store/apps/details'
'?id=com.morlunk.mumbleclient.free')]
reserved_usernames = ['mumble-server']

View File

@ -30,6 +30,7 @@ from plinth import service as service_module
from plinth.menu import main_menu
from plinth.utils import format_lazy
from plinth.views import ServiceView
from plinth.client import mobile_client, desktop_client
version = 1
@ -60,6 +61,16 @@ description = [
'are available.'),
]
desktop_clients = [
desktop_client(name='Quassel', url='http://quassel-irc.org/downloads')]
mobile_clients = [
mobile_client(name='QuasselDroid',
fully_qualified_name='com.iskrembilen.quasseldroid',
fdroid_url=None,
play_store_url='https://play.google.com/store/apps/details?'
'id=com.iskrembilen.quasseldroid')]
reserved_usernames = ['quasselcore']

View File

@ -30,6 +30,7 @@ from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.utils import format_lazy
from plinth.client import desktop_client, mobile_client
version = 1
@ -53,6 +54,20 @@ description = [
'with a {box_name} login.'), box_name=_(cfg.box_name)),
]
desktop_clients = [desktop_client(name='GNOME Calendar',
url='https://wiki.gnome.org/Apps/Calendar'),
desktop_client(name='Contacts',
url='https://wiki.gnome.org/Apps/Contacts'),
desktop_client(name='Evolution',
url='https://wiki.gnome.org/Apps/Evolution')]
mobile_clients = [
mobile_client(name='DAVdroid',
fully_qualified_name='at.bitfire.davdroid',
fdroid_url=None,
play_store_url='https://play.google.com/store/apps/details'
'?id=at.bitfire.davdroid')]
reserved_usernames = ['radicale']
CONFIG_FILE = '/etc/radicale/config'

View File

@ -28,6 +28,7 @@ from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.views import ServiceView
from plinth.client import desktop_client, mobile_client
version = 2
@ -60,6 +61,14 @@ description = [
'service and re-enable it.'),
]
desktop_clients = [desktop_client(name='Jitsi',url='https://jitsi.org/')]
mobile_clients = [
mobile_client(name='Csip Simple',fully_qualified_name='com.csipsimple',
fdroid_url=None,
play_store_url='https://play.google.com/store/apps/details'
'?id=com.csipsimple')]
reserved_usernames = ['repro']
service = None

View File

@ -25,6 +25,7 @@ from plinth import cfg
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.utils import format_lazy
from plinth.client import web_client
version = 1
@ -50,6 +51,8 @@ description = [
'<a href=\'/restore/\'>reStore web-interface</a>.')
]
web_clients = [web_client(name='reStore web-interface', url='/restore')]
reserved_usernames = ['node-restore']
service = None

View File

@ -26,6 +26,7 @@ from plinth import action_utils
from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.client import web_client
version = 1
@ -58,6 +59,8 @@ description = [
'>https://www.google.com/settings/security/lesssecureapps</a>).'),
]
web_clients = [web_client('Roundcube', '/roundcube')]
service = None

View File

@ -26,6 +26,7 @@ from plinth import action_utils
from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.client import web_client
version = 1
@ -45,6 +46,8 @@ description = [
'visit.'),
]
web_clients = [web_client(name='Shaarli', url='/shaarli')]
service = None

View File

@ -28,6 +28,7 @@ from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.utils import format_lazy
from plinth.client import desktop_client, mobile_client, web_client
version = 1
@ -58,6 +59,17 @@ description = [
'also <a href="https://syncthing.net/">available</a>.'),
]
web_clients = [web_client(name='Syncthing', url='/syncthing')]
desktop_clients = [desktop_client(name='Syncthing',
url='https://syncthing.net/')]
mobile_clients = [mobile_client(
name='Syncthing', fully_qualified_name='com.nutomic.syncthingandroid',
fdroid_url='https://f-droid.org/packages/com.nutomic.syncthingandroid/',
play_store_url='https://play.google.com/store/apps/details?id=com.nutomic'
'.syncthingandroid')]
service = None

View File

@ -28,6 +28,7 @@ from plinth import service as service_module
from plinth.menu import main_menu
from plinth.modules.names import SERVICES
from plinth.signals import domain_added, domain_removed
from plinth.client import desktop_client, mobile_client
from . import utils
@ -52,6 +53,17 @@ description = [
'Tor Browser</a>.')
]
desktop_clients = [
desktop_client(name='Tor Browser',
url='https://www.torproject.org/download/download-easy'
'.html.en')]
mobile_clients = [
mobile_client(name='Orbot', fully_qualified_name='org.torproject.android',
fdroid_url='https://guardianproject.info/fdroid/',
play_store_url='https://play.google.com/store/apps/details'
'?id=org.torproject.android')]
reserved_usernames = ['debian-tor']
socks_service = None

View File

@ -27,6 +27,7 @@ from plinth import action_utils
from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.client import web_client
version = 1
@ -46,6 +47,8 @@ description = [
_('Access the web interface at <a href="/transmission">/transmission</a>.')
]
web_clients = [web_client(name='Transmission',url='/transmission')]
reserved_usernames = ['debian-transmission']
service = None

View File

@ -28,6 +28,7 @@ from plinth import cfg
from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.client import web_client, mobile_client
version = 2
@ -57,6 +58,15 @@ description = [
'the URL <a href="/tt-rss-app/">/tt-rss-app</a> for connecting.'))
]
web_clients = [web_client(name='TT-RSS', url='/tt-rss')]
mobile_clients = [
mobile_client(name='TTRSS-Reader',
fully_qualified_name='org.ttrssreader',
play_store_url='https://play.google.com/store/apps/details'
'?id=org.ttrssreader',
fdroid_url='https://f-droid.org/packages/org.ttrssreader/')]
service = None

View File

@ -53,21 +53,20 @@
<p class="heading">{% trans "Mobile Clients" %}:</p>
<ul>
{% for client in module.mobile_clients %}
<li class="col-md-12"><span>{{ client.name }}</span></li>
<li class="col-md-12 col-xs-12"><span>{{ client.name }}</span></li>
<div class="row">
{% if client.fdroid_url %}
<div class="col-md-2 col-xs-4">
<a href="{{ client.fdroid_url }}">
<img src="{% static 'theme/img/f-Droid.png' %}"
style="max-width: 100%; height: 100%"/>
<img class="store-icon" src="{% static 'theme/img/f-Droid.png' %}"/>
</a>
</div>
{% endif %}
{% if client.play_store_url %}
<div class="col-md-2 col-xs-4">
<a href="{{ client.play_store_url }}">
<img src="{% static 'theme/img/google-play.png' %}"
style="max-width: 100%; height: 100%"/>
<img class="store-icon"
src="{% static 'theme/img/google-play.png' %}"/>
</a>
</div>
{% endif %}

View File

@ -119,5 +119,6 @@
{% endif %}
{% endif %}
{% include "clients.html" with module=setup_helper.module %}
{% endblock %}

View File

@ -127,12 +127,20 @@ footer license-info p{
.clients-info li {
float: left;
padding-left: 15px;
padding-bottom: 5px;
}
.clients-info li span {
position: relative;
left: -18px;
}
.store-icon {
display:block;
width: 100%;
height: auto
}
.shortcut-label {
min-height:50px;
}
}