ui: allow manually set legacy mode

This commit is contained in:
undefined committed 2023-01-10 05:20:23 +08:00
1 parent e5de4f101b
commit cca5cb895e
6 files changed
+32 -18

No files matched your search

@@ -32,7 +32,7 @@
--code-font-family: "{{ UserContext.codeFontFamily }}", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace";
--font-ligatures: {{ "normal" if UserContext.codeFontLigatures else "none" }} !important;
}
{% if not isIE(handler.request.headers['user-agent']) %}
{% if not isIE(handler.request.headers['user-agent']) and not handler.session.legacy %}
#panel { display: flex; flex-direction: column; }
{% endif %}
</style>
@@ -42,7 +42,7 @@
<link rel="stylesheet" media="all" href="{{ UiContext.cdn_prefix }}default-{{ global.Hydro.version['ui-default'] }}.theme.css">
<link rel="stylesheet" media="all" href="{{ UiContext.cdn_prefix }}hydro.css">
{% endif %}
{% if not isIE(handler.request.headers['user-agent']) %}
{% if not isIE(handler.request.headers['user-agent']) and not handler.session.legacy %}
<script>
var _htmlNode = document.documentElement;
_htmlNode.className = _htmlNode.className.replace(' nojs', ' hasjs');
@@ -59,7 +59,7 @@
</head>
<body>
{% block body %}{% endblock %}
{% if not isIE(handler.request.headers['user-agent']) %}
{% 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 }}';