From 3d13bac8dfc1b7e96ccfc8a53cb998b5aa29da03 Mon Sep 17 00:00:00 2001 From: sunhao Date: Mon, 24 Jun 2024 16:08:00 +0800 Subject: [PATCH] * [ui] fix loading indicator in login page. --- module/user/css/login.ui.css | 6 +++--- www/js/zui3/zin.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/user/css/login.ui.css b/module/user/css/login.ui.css index 7f0c2fc5ba..df3ee3f86f 100644 --- a/module/user/css/login.ui.css +++ b/module/user/css/login.ui.css @@ -1,7 +1,9 @@ body {background: var(--color-primary-500) linear-gradient(-90deg, var(--color-primary-600) 0%, var(--color-primary-500) 100%); background-color: var(--color-primary-500);} #main {min-height:0px;} +#main.loading::before {display: none!important;} #login {max-width: 720px !important; margin: 0 auto; margin-top: 5%; padding: 0 40px;} -#loginPanel {background: #fff; overflow: hidden; box-shadow: 0 0 20px 0 rgba(0,0,0,.1); border-radius: 3px;} +#loginPanel {background: #fff; overflow: hidden; box-shadow: 0 0 20px 0 rgba(0,0,0,.1); border-radius: 3px; position: relative;} +#main.loading #loginPanel::before {content: ' '; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; background-color: rgba(var(--color-canvas-rgb),.7); border-radius: inherit; z-index: 1;} #loginPanel .header {position: relative;} #loginPanel .header > h2 {font-size: 16px; margin: 0; line-height: 32px; max-width: calc(100% - 90px); display: inline-block;} @@ -42,5 +44,3 @@ input[name="captcha"] {border-bottom-right-radius: var(--radius-none) !important .table-row-extension .alert {margin-bottom: 0px !important;} .table-row-extension .content {color: #3c4353;} .table-row-extension .expired-tips {cursor: pointer;} - -.load-indicator.loading:after, .load-indicator.loading:before {opacity: 0;} diff --git a/www/js/zui3/zin.js b/www/js/zui3/zin.js index c43bac1e9b..0b848efd74 100644 --- a/www/js/zui3/zin.js +++ b/www/js/zui3/zin.js @@ -458,8 +458,6 @@ var $target = $(target); loadingClass = loadingClass || 'loading'; - $loginPanel = $target.find('#loginPanel'); - if($loginPanel.length > 0) $target = $loginPanel; const position = $target.css('position'); if(!['relative', 'absolute', 'fixed'].includes(position)) $target.css('position', 'relative'); @@ -1680,6 +1678,8 @@ if(!isInAppTab && !isIndexPage) { + const initialState = {url: currentAppUrl, title: document.title}; + window.history.pushState(initialState, initialState.title, initialState.url); $(window).on('popstate', function(event) { const state = event.state;