From ddcd69cb413ca7789f04fd7f1c66e2de96e33e72 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 31 May 2022 16:50:47 -0700 Subject: [PATCH] gear_menu: Link to /devlogin/ in development environment. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’d be nicer to use hash_util.build_login_link which also remembers the current hash, but that doesn’t help when the gear menu is only rendered once at page load time. Signed-off-by: Anders Kaseorg --- static/js/gear_menu.js | 1 + static/templates/gear_menu.hbs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/gear_menu.js b/static/js/gear_menu.js index d1558f8979..70ad0c492a 100644 --- a/static/js/gear_menu.js +++ b/static/js/gear_menu.js @@ -104,6 +104,7 @@ export function initialize() { can_invite_others_to_realm: settings_data.user_can_invite_others_to_realm(), corporate_enabled: page_params.corporate_enabled, is_guest: page_params.is_guest, + login_link: page_params.development_environment ? "/devlogin/" : "/login/", promote_sponsoring_zulip: page_params.promote_sponsoring_zulip, show_billing: page_params.show_billing, show_plans: page_params.show_plans, diff --git a/static/templates/gear_menu.hbs b/static/templates/gear_menu.hbs index 68531ce58e..075c8b0fde 100644 --- a/static/templates/gear_menu.hbs +++ b/static/templates/gear_menu.hbs @@ -131,7 +131,7 @@ {{/if}}