perf(UX): Load splash screen immediately after login

This commit is contained in:
Suraj Shetty 2022-06-21 07:02:58 +05:30
parent f40c82d4d8
commit d7fe7ae39c
3 changed files with 6 additions and 4 deletions

View file

@ -195,6 +195,7 @@ login.login_handlers = (function () {
200: function (data) {
if (data.message == 'Logged In') {
login.set_status('{{ _("Success") }}', 'green');
document.body.innerHTML = `{% include "templates/includes/splash_screen.html" %}`;
window.location.href = frappe.utils.sanitise_redirect(frappe.utils.get_url_arg("redirect-to")) || data.home_page;
} else if (data.message == 'Password Reset') {
window.location.href = frappe.utils.sanitise_redirect(data.redirect_to);

View file

@ -0,0 +1,4 @@
<div class="centered splash">
<img src="{{ splash_image or "/assets/frappe/images/frappe-framework-logo.png" }}"
style="max-width: 100px; max-height: 100px;">
</div>

View file

@ -26,10 +26,7 @@
</head>
<body>
{% include "public/icons/timeless/symbol-defs.svg" %}
<div class="centered splash">
<img src="{{ splash_image or "/assets/frappe/images/frappe-framework-logo.png" }}"
style="max-width: 100px; max-height: 100px;">
</div>
{% include "templates/includes/splash_screen.html" %}
<div class="main-section">
<header></header>
<div id="body"></div>