Add one-time authentication code tool for Station client
parent
dfa0998be8
commit
27ca27c5be
@ -0,0 +1,9 @@
|
||||
<#if licenseFirst??>
|
||||
${licenseFirst}
|
||||
</#if>
|
||||
${licensePrefix}This Source Code Form is subject to the terms of the Mozilla Public
|
||||
${licensePrefix}License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
${licensePrefix}file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
<#if licenseLast??>
|
||||
${licenseLast}
|
||||
</#if>
|
@ -0,0 +1,4 @@
|
||||
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 389 B |
@ -0,0 +1,37 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h3 id="code" style="text-align: center;"></h3>
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-primary" onclick="gencode()"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
setnavbar("app", "Login Code", "home");
|
||||
|
||||
function gencode() {
|
||||
$.post(localStorage.getItem("syncurl"), {
|
||||
username: localStorage.getItem("username"),
|
||||
key: localStorage.getItem("key"),
|
||||
action: "gencode"
|
||||
}, function (data) {
|
||||
if (data.status === 'OK') {
|
||||
$("#code").text("B-" + data.code);
|
||||
} else {
|
||||
navigator.notification.alert(data.msg, null, "Error", 'Dismiss');
|
||||
}
|
||||
}, "json").fail(function () {
|
||||
navigator.notification.alert("Could not connect to the server. Try again later.", null, "Error", 'Dismiss');
|
||||
openscreen("homeloaderror");
|
||||
});
|
||||
}
|
||||
|
||||
gencode();
|
||||
</script>
|
Loading…
Reference in New Issue