mirror of
https://github.com/OpenBankProject/API-Explorer.git
synced 2026-02-06 18:56:49 +00:00
start-login id -> class so we can have more than one login link on a page
This commit is contained in:
parent
97727a2af1
commit
cdaeec5942
@ -41,8 +41,8 @@ import net.liftweb.http.js.JsCmds.Noop
|
||||
|
||||
class Login {
|
||||
|
||||
// TODO show currenctly loggedin user / name
|
||||
private def loggedIn = {
|
||||
|
||||
".logged-out *" #> "" &
|
||||
".logout [onclick+]" #> SHtml.onEvent(s => {
|
||||
OAuthClient.logoutAll()
|
||||
@ -52,7 +52,7 @@ class Login {
|
||||
|
||||
def loggedOut = {
|
||||
".logged-in *" #> "" &
|
||||
"#start-login [onclick]" #> {
|
||||
".start-login [onclick]" #> {
|
||||
def actionJS: JsCmd = {
|
||||
OAuthClient.redirectToOauthLogin()
|
||||
Noop
|
||||
|
||||
@ -34,12 +34,21 @@ Berlin 13359, Germany
|
||||
Sorry, we couldn't find the page you were looking for.
|
||||
</p>
|
||||
<p>
|
||||
Maybe this is because you don't have the right permissions
|
||||
<lift:TestCond.loggedOut>
|
||||
(you are not logged in).
|
||||
</lift:TestCond.loggedOut>
|
||||
Maybe this is because you don't have the right permissions.
|
||||
</p>
|
||||
|
||||
|
||||
<div class="lift:Login.login">
|
||||
<div class="logged-out">
|
||||
You might like to <a class="start-login" href="#">login</a>
|
||||
</div>
|
||||
<div class="logged-in">
|
||||
<div class="profile-info">
|
||||
Please double check the URL or <span class="logout">logout</span> and login as a different user.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ h1 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#start-login,
|
||||
.start-login,
|
||||
.logout,
|
||||
a {
|
||||
color: #1C8B77;
|
||||
@ -21,7 +21,7 @@ a:hover {
|
||||
color: #156759;
|
||||
}
|
||||
|
||||
#start-login:hover,
|
||||
.start-login:hover,
|
||||
.logout:hover {
|
||||
color: #156759;
|
||||
text-decoration: underline;
|
||||
|
||||
@ -57,7 +57,7 @@ Berlin 13359, Germany
|
||||
<div id="account">
|
||||
<div class="lift:Login.login">
|
||||
<div class="logged-out">
|
||||
<a id="start-login" href="#">Login</a>
|
||||
<a class="start-login" href="#">Login</a>
|
||||
</div>
|
||||
<div class="logged-in">
|
||||
<div class="profile-info">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user