Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide guest functions on the welcome page if not logged in #9957

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions res/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@
background-image: url('welcome/images/icon-room-directory.svg');
}

/*
.mx_WelcomePage_loggedIn is applied by EmbeddedPage from the Welcome component
If it is set on the page, we should show the buttons. Otherwise, we have to assume
we don't have an account and should hide them. No account == no guest account either.
*/
.mx_WelcomePage:not(.mx_WelcomePage_loggedIn) .mx_WelcomePage_guestFunctions {
display: none;
}

</style>

<div class="mx_Parent">
Expand All @@ -169,9 +178,9 @@ <h4 class="mx_Header_subtitle">_t("Decentralised, encrypted chat &amp; collabora
<!-- The comments below are meant to be used by Ansible as a quick way
to strip out the marked content when desired.
See https://github.com/vector-im/riot-web/issues/8622.
TODO: Convert to config option if possible. -->
TODO: Strip out these comments and rely on the guest flag -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you file a new issue to do that? It seems much cleaner, but also likely to be forgotten...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<!-- BEGIN Ansible: Remove these lines when guest access is disabled -->
<div class="mx_ButtonRow">
<div class="mx_ButtonRow mx_WelcomePage_guestFunctions">
<div>
<div class="mx_ButtonWrapperText">_t("Need help?")</div>
<a href="#/user/@riot-bot:matrix.org?action=chat" class="mx_ButtonParent mx_SecondaryButton mx_Button_iconHelp">
Expand Down