ui: fix problem_language_tab (#358)

This commit is contained in:
panda authored and GitHub committed 2022-05-17 17:24:08 +08:00
1 parent 31a7166ae9
commit ac19b2817f
3 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.37.7",
"version": "4.37.8",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -1,4 +1,6 @@
.page--problem_detail
.page--problem_detail,
.page--contest_detail_problem,
.page--homework_detail_problem
.section__tab-header
padding-top: 0;
@@ -80,7 +80,7 @@
<div class="section__tab-header-wrapper">
<ul class="section__tab-header flex-row">
{% for k in pdoc.content|contentLang %}
<a class="section__tab-header-item {{'tab--active' if (handler.request.query.lang or handler.user.viewLang or handler.session.viewLang) == k }}" data-lang="{{ k }}" href="./{{pdoc.pid|default(pdoc.docId)}}?lang={{k}}">
<a class="section__tab-header-item {{'tab--active' if (handler.request.query.lang or handler.user.viewLang or handler.session.viewLang or (pdoc.content|contentLang)[0] ) == k }}" data-lang="{{ k }}" href="./{{pdoc.pid|default(pdoc.docId)}}?lang={{k}}">
{{ model.setting.SETTINGS_BY_KEY['viewLang'].range[k] }}
</a>
{% endfor %}