filesafe/views/auth.njk
Bobby Wibowo c3d61733af
Updated
Added iamdustan/smoothscroll polyfill in dashboard pages.
This will polyfill smooth scroll (when executed programmatically)
for older browers.

No-JS uploader's notice button when on private mode will now also say
"Log in to upload", although auth page will still require JS.

All front-end buttons will now use outlined version. I'm lovin' it.

Auth page will now show a loading spinner if the user has a saved token.
Afterwards, they will still be redirected to dashboard.

Better error handlers in home, dashboard, and auth pages.

Removed <hr> from uploads & users lists in dashboard.

"Manage your token" menu will no longer try to make an API request prior
to displaying its page.
Reloading the page will already trigger token verification anyway.

Updated public/images/fb_share.png.

Updated README.md.

A few other tweaks.
2019-09-19 14:19:11 +07:00

79 lines
2.5 KiB
Plaintext

{% set metaTitle = "Auth" %}
{% set metaUrl = '/auth' %}
{% extends "_layout.njk" %}
{% block stylesheets %}
{{ super() }}
<link rel="stylesheet" href="libs/fontello/fontello.css?v={{ globals.v3 }}">
<link rel="stylesheet" href="css/sweetalert.css?v={{ globals.v1 }}">
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="libs/sweetalert/sweetalert.min.js?v={{ globals.v3 }}"></script>
<script src="libs/axios/axios.min.js?v={{ globals.v3 }}"></script>
<script src="js/auth.js?v={{ globals.v1 }}"></script>
{% endblock %}
{% block content %}
{{ super() }}
<section id="loader" class="hero is-fullheight">
<div class="hero-body">
<div class="container has-text-centered">
<span class="loader is-inline-block"></span>
</div>
</div>
</section>
<section id="login" class="hero is-fullheight is-hidden">
<div class="hero-body">
<div class="container">
<div class="columns is-centered">
<div class="column is-one-third is-hidden-touch"></div>
<div class="column">
<h1 class="title">
Dashboard Access
</h1>
<h2 class="subtitle">
Login or register
</h2>
<form id="authForm">
<div class="field">
<div class="control">
<input id="user" name="user" class="input" type="text" placeholder="Your username" minlength="4" maxlength="32">
</div>
</div>
<div class="field">
<div class="control">
<input id="pass" name="pass" class="input" type="password" placeholder="Your password" minlength="6" maxlength="64">
</div>
</div>
<div class="field is-grouped is-grouped-right">
<div class="control">
<button id="registerBtn" type="button" class="button is-primary is-outlined">
<span class="icon">
<i class="icon-user-plus"></i>
</span>
<span>Register</span>
</button>
</div>
<div class="control">
<button id="loginBtn" type="submit" class="button is-info is-outlined">
<span class="icon">
<i class="icon-login"></i>
</span>
<span>Log in</span>
</button>
</div>
</div>
</form>
</div>
<div class="column is-one-third is-hidden-mobile"></div>
</div>
</div>
</div>
</section>
{% include "_partial/noscript.njk" %}
{% endblock %}