Files
zoff/server/public/layouts/client/token.handlebars
Kasper Rynning-Tønnesen dbba54c7ad Origin for api-tokens
2018-03-16 10:28:10 +01:00

64 lines
3.6 KiB
Handlebars

<header>
<nav id="fp-nav">
<div class="nav-wrapper">
<a href="/" class="brand-logo">
<img class="zicon" src="/assets/images/z.svg" alt="zoff" title="Zoff" />
</a>
<div id="frontpage-viewer-counter" class="noselect" title="Divided among all channels. Hidden or not"></div>
<ul class="right hide-on-med-and-down">
<li><a class="header-buttons waves-effect waves-green" title="Remote control a Zoff player" href="https://remote.zoff.me">Remote</a></li>
<li><a class="header-buttons modal-trigger waves-effect waves-orange" data-target="about">About</a></li>
</ul>
</div>
</nav>
{{> modal/about}}
</header>
<div id="main-container" class="token-container">
<main class="center-align container">
<div class="token-info left-align select">
{{#if activated}}
<h1 class="center-align">API-token</h1>
<p>Here is your api token</p>
<h4 class="select-all auto-pointer">{{token}}</h3>
<p>Use it wisely, and don't lose it!</p>
<p>As of now, the tokens have a limit of 100 requests a second. If you need a higher limit, just contact the team and we'll set you up for as much as you need.</p>
{{else}}
<h2 class="center-align">API-token</h2>
<p>Apply for a API-token with your email here! You'll get an email on the specified address, with a link. Follow that link, and the token will be shown to you! Take good care of it, and don't lose it. It won't be shown to you again.</p>
<p>If you're wondering anything about how the api works, there is a guide on our GitHub. You can also click <a href="https://zoff.me/api/help">HERE</a> to be taken to the detailed README.</p>
<p>As of now, the tokens have a limit of 100 requests a second. If you need a higher limit, just contact the team and we'll set you up for as much as you need.</p>
<p>If you want to restrict the token for use on one domain only, you can change the Origin from * to the website of your choice (if you want for https://zoff.me, then you'd input <b>zoff.me</b>).</p>
{{/if}}
</div>
{{#if activated}}
<div id="iframe-container"></div>
{{else}}
<form class="token-form row" type="post">
<div class="row center">
<div class="input-field col s6 offset-s3">
<label for="email_address" class="noselect">Email</label>
<input type="email" autocomplete="off" class="validate" id="email_address" />
</div>
<div class="input-field col s6 offset-s3">
<label for="origin" class="noselect">Origin</label>
<input type="text" autocomplete="off" id="origin" value="*" />
</div>
</div>
<div class="col offset-m3">
{{{captcha}}}
</div>
<div class="input-field col s12 m2">
<input type="submit" class="btn submit" />
</div>
<div class="full-form-token valign-wrapper hide">
<div class="preloader-wrapper medium active center-loader-token">
{{> spinner}}
</div>
</div>
</form>
{{/if}}
<p>Any lost tokens can easily be deleted by our admins, so just send us an email if something goes awry. Just click the CONTACT button in the footer, and we will be with you as fast as we can!</p>
<br>
</main>
</div>