* zin: optimize zinbar UI

This commit is contained in:
sunhao
2023-04-27 08:35:10 +08:00
parent 183e5b8c7f
commit 48a4a2f875
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -1,6 +1,8 @@
(function()
{
let DEBUG = true;
const config = window.config;
const DEBUG = config.debug;
const isIndexPage = config.currentModule === 'index' && (config.currentMethod === 'index' || config.currentMethod === 'index2');
const currentCode = window.name.substring(4);
const isInAppTab = parent.window !== window;
const fetchTasks = new Map();
@@ -52,7 +54,7 @@
function initZinbar()
{
if(!DEBUG) return;
if(!DEBUG || isIndexPage) return;
let $bar = $('#zinbar');
if($bar.length) return;
@@ -77,6 +79,7 @@
function updatePerfInfo(options, stage, error)
{
if(!DEBUG || isIndexPage) return;
options[stage] = performance.now();
const $perf = options.id === 'page' ? $('#pagePerf') : $('#partPerf');
if(stage === 'requestBegin')
@@ -522,8 +525,6 @@
if(window.defaultAppUrl) loadPage(window.defaultAppUrl);
else if(DEBUG) loadCurrentPage('zinErrors()');
DEBUG = window.config.debug;
/* Compatible with old version */
if(DEBUG && typeof window.zin !== 'object' && isInAppTab)
{
+1 -1
View File
@@ -72,13 +72,13 @@ class pageBase extends wg
$this->block('headBefore'),
$zui ? h::importCss($config->zin->zuiPath . 'zui.zentao.css', set::id('zuiCSS')) : null,
$zui ? h::importJs($config->zin->zuiPath . 'zui.zentao.umd.cjs', set::id('zuiJS')) : null,
h::jsVar('window.config', $jsConfig, set::id('configJS')),
$zui ? h::importJs($app->getWebRoot() . 'js/zui3/zin.js', set::id('zinJS')) : null,
$head,
),
h::body
(
empty($imports) ? NULL : h::import($imports),
h::jsVar('window.config', $jsConfig, set::id('configJS')),
set($bodyProps),
set::class($bodyClass),
empty($css) ? NULL : h::css($css, set::id('pageCSS')),