Skip to content

Commit 8ec1c1c

Browse files
authored
Merge pull request element-hq#9957 from vector-im/travis/no-button-guest
Hide guest functions on the welcome page if not logged in
2 parents 428960a + 608efaa commit 8ec1c1c

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎res/welcome.html‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@
149149
background-image: url('welcome/images/icon-room-directory.svg');
150150
}
151151

152+
/*
153+
.mx_WelcomePage_loggedIn is applied by EmbeddedPage from the Welcome component
154+
If it is set on the page, we should show the buttons. Otherwise, we have to assume
155+
we don't have an account and should hide them. No account == no guest account either.
156+
*/
157+
.mx_WelcomePage:not(.mx_WelcomePage_loggedIn) .mx_WelcomePage_guestFunctions {
158+
display: none;
159+
}
160+
152161
</style>
153162

154163
<div class="mx_Parent">
@@ -169,9 +178,9 @@ <h4 class="mx_Header_subtitle">_t("Decentralised, encrypted chat &amp; collabora
169178
<!-- The comments below are meant to be used by Ansible as a quick way
170179
to strip out the marked content when desired.
171180
See https://github.com/vector-im/riot-web/issues/8622.
172-
TODO: Convert to config option if possible. -->
181+
TODO: Strip out these comments and rely on the guest flag -->
173182
<!-- BEGIN Ansible: Remove these lines when guest access is disabled -->
174-
<div class="mx_ButtonRow">
183+
<div class="mx_ButtonRow mx_WelcomePage_guestFunctions">
175184
<div>
176185
<div class="mx_ButtonWrapperText">_t("Need help?")</div>
177186
<a href="#/user/@riot-bot:matrix.org?action=chat" class="mx_ButtonParent mx_SecondaryButton mx_Button_iconHelp">

0 commit comments

Comments
 (0)