From aade2d9b1637343c5c14b8d7216a505c100b1a00 Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Sat, 11 Apr 2020 11:30:21 +0200 Subject: [PATCH] Make no tab open by default in the listing of home directory, since this is the one that usually contains a mess. --- frontend/src/js/page/wb-browse.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/js/page/wb-browse.js b/frontend/src/js/page/wb-browse.js index da81311..0c31cab 100644 --- a/frontend/src/js/page/wb-browse.js +++ b/frontend/src/js/page/wb-browse.js @@ -172,6 +172,9 @@ class WBBrowse extends Component { ownerUuid }; + const { currentUser } = app.state; + const atHome = (ownerUuid === currentUser.uuid); + return (
@@ -206,7 +209,7 @@ class WBBrowse extends Component { { (mode !== 'browse') ? null : ( this.route({ 'objTypeTab': tab['id'] }) } /> @@ -214,7 +217,7 @@ class WBBrowse extends Component { { (mode !== 'browse') ? null : - (!objTypeTab || objTypeTab === 'collection') ? ( + ((!objTypeTab && !atHome) || objTypeTab === 'collection') ? (