The frontend/UI server, written in JS using the MarkoJS library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
920 B

6 years ago
6 years ago
  1. <div class="menu">
  2. <include(input.renderBody) />
  3. <if(input.user != null)>
  4. <menu-gap />
  5. <menu-header>User</menu-header>
  6. <menu-link if(!input.user.loggedIn) icon="L" href="/auth/login" on-click("loginClicked")>Login</menu-link>
  7. <menu-link if(input.user.loggedIn) icon="L" href="/auth/logout" on-click("logoutClicked")>Logout <span class="weak">(${input.user.name})</span></menu-link>
  8. <modal enabled=state.loggingIn notification on-close("closeModal")>
  9. <h1>Logging you in...</h1>
  10. <p>You may be redirected to Auth0 if it's been a while.</p>
  11. </modal>
  12. <modal enabled=state.loggingOut notification on-close("closeModal")>
  13. <h1>Logging you out...</h1>
  14. <p>You can probably log back in without entering your info if you're quick.</p>
  15. </modal>
  16. </if>
  17. <else-if(!input.allowNoUser)>
  18. <menu-blurb class="error">input.user is missing!</menu-blurb>
  19. </else-if>
  20. </div>