pwa: do not include pwa menu entry on portal agent (#77864) #102

Merged
fpeters merged 1 commits from wip/77864-no-pwa-portal-agent into main 2023-05-26 07:39:17 +02:00
1 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,8 @@ class AppConfig(django.apps.AppConfig):
def get_extra_manager_actions(self):
from django.conf import settings
if settings.TEMPLATE_VARS.get('pwa_display') == 'standalone':
from combo.utils.misc import is_portal_agent
if settings.TEMPLATE_VARS.get('pwa_display') == 'standalone' and not is_portal_agent():
return [{'href': reverse('pwa-manager-homepage'), 'text': _('Mobile Application (PWA)')}]
return []