Add loading error screen
This commit is contained in:
parent
e808b7bbf7
commit
21479f2940
@ -125,12 +125,12 @@ function getuserinfo(callback) {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
router.navigate("/loaderror");
|
||||
navigator.notification.alert(data.msg, null, "Error", 'Dismiss');
|
||||
openscreen("homeloaderror");
|
||||
}
|
||||
}, "json").fail(function () {
|
||||
navigator.notification.alert("Could not connect to the server. Try again later.", null, "Error", 'Dismiss');
|
||||
openscreen("homeloaderror");
|
||||
router.navigate("/loaderror");
|
||||
});
|
||||
}
|
||||
|
||||
|
36
www/pages/loaderror.html
Normal file
36
www/pages/loaderror.html
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- 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="loaderror">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="title">Netsyms</div>
|
||||
|
||||
<div class="right">
|
||||
<a href="#" onclick="loadOTPPage()" class="link icon-only">
|
||||
<i class="fas fa-key"></i>
|
||||
</a>
|
||||
<a href="/settings" class="link icon-only">
|
||||
<i class="fas fa-cog"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="block" style="text-align: center;">
|
||||
<p style="color: rgba(0,0,0,0.5);"><i class="material-icons" style="font-size: 30vw;">cloud_off</i></p>
|
||||
<h3>Can't connect to the server.</h3>
|
||||
<div class="row">
|
||||
<a href="#" class="button col button-raised button-fill button-round" onclick="restartApplication()">Try Again</a>
|
||||
<a href="#" class="button col button-raised button-round" onclick="openAccountSwitcher(false)">Switch Account</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
loadingProgressDialog.close();
|
||||
</script>
|
||||
|
||||
</div>
|
@ -56,4 +56,9 @@ var routes = [
|
||||
url: './pages/credits.html',
|
||||
name: 'credits'
|
||||
},
|
||||
{
|
||||
path: '/loaderror',
|
||||
url: './pages/loaderror.html',
|
||||
name: 'loaderror'
|
||||
},
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user