perf: optimize page loading timing, and allow refresh on resource loading issues

reduce white screen time
pull/118/head
moonrailgun 2 years ago
parent 5305b31ebd
commit f48ecfb9e8

@ -43,9 +43,9 @@
tip.style.fontSize = '18px';
tip.style.marginTop = '20px';
tip.style.color = 'gray';
tip.innerText = navigator.language === 'zh-CN'
? '可能资源加载出现了一些问题,请手动刷新重试一下'
: 'There may be some problems with resource loading, please refresh manually and try again'
tip.innerHTML = navigator.language === 'zh-CN'
? '可能资源加载出现了一些问题,请手动<a style="color: rgb(9, 105, 218);" href="javascript:location.reload()">刷新</a>重试一下'
: 'There may be some problems with resource loading, please <a style="color: rgb(9, 105, 218);" href="javascript:location.reload()">refresh</a> manually and try again'
el.appendChild(tip)
}
}, 10000);

@ -56,7 +56,7 @@ const plugins: Configuration['plugins'] = [
'process.env.VERSION': JSON.stringify(VERSION),
}),
new HtmlWebpackPlugin({
inject: true,
inject: 'body',
hash: false,
favicon: path.resolve(ROOT_PATH, './assets/images/favicon.ico'),
template: path.resolve(ROOT_PATH, './assets/template.html'),

Loading…
Cancel
Save