You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.2 KiB
HTML
61 lines
2.2 KiB
HTML
<!-- 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 class="page" data-name="setup2">
|
|
|
|
<div class="navbar">
|
|
<div class="navbar-inner">
|
|
<div class="title">Link Account</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="page-content">
|
|
|
|
<div class="block">
|
|
<p>Enter your password, then tap Finish.</p>
|
|
|
|
<div class="list">
|
|
<ul>
|
|
<li class="item-content item-input">
|
|
<div class="item-media"><i class="fas fa-key"></i></div>
|
|
<div class="item-inner">
|
|
<div class="item-input-wrap">
|
|
<input type="password" id="passbox" placeholder="Password">
|
|
<span class="input-clear-button"></span>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<button class="button button-fill" onclick="savePassword()">Finish</button>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
function savePassword() {
|
|
$.post(setupsyncurl, {
|
|
username: setupusername,
|
|
key: setupsynckey,
|
|
password: $('#passbox').val(),
|
|
action: "check_password"
|
|
}, function (data) {
|
|
if (data.status === 'OK') {
|
|
setuppassword = $('#passbox').val();
|
|
var accid = addaccount(setupusername, setuppassword, setupsyncurl, setupsynckey);
|
|
switchaccount(accid);
|
|
localStorage.setItem("firstrun", "1");
|
|
navigator.notification.alert("Account connected!", null, "Success", 'Continue');
|
|
restartApplication();
|
|
} 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');
|
|
});
|
|
}
|
|
</script>
|
|
</div> |