From 71def6254d796420a7c6e76cb8bdb4cd9f9f5878 Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Sat, 28 Aug 2021 19:35:44 +0000 Subject: [PATCH] If a user is a member of only one arcade, display it directly instead of a drop-down in the nav menu. --- bemani/frontend/app.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bemani/frontend/app.py b/bemani/frontend/app.py index c32962d..4cd9fb8 100644 --- a/bemani/frontend/app.py +++ b/bemani/frontend/app.py @@ -693,7 +693,14 @@ def navigation() -> Dict[str, Any]: # Arcade owner pages arcadeids = g.data.local.machine.from_userid(g.userID) - if len(arcadeids) > 0: + if len(arcadeids) == 1: + arcade = g.data.local.machine.get_arcade(arcadeids[0]) + pages.append({ + 'label': arcade.name, + 'uri': url_for('arcade_pages.viewarcade', arcadeid=arcade.id), + 'right_justify': True, + }) + elif len(arcadeids) > 1: entries = [] for arcadeid in arcadeids: arcade = g.data.local.machine.get_arcade(arcadeid)