diff --git a/plinth/modules/diaspora/manifest.py b/plinth/modules/diaspora/manifest.py index 0070a2692..9641fe8bf 100644 --- a/plinth/modules/diaspora/manifest.py +++ b/plinth/modules/diaspora/manifest.py @@ -19,32 +19,31 @@ from django.utils.translation import ugettext_lazy as _ from plinth.utils import format_lazy from . import get_configured_domain_name +from plinth.templatetags.plinth_extras import Mobile_OS, Store -clients = [ - { - 'name': _('dandelion*'), - 'description': _('It is an unofficial webview based client for the ' - 'community-run, distributed social network diaspora*'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'os_version': '>4.2.0', - 'store_name': 'fdroid_store', - 'url': 'https://f-droid.org/repository/browse/?fdid=com' - '.github.dfa.diaspora_android ', - 'fully_qualified_name': 'com.github.dfa.diaspora_android' - } - ] - }, - { - 'name': _('diaspora*'), - 'platforms': [ - { - 'type': 'web', - 'url': format_lazy('https://diaspora.{host}', - host=get_configured_domain_name()) - } - ] - } -] +clients = [{ + 'name': + _('dandelion*'), + 'description': + _('It is an unofficial webview based client for the ' + 'community-run, distributed social network diaspora*'), + 'platforms': [{ + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'os_version': '>4.2.0', + 'store_name': Store.F_DROID.value, + 'url': 'https://f-droid.org/repository/browse/?fdid=com' + '.github.dfa.diaspora_android ', + 'fully_qualified_name': 'com.github.dfa.diaspora_android' + }] +}, { + 'name': + _('diaspora*'), + 'platforms': [{ + 'type': + 'web', + 'url': + format_lazy('https://diaspora.{host}', + host=get_configured_domain_name()) + }] +}] diff --git a/plinth/modules/ejabberd/manifest.py b/plinth/modules/ejabberd/manifest.py index ff82d9b03..8cb992adf 100644 --- a/plinth/modules/ejabberd/manifest.py +++ b/plinth/modules/ejabberd/manifest.py @@ -18,115 +18,101 @@ from django.utils.translation import ugettext_lazy as _ from plinth.modules.jsxc import manifest as jsxc_manifest +from plinth.templatetags.plinth_extras import Desktop_OS, Mobile_OS, Store -clients = [ - { - 'name': _('yaxim'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'fully_qualified_name': 'org.yaxim.androidclient', - 'url': 'https://play.google.com/store/apps/details?id=org' - '.yaxim.androidclient ' - }] - }, - { - 'name': _('Bruno'), - 'description': _('Bruno is a themed version of the open source ' - 'yaxim app.'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'fully_qualified_name': 'org.yaxim.bruno', - 'url': 'https://play.google.com/store/apps/details?id' - '=org.yaxim.bruno ' - } - ] - }, - { - 'name': _('Chat secure - Encrypted Messenger'), - 'description': _('ChatSecure is a free and open source ' - 'messaging app that features OTR encryption ' - 'over XMPP. You can connect to an existing ' - 'Google account, create new accounts on ' - 'public XMPP servers (including via Tor), ' - 'or even connect to your own server for ' - 'extra security.'), - 'platforms': [ - { - 'type': 'store', - 'os': 'iOS', - 'store_name': 'apple_store', - 'url': 'https://itunes.apple.com/us/app/chatsecure' - '/id464200063 ' - } - ] - }, - { - 'name': _('Conversations'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'url': 'https://play.google.com/store/apps/details?id' - '=eu.siacs.conversations ', - 'fully_qualified_name': 'eu.siacs.conversations' - } - ] - }, - { - 'name': _('Dino'), - 'platforms': [ - { - 'type': 'download', - 'os': 'Debian', - 'url': 'https://download.opensuse.org/repositories/network' - ':/messaging:/xmpp:/dino/Debian_9.0/amd64/dino_0.0' - '~git178.9d8e1e8_amd64.deb', - } - ] - }, - { - 'name': _('Gajim'), - 'platforms': [ - { - 'type': 'apt', - 'os': 'Debian', - 'package_name': 'gajim' - }, - { - 'type': 'download', - 'os': 'Windows', - 'url': 'https://gajim.org/downloads/0.16/gajim-0.16.8-2.exe' - } - ] - }, - { - 'name': _('OneTeam'), - 'platforms': [ - { - 'type': 'download', - 'os': 'Windows', - 'url': 'https://download.process-one.net/oneteam/release' - '-installers/OneTeam.msi' - }, - { - 'type': 'download', - 'os': 'macOS', - 'url': 'https://download.process-one.net/oneteam/release' - '-installers/OneTeam.dmg ' - }, - { - 'type': 'download', - 'os': 'Linux', - 'url': 'https://download.process-one.net/oneteam/release' - '-installers/oneteam.tar.bz2 ' - } - ] - } -].append(jsxc_manifest.clients) +clients = [{ + 'name': + _('yaxim'), + 'platforms': [{ + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, + 'fully_qualified_name': 'org.yaxim.androidclient', + 'url': 'https://play.google.com/store/apps/details?id=org' + '.yaxim.androidclient ' + }] +}, { + 'name': + _('Bruno'), + 'description': + _('Bruno is a themed version of the open source ' + 'yaxim app.'), + 'platforms': [{ + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, + 'fully_qualified_name': 'org.yaxim.bruno', + 'url': 'https://play.google.com/store/apps/details?id' + '=org.yaxim.bruno ' + }] +}, { + 'name': + _('Chat secure - Encrypted Messenger'), + 'description': + _('ChatSecure is a free and open source ' + 'messaging app that features OTR encryption ' + 'over XMPP. You can connect to an existing ' + 'Google account, create new accounts on ' + 'public XMPP servers (including via Tor), ' + 'or even connect to your own server for ' + 'extra security.'), + 'platforms': [{ + 'type': 'store', + 'os': 'iOS', + 'store_name': 'apple_store', + 'url': 'https://itunes.apple.com/us/app/chatsecure' + '/id464200063 ' + }] +}, { + 'name': + _('Conversations'), + 'platforms': [{ + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, + 'url': 'https://play.google.com/store/apps/details?id' + '=eu.siacs.conversations ', + 'fully_qualified_name': 'eu.siacs.conversations' + }] +}, { + 'name': + _('Dino'), + 'platforms': [{ + 'type': 'download', + 'os': 'Debian', + 'url': 'https://download.opensuse.org/repositories/network' + ':/messaging:/xmpp:/dino/Debian_9.0/amd64/dino_0.0' + '~git178.9d8e1e8_amd64.deb', + }] +}, { + 'name': + _('Gajim'), + 'platforms': [{ + 'type': 'apt', + 'os': 'Debian', + 'package_name': 'gajim' + }, { + 'type': 'download', + 'os': Desktop_OS.WINDOWS.value, + 'url': 'https://gajim.org/downloads/0.16/gajim-0.16.8-2.exe' + }] +}, { + 'name': + _('OneTeam'), + 'platforms': [{ + 'type': 'download', + 'os': Desktop_OS.WINDOWS.value, + 'url': 'https://download.process-one.net/oneteam/release' + '-installers/OneTeam.msi' + }, { + 'type': 'download', + 'os': Desktop_OS.MAC_OS.value, + 'url': 'https://download.process-one.net/oneteam/release' + '-installers/OneTeam.dmg ' + }, { + 'type': 'download', + 'os': 'Linux', + 'url': 'https://download.process-one.net/oneteam/release' + '-installers/oneteam.tar.bz2 ' + }] +}].append(jsxc_manifest.clients) diff --git a/plinth/modules/ejabberd/templates/ejabberd.html b/plinth/modules/ejabberd/templates/ejabberd.html index 3d20cae60..c3bbce912 100644 --- a/plinth/modules/ejabberd/templates/ejabberd.html +++ b/plinth/modules/ejabberd/templates/ejabberd.html @@ -50,6 +50,9 @@ {% block configuration %} + + {% include "clients.html" with clients=clients %} +

