perf(UX): Load splash screen immediately after login
This commit is contained in:
parent
f40c82d4d8
commit
d7fe7ae39c
3 changed files with 6 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
4
frappe/templates/includes/splash_screen.html
Normal file
4
frappe/templates/includes/splash_screen.html
Normal 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>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue