pwa: only enable PWA if pwa_display is standalone (#29471)

This commit is contained in:
Frédéric Péters 2019-01-05 20:07:32 +01:00
parent 522437c8db
commit 2d4ca51241
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class AppConfig(django.apps.AppConfig):
def get_extra_manager_actions(self):
from django.conf import settings
if settings.TEMPLATE_VARS.get('pwa_display') in ('standalone', 'fullscreen'):
if settings.TEMPLATE_VARS.get('pwa_display') == 'standalone':
return [{'href': reverse('pwa-manager-homepage'),
'text': _('Mobile Application (PWA)')}]
return []

View File

@ -24,7 +24,7 @@ register = template.Library()
@register.simple_tag(takes_context=True)
def pwa_navigation(context):
if settings.TEMPLATE_VARS.get('pwa_display') not in ('standalone', 'fullscreen'):
if settings.TEMPLATE_VARS.get('pwa_display') != 'standalone':
return ''
pwa_navigation_template = template.loader.get_template('combo/pwa/navigation.html')
entries = list(PwaNavigationEntry.objects.all())