{% trans "Configuration" %}

diff --git a/plinth/modules/ejabberd/views.py b/plinth/modules/ejabberd/views.py index f1f8769f6..9e5e39455 100644 --- a/plinth/modules/ejabberd/views.py +++ b/plinth/modules/ejabberd/views.py @@ -14,7 +14,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # - """ Views for the Ejabberd module """ @@ -44,6 +43,7 @@ class EjabberdServiceView(ServiceView): """Add service to the context data.""" context = super().get_context_data(*args, **kwargs) context['domainname'] = ejabberd.get_domainname() + context['clients'] = ejabberd.clients return context def form_valid(self, form): diff --git a/plinth/modules/ikiwiki/manifest.py b/plinth/modules/ikiwiki/manifest.py index e138050bd..f0f4d4c04 100644 --- a/plinth/modules/ikiwiki/manifest.py +++ b/plinth/modules/ikiwiki/manifest.py @@ -17,12 +17,10 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('ikiwiki'), - 'platforms': [{ - 'type': 'web', - 'relative_url': '/ikiwiki' - }] - } -] +clients = [{ + 'name': _('ikiwiki'), + 'platforms': [{ + 'type': 'web', + 'url': '/ikiwiki' + }] +}] diff --git a/plinth/modules/infinoted/manifest.py b/plinth/modules/infinoted/manifest.py index 85d7a2207..9d86bb49a 100644 --- a/plinth/modules/infinoted/manifest.py +++ b/plinth/modules/infinoted/manifest.py @@ -17,27 +17,27 @@ from django.utils.translation import ugettext_lazy as _ +from plinth.templatetags.plinth_extras import Desktop_OS from plinth.utils import format_lazy from plinth import cfg -clients = [ - { - 'name': _('Gobby'), - 'description': _('Gobby is a collaborative text editor'), - 'usage': format_lazy(_('start Gobby and select "Connect to Server" and ' - 'enter your {box_name}\'s domain name.'), - box_name=_(cfg.box_name)), - 'platforms': [ - { - 'type': 'download', - 'os': 'Windows', - 'url': 'http://releases.0x539.de/gobby/gobby-stable.exe' - }, - { - 'type': 'apt', - 'os': 'Debian', - 'package_name': 'gobby-infinote' - } - ] - } -] +clients = [{ + 'name': + _('Gobby'), + 'description': + _('Gobby is a collaborative text editor'), + 'usage': + format_lazy( + _('start Gobby and select "Connect to Server" and ' + 'enter your {box_name}\'s domain name.'), + box_name=_(cfg.box_name)), + 'platforms': [{ + 'type': 'download', + 'os': Desktop_OS.WINDOWS.value, + 'url': 'http://releases.0x539.de/gobby/gobby-stable.exe' + }, { + 'type': 'apt', + 'os': 'Debian', + 'package_name': 'gobby' + }] +}] diff --git a/plinth/modules/matrixsynapse/manifest.py b/plinth/modules/matrixsynapse/manifest.py index 1edac0cd6..7839358cb 100644 --- a/plinth/modules/matrixsynapse/manifest.py +++ b/plinth/modules/matrixsynapse/manifest.py @@ -16,46 +16,47 @@ # from django.utils.translation import ugettext_lazy as _ +from plinth.templatetags.plinth_extras import Desktop_OS, Mobile_OS, Store -clients = [ - { - 'name': _('Riot'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'fully_qualified_name': 'im.vector.alpha', - 'url': 'https://play.google.com/store/apps/details?id=im' - '.vector.alpha ' - }, - { - 'type': 'store', - 'os': 'Android', - 'os_version': '>=6.0', - 'store_name': 'fdroid_store', - 'fully_qualified_name': 'im.vector.alpha', - 'url': 'https://f-droid.org/packages/im.vector.alpha/' - }, - { - 'type': 'web', - 'url': 'https://riot.im/app/#/home' - }, - { - 'type': 'download', - 'os': 'Debian', - 'url': 'https://riot.im/desktop.html' - }, - { - 'type': 'download', - 'os': 'macOS', - 'url': 'https://riot.im/desktop.html' - }, - { - 'type': 'download', - 'os': 'Windows', - 'os_version': '>=7', - 'url': 'https://riot.im/desktop.html' - }, - ] - }] +clients = [{ + 'name': + _('Riot'), + 'platforms': [ + { + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, + 'fully_qualified_name': 'im.vector.alpha', + 'url': 'https://play.google.com/store/apps/details?id=im' + '.vector.alpha ' + }, + { + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'os_version': '>=6.0', + 'store_name': Store.F_DROID.value, + 'fully_qualified_name': 'im.vector.alpha', + 'url': 'https://f-droid.org/packages/im.vector.alpha/' + }, + { + 'type': 'web', + 'url': 'https://riot.im/app/#/home' + }, + { + 'type': 'download', + 'os': Desktop_OS.GNU_LINUX.value, + 'url': 'https://riot.im/desktop.html' + }, + { + 'type': 'download', + 'os': Desktop_OS.MAC_OS.value, + 'url': 'https://riot.im/desktop.html' + }, + { + 'type': 'download', + 'os': Desktop_OS.WINDOWS.value, + 'os_version': '>=7', + 'url': 'https://riot.im/desktop.html' + }, + ] +}] diff --git a/plinth/modules/minetest/manifest.py b/plinth/modules/minetest/manifest.py index 1ef242008..341537561 100644 --- a/plinth/modules/minetest/manifest.py +++ b/plinth/modules/minetest/manifest.py @@ -16,28 +16,29 @@ # from django.utils.translation import ugettext_lazy as _ +from plinth.templatetags.plinth_extras import Desktop_OS, Mobile_OS, Store clients = [{ 'name': _('Minetest'), 'platforms': [{ 'type': 'download', - 'os': 'Windows', + 'os': Desktop_OS.WINDOWS.value, 'arch': 'amd64', 'os_version': 'XP, Vista, >=7', 'url': 'https://github.com/minetest/minetest/releases' '/download/0.4.16/minetest-0.4.16-win64.zip ' }, { 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, 'fully_qualified_name': 'net.minetest.minetest', 'url': 'https://play.google.com/store/apps/details?id=net' '.minetest.minetest ' }, { 'type': 'store', - 'os': 'Android', - 'store_name': 'fdroid_store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.F_DROID.value, 'fully_qualified_name': 'net.minetest.minetest', 'url': 'https://f-droid.org/packages/net.minetest.minetest/ ' }, { diff --git a/plinth/modules/mumble/manifest.py b/plinth/modules/mumble/manifest.py index 3056cd9f5..f025f5cd7 100644 --- a/plinth/modules/mumble/manifest.py +++ b/plinth/modules/mumble/manifest.py @@ -16,25 +16,20 @@ # from django.utils.translation import ugettext_lazy as _ +from plinth.templatetags.plinth_extras import Desktop_OS, Mobile_OS, Store clients = [{ 'name': _('Mumble'), 'platforms': [{ 'type': 'download', - 'os': 'Windows', - 'arch': 'i386', - 'url': 'https://github.com/mumble-voip/mumble/releases' - '/download/1.2.19/mumble-1.2.19.msi ' - }, { - 'type': 'download', - 'os': 'Windows(64-bit)', + 'os': Desktop_OS.WINDOWS.value, 'arch': 'amd64', 'url': 'https://dl.mumble.info/mumble-1.3.0~2569~gd196a4b' '~snapshot.winx64.msi ' }, { 'type': 'download', - 'os': 'macOS', + 'os': Desktop_OS.MAC_OS.value, 'url': 'https://github.com/mumble-voip/mumble/releases' '/download/1.2.19/Mumble-1.2.19.dmg ' }, { @@ -53,15 +48,15 @@ clients = [{ _('Plumble'), 'platforms': [{ 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, 'url': 'https://play.google.com/store/apps/details?id=com' '.morlunk.mumbleclient.free ', 'fully_qualified_name': 'com.morlunk.mumbleclient' }, { 'type': 'store', - 'os': 'Android', - 'store_name': 'fdroid_store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.F_DROID.value, 'url': 'https://play.google.com/store/apps/details?id=com' '.morlunk.mumbleclient.free ', 'fully_qualified_name': 'com.morlunk.mumbleclient' diff --git a/plinth/modules/quassel/manifest.py b/plinth/modules/quassel/manifest.py index 963c83970..3e02707e8 100644 --- a/plinth/modules/quassel/manifest.py +++ b/plinth/modules/quassel/manifest.py @@ -16,35 +16,30 @@ # from django.utils.translation import ugettext_lazy as _ +from plinth.templatetags.plinth_extras import Desktop_OS, Mobile_OS, Store -clients = [ - { - 'name': _('Quassel'), - 'platforms': [ - { - 'type': 'download', - 'os': 'macOS', - 'url': 'http://quassel-irc.org/pub/QuasselClient_MacOSX' - '-x86_64_0.12.4.dmg ' - }, - { - 'type': 'apt', - 'os': 'Debian', - 'package_name': 'quassel-client' - } - ] - }, - { - 'name': _('Quassseldroid'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'url': 'https://play.google.com/store/apps/details?id=com' - '.iskrembilen.quasseldroid', - 'fully_qualified_name': 'com.iskrembilen.quasseldroid' - } - ] - } -] +clients = [{ + 'name': + _('Quassel'), + 'platforms': [{ + 'type': 'download', + 'os': Desktop_OS.MAC_OS.value, + 'url': 'http://quassel-irc.org/pub/QuasselClient_MacOSX' + '-x86_64_0.12.4.dmg' + }, { + 'type': 'apt', + 'os': 'Debian', + 'package_name': 'quassel-client' + }] +}, { + 'name': + _('Quassseldroid'), + 'platforms': [{ + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, + 'url': 'https://play.google.com/store/apps/details?id=com' + '.iskrembilen.quasseldroid', + 'fully_qualified_name': 'com.iskrembilen.quasseldroid' + }] +}] diff --git a/plinth/modules/radicale/manifest.py b/plinth/modules/radicale/manifest.py index 1b2939a0b..f0ce6a18c 100644 --- a/plinth/modules/radicale/manifest.py +++ b/plinth/modules/radicale/manifest.py @@ -16,51 +16,48 @@ # from django.utils.translation import ugettext_lazy as _ +from plinth.templatetags.plinth_extras import Mobile_OS, Store -clients = [ - { - 'name': _('DAVDroid'), - 'usage': _('Enter the URL of the Radicale server (e.g. ' - 'http://localhost:5232) and your user name. DAVdroid will ' - 'show all existing calendars and address books and you can ' - 'create new.'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'url': 'https://play.google.com/store/apps/details?id=at' - '.bitfire.davdroid', - 'fully_qualified_name': 'at.bitfire.davdroid' - } - ] - }, - { - 'name': _('GNOME Calendar'), - 'platforms': [ - { - 'type': 'apt', - 'os': 'Debian', - 'package-name': 'gnome-calendar' - } - ] - }, - { - 'name': _('Evolution'), - 'description': _('Evolution is a personal information management ' - 'application that provides integrated mail, ' - 'calendaring and address book functionality.'), - 'usage': _('In Evolution add a new calendar and address book ' - 'respectively with WebDAV. Enter the URL of the Radicale ' - 'server (e.g. http://localhost:5232) and your user name. ' - 'Clicking on the search button will list the existing ' - 'calendars and address books.'), - 'platforms': [ - { - 'type': 'apt', - 'os': 'Debian', - 'package-name': 'gnome-calendar' - } - ] - } -] +clients = [{ + 'name': + _('DAVDroid'), + 'usage': + _('Enter the URL of the Radicale server (e.g. ' + 'http://localhost:5232) and your user name. DAVdroid will ' + 'show all existing calendars and address books and you can ' + 'create new.'), + 'platforms': [{ + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, + 'url': 'https://play.google.com/store/apps/details?id=at' + '.bitfire.davdroid', + 'fully_qualified_name': 'at.bitfire.davdroid' + }] +}, { + 'name': + _('GNOME Calendar'), + 'platforms': [{ + 'type': 'apt', + 'os': 'Debian', + 'package-name': 'gnome-calendar' + }] +}, { + 'name': + _('Evolution'), + 'description': + _('Evolution is a personal information management ' + 'application that provides integrated mail, ' + 'calendaring and address book functionality.'), + 'usage': + _('In Evolution add a new calendar and address book ' + 'respectively with WebDAV. Enter the URL of the Radicale ' + 'server (e.g. http://localhost:5232) and your user name. ' + 'Clicking on the search button will list the existing ' + 'calendars and address books.'), + 'platforms': [{ + 'type': 'apt', + 'os': 'Debian', + 'package-name': 'gnome-calendar' + }] +}] diff --git a/plinth/modules/repro/manifest.py b/plinth/modules/repro/manifest.py index 6f1490a13..3eee0e36b 100644 --- a/plinth/modules/repro/manifest.py +++ b/plinth/modules/repro/manifest.py @@ -16,6 +16,7 @@ # from django.utils.translation import ugettext_lazy as _ +from plinth.templatetags.plinth_extras import Desktop_OS, Mobile_OS, Store clients = [{ 'name': @@ -31,8 +32,8 @@ clients = [{ 'and simulcasting.'), 'platforms': [{ 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, 'fully_qualified_name': 'org.jitsi.meet', 'url': 'https://play.google.com/store/apps/details?id=org' '.jitsi.meet ' @@ -43,7 +44,7 @@ clients = [{ 'url': 'https://itunes.apple.com/in/app/jitsi-meet/id1165103905' }, { 'type': 'download', - 'os': 'GNU/Linux', + 'os': Desktop_OS.GNU_LINUX.value, 'url': 'https://download.jitsi.org/jitsi/debian/' }, { 'type': 'package', @@ -51,12 +52,12 @@ clients = [{ 'name': 'jitsi' }, { 'type': 'download', - 'os': 'macOS', + 'os': Desktop_OS.MAC_OS.value, 'url': 'https://download.jitsi.org/jitsi/macosx/jitsi-latest' '.dmg ' }, { 'type': 'download', - 'os': 'Windows', + 'os': Desktop_OS.WINDOWS.value, 'url': 'https://download.jitsi.org/jitsi/windows/jitsi-latest' '-x86.exe ' }] @@ -65,8 +66,8 @@ clients = [{ _('CSipSimple'), 'platforms': [{ 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, 'fully_qualified_name': 'com.csipsimple', 'url': 'https://play.google.com/store/apps/details?id=com' '.csipsimple ' diff --git a/plinth/modules/restore/manifest.py b/plinth/modules/restore/manifest.py index 385484751..fdfb5902f 100644 --- a/plinth/modules/restore/manifest.py +++ b/plinth/modules/restore/manifest.py @@ -17,14 +17,10 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('reStore'), - 'platforms': [ - { - 'type': 'web', - 'relative_url': '/restore' - } - ] - } -] +clients = [{ + 'name': _('reStore'), + 'platforms': [{ + 'type': 'web', + 'url': '/restore' + }] +}] diff --git a/plinth/modules/roundcube/manifest.py b/plinth/modules/roundcube/manifest.py index b17432ec7..ba3c2c03b 100644 --- a/plinth/modules/roundcube/manifest.py +++ b/plinth/modules/roundcube/manifest.py @@ -17,14 +17,10 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('Roundcube'), - 'platforms': [ - { - 'type': 'web', - 'relative_url': '/roundcube' - } - ] - } -] +clients = [{ + 'name': _('Roundcube'), + 'platforms': [{ + 'type': 'web', + 'url': '/roundcube' + }] +}] diff --git a/plinth/modules/shaarli/manifest.py b/plinth/modules/shaarli/manifest.py index e65df1039..ef2b6ab07 100644 --- a/plinth/modules/shaarli/manifest.py +++ b/plinth/modules/shaarli/manifest.py @@ -17,14 +17,10 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('Shaarli'), - 'platforms': [ - { - 'type': 'web', - 'relative_url': '/shaarli' - } - ] - } -] +clients = [{ + 'name': _('Shaarli'), + 'platforms': [{ + 'type': 'web', + 'url': '/shaarli' + }] +}] diff --git a/plinth/modules/syncthing/manifest.py b/plinth/modules/syncthing/manifest.py index 76977f86b..7b94ca2b8 100644 --- a/plinth/modules/syncthing/manifest.py +++ b/plinth/modules/syncthing/manifest.py @@ -83,6 +83,6 @@ clients = [{ .format(metadata['syncthing']['android-package-id']) }, { 'type': 'web', - 'relative_url': '/syncthing' + 'url': '/syncthing' }] }] diff --git a/plinth/modules/tor/manifest.py b/plinth/modules/tor/manifest.py index 13edce814..295ae73cd 100644 --- a/plinth/modules/tor/manifest.py +++ b/plinth/modules/tor/manifest.py @@ -16,59 +16,47 @@ # from django.utils.translation import ugettext_lazy as _ +from plinth.templatetags.plinth_extras import Desktop_OS, Mobile_OS, Store version = '7.0.6' -clients = [ - { - 'name': _('Tor Browser'), - 'platforms': [ - { - 'type': 'download', - 'os': 'Windows', - 'os_version': 'Windows XP, Vista, >=7', - 'url': 'https://www.torproject.org/dist/torbrowser/{v}' - '/torbrowser-install-{v}_en-US.exe '.format(v=version) - }, - { - 'type': 'download', - 'os': 'Linux(64-bit)', - 'url': 'https://www.torproject.org/dist/torbrowser/{v}/tor' - '-browser-linux64-{v} _en-US.tar.xz'.format(v=version) - }, - { - 'type': 'download', - 'os': 'Linux(32-bit)', - 'url': 'https://www.torproject.org/dist/torbrowser/{v}/tor' - '-browser-linux32-{v}_en-US.tar.xz'.format(v=version) - }, - { - 'type': 'download', - 'os': 'macOS', - 'url': 'https://www.torproject.org/dist/torbrowser/{v}' - '/TorBrowser-{v}-osx64_en-US.dmg'.format(v=version) - } - ] - }, - { - 'name': _('Orbot: Proxy with Tor'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play_store', - 'url': 'https://play.google.com/store/apps/details?id=org' - '.torproject.android', - 'fully_qualified_name': 'org.torproject.android' - }, - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'fdroid_store', - 'url': 'https://play.google.com/store/apps/details?id=org' - '.torproject.android', - 'fully_qualified_name': 'org.torproject.android' - } - ] - } -] +clients = [{ + 'name': + _('Tor Browser'), + 'platforms': [{ + 'type': 'download', + 'os': Desktop_OS.WINDOWS.value, + 'os_version': 'Windows XP, Vista, >=7', + 'url': 'https://www.torproject.org/dist/torbrowser/{v}' + '/torbrowser-install-{v}_en-US.exe '.format(v=version) + }, { + 'type': 'download', + 'os': Desktop_OS.GNU_LINUX.value, + 'url': 'https://www.torproject.org/dist/torbrowser/{v}/tor' + '-browser-linux64-{v} _en-US.tar.xz'.format(v=version) + }, { + 'type': 'download', + 'os': Desktop_OS.MAC_OS.value, + 'arch': 'amd64', + 'url': 'https://www.torproject.org/dist/torbrowser/{v}' + '/TorBrowser-{v}-osx64_en-US.dmg'.format(v=version) + }] +}, { + 'name': + _('Orbot: Proxy with Tor'), + 'platforms': [{ + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, + 'url': 'https://play.google.com/store/apps/details?id=org' + '.torproject.android', + 'fully_qualified_name': 'org.torproject.android' + }, { + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.F_DROID.value, + 'url': 'https://play.google.com/store/apps/details?id=org' + '.torproject.android', + 'fully_qualified_name': 'org.torproject.android' + }] +}] diff --git a/plinth/modules/transmission/manifest.py b/plinth/modules/transmission/manifest.py index 028b5d825..319ae4ca7 100644 --- a/plinth/modules/transmission/manifest.py +++ b/plinth/modules/transmission/manifest.py @@ -17,14 +17,10 @@ from django.utils.translation import ugettext_lazy as _ -clients = [ - { - 'name': _('Transmission'), - 'platforms': [ - { - 'type': 'web', - 'relative_url': '/transmission' - } - ] - } -] +clients = [{ + 'name': _('Transmission'), + 'platforms': [{ + 'type': 'web', + 'url': '/transmission' + }] +}] diff --git a/plinth/modules/ttrss/manifest.py b/plinth/modules/ttrss/manifest.py index fd35970b7..50326d872 100644 --- a/plinth/modules/ttrss/manifest.py +++ b/plinth/modules/ttrss/manifest.py @@ -16,30 +16,26 @@ # from django.utils.translation import ugettext_lazy as _ +from plinth.templatetags.plinth_extras import Mobile_OS, Store -clients = [ - { - 'name': _('TT-RSS Reader'), - 'platforms': [ - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'google_play-store', - 'url': 'https://play.google.com/store/apps/details?id=org' - '.ttrssreader', - 'fully_qualified_name': 'org.ttrssreader' - }, - { - 'type': 'store', - 'os': 'Android', - 'store_name': 'fdroid_store', - 'url': 'https://f-droid.org/packages/org.ttrssreader/', - 'fully_qualified_name': 'org.ttrssreader' - }, - { - 'type': 'web', - 'relative_url': '/tt-rss' - } - ] - } -] +clients = [{ + 'name': + _('TT-RSS Reader'), + 'platforms': [{ + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.GOOGLE_PLAY.value, + 'url': 'https://play.google.com/store/apps/details?id=org' + '.ttrssreader', + 'fully_qualified_name': 'org.ttrssreader' + }, { + 'type': 'store', + 'os': Mobile_OS.ANDROID.value, + 'store_name': Store.F_DROID.value, + 'url': 'https://f-droid.org/packages/org.ttrssreader/', + 'fully_qualified_name': 'org.ttrssreader' + }, { + 'type': 'web', + 'url': '/tt-rss' + }] +}] diff --git a/plinth/templates/clients.html b/plinth/templates/clients.html index 805c1da13..5f13afba3 100644 --- a/plinth/templates/clients.html +++ b/plinth/templates/clients.html @@ -29,7 +29,7 @@

- +
{% if clients|has_web_clients %} {% for client in clients %} {% if client|has_web_clients %} @@ -39,7 +39,7 @@ @@ -89,7 +89,7 @@
Web {{ client.name }} - +