telebit-relay.js/lib/extensions/admin/account.html

88 lines
3.1 KiB
HTML
Raw Normal View History

2018-07-07 09:45:33 +00:00
<html>
<head>
<title>Telebit Account</title>
</head>
<body>
2018-08-05 08:11:54 +00:00
<div class="v-app">
2018-08-20 17:42:59 +00:00
<div v-if="spinner" style="position: absolute; width: 100%; height: 100%; background-color: #ddd;">Loading... </div>
2018-08-10 08:48:06 +00:00
<div v-if="!hasAccount">
<h1>Login</h1>
2018-08-20 17:42:59 +00:00
<form class="js-auth-form" v-on:submit.prevent="login()">
<input class="js-auth-subject" v-model="newEmail" placeholder="email" type="email" required/>
2018-08-10 08:48:06 +00:00
<button class="js-auth-submit" type="submit">Login</button>
</form>
</div>
<div v-if="hasAccount">
<h1>Account</h1>
2018-08-20 17:42:59 +00:00
<button v-on:click.prevent.stop="logout()" type="click">Logout</button>
<!-- not yet -->
<!--form v-on:submit.prevent="challengeEmail()">
2018-08-10 08:48:06 +00:00
Authorize another email:
<input v-model="newEmail" placeholder="jon@example.com" type="email" required/>
<button type="submit">Next</button>
2018-08-20 17:42:59 +00:00
</form-->
2018-08-20 19:38:58 +00:00
<div v-if="claims.length">
<h3>Pending Claims</h3>
<p>If your DNS host supports ANAME records, please use those instead of CNAMEs.</p>
<p>If CNAMEs are not supported, set an A record to {{ site.deviceDomainA }}.</p>
<ol>
<li v-for="claim in claims">
<span>{{ claim.value }}</span>
<br>
<span v-if="'dns' === claim.type">CNAME <span v-if="claim.wildcard">*.</span>{{ claim.value }}: {{ site.deviceDomain }}</span>
<br>
<span v-if="'dns' === claim.type">TXT _claim-challenge.{{ claim.value }}: {{ claim.challenge }}</span>
<br>
<button v-on:click.prevent="checkDns(claim)">Check</button>
</li>
</ol>
</div>
<h3>Devices</h3>
<div v-if="!devices.length">
You can add up to 5 devices:
<pre><code>curl -sf https://get.telebit.io/ | bash</code></pre>
</div>
<div v-if="devices.length">
<ol>
<li v-for="device in devices">
<span v-if="device.id">{{ device.id }}</span> {{ device.socketId }}
<ol>
<li v-for="name in device.names">{{ name }}</li>
</ol>
</li>
</ol>
</div>
2018-08-19 07:33:03 +00:00
<h3>Domains</h3>
2018-08-20 19:38:58 +00:00
<form v-on:submit.prevent="challengeDns()">
Add a custom domain:
<input v-model="newDomain" placeholder="example.com" type="text" required/>
<button type="submit">Next</button>
</form>
<div v-if="domains.length">
<ol>
<li v-for="domain in domains">
<span v-if="domain.wildcard">*.</span>{{ domain.name }} <span v-if="domain.hostname">- {{domain.hostname}} ({{domain.os}} {{domain.arch}})</span>
</li>
</ol>
</div>
<h3>Debug: Token</h3>
2018-08-10 08:48:06 +00:00
<pre><code v-text="token"></code></pre>
</div>
2018-08-05 08:11:54 +00:00
</div>
<!-- development version, includes helpful console warnings -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
2018-07-07 09:45:33 +00:00
<script src="assets/oauth3.org/oauth3.core.js"></script>
2018-08-10 07:44:42 +00:00
<script src="js/account.js"></script>
2018-07-07 09:45:33 +00:00
</body>
</html>