ui: speed up page load

This commit is contained in:
undefined committed 2023-03-13 04:25:44 +08:00
1 parent cb741b346c
commit 67279c3745
15 files changed
+80 -106

No files matched your search

@@ -58,12 +58,12 @@
{% endif %}
</head>
<body>
{% block body %}{% endblock %}
{% if not isIE(handler.request.headers['user-agent']) and not handler.session.legacy %}
<script>
var UiContext = '{{ UiContext|json|jsesc|safe }}';
var UserContext = '{{ UserContext|json|jsesc|safe }}';
</script>
{% set UiContext = Object.create(UiContext) %}
{% if process.env.DEV %}
<script type="text/javascript" src="/resource/hash/lang-{{ _('__id') }}.js?version={{ global.Hydro.version['ui-default'] }}"></script>
<script type="text/javascript" src="/hydro.js?version={{ global.Hydro.version['ui-default'] }}"></script>
@@ -72,6 +72,10 @@
<script type="text/javascript" src="{{ UiContext.cdn_prefix }}hydro-{{ global.Hydro.version['ui-default'] }}.js"></script>
{% endif %}
{% endif %}
{% block body %}{% endblock %}
{% block script %}{% endblock %}
{% if not isIE(handler.request.headers['user-agent']) and not handler.session.legacy %}
<script>var UiContextNew = '{{ UiContext|json|jsesc|safe }}';</script>
{% endif %}
</body>
</html>