Skip to content
This repository was archived by the owner on Dec 15, 2020. It is now read-only.

Commit 37210b8

Browse files
committed
Fixed auth control display issues
Prevented auth controls from displaying to regular user with an extra hidden class. Stopped the sign in button from opening a new tab.
1 parent c1e3e8c commit 37210b8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,4 @@ To develop with the database:
172172
- there's no mechanism to roll back migrations yet, so testing multiple times requires deleting all but the `admins` node from the database and rerunning all migrations again
173173
- Add the class `signed-out` to any elements you want to be visible when the user isn't signed in
174174
- Add the classes `signed-in` and `hidden` to the elements you want to show when the user is signed in
175-
- Add the class `signed-in-admin` on top of the regular `signed-in hidden` to the elements you want to show when the user is signed in as an admin
175+
- Add the classes `signed-in-admin` and `hidden` on top of the regular `signed-in hidden` to the elements you want to show when the user is signed in as an admin

admin.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<nav>
2323
<a href="game.html">Would you like to play a game?</a>
2424
<a id="button-sign-in" class="signed-out" role="button" target="_blank" rel="noopener" href="#">Sign In</a>
25-
<a id="button-admin" class="signed-in signed-in-admin hidden" role="button" href="./admin.html">Manage Web App</a>
25+
<a id="button-admin" class="signed-in signed-in-admin hidden hidden" role="button" href="./admin.html">Manage Web App</a>
2626
<a id="button-sign-out" class="signed-in hidden" role="button" href="#">Sign Out</a>
2727
</nav>
2828
<ul class="info">

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
</a>
2222
<nav>
2323
<a href="game.html">Would you like to play a game?</a>
24-
<a id="button-sign-in" class="signed-out" role="button" target="_blank" rel="noopener" href="#">Sign In</a>
25-
<a id="button-admin" class="signed-in signed-in-admin hidden" role="button" href="./admin.html">Manage Web App</a>
24+
<a id="button-sign-in" class="signed-out" role="button" href="#">Sign In</a>
25+
<a id="button-admin" class="signed-in signed-in-admin hidden hidden" role="button" href="./admin.html">Manage Web App</a>
2626
<a id="button-sign-out" class="signed-in hidden" role="button" href="#">Sign Out</a>
2727
</nav>
2828
<ul class="info">

0 commit comments

Comments
 (0)