diff --git a/frappe/apps.py b/frappe/apps.py index 14d731d56415..f89265e6b392 100644 --- a/frappe/apps.py +++ b/frappe/apps.py @@ -33,10 +33,9 @@ def get_apps(): def get_route(app_name): - hooks = frappe.get_hooks(app_name=app_name) - if hooks.get("app_icon_route"): - return hooks.get("app_icon_route")[0] - return "/apps" + apps = frappe.get_hooks("add_to_apps_screen", app_name=app_name) + app = next((app for app in apps if app.get("name") == app_name), None) + return app.get("route") if app and app.get("route") else "/apps" def is_desk_apps(apps): diff --git a/frappe/www/apps.html b/frappe/www/apps.html index df3a1640230f..90088a4413f1 100644 --- a/frappe/www/apps.html +++ b/frappe/www/apps.html @@ -7,7 +7,7 @@ endblock -%} {%- block footer -%} {%- endblock -%} {% block content %}
-
{{ _('Select the app to continue') }}
+
{{ _('Select an app to continue') }}
{% set appsCount = apps|length if apps|length <= 6 else 6 %}
{% for app in apps %} @@ -16,17 +16,17 @@
{{ app.title }}
- +
{% endfor %}
- +
{% endblock %} @@ -62,5 +62,13 @@ } }); }); + $('.logout-btn').on('click', function() { + frappe.call({ + method: 'logout', + callback: function() { + window.location.href = '/login'; + } + }); + }); {% endblock %}