UI bugfixes with boss

This commit is contained in:
Константин Лебединский
2026-04-30 19:53:49 +05:00
parent df6e770f90
commit b72b485fce
17 changed files with 469 additions and 250 deletions
+23 -3
View File
@@ -1,6 +1,21 @@
{% extends "base.html" %}
{% block title %}Тесты — каталог{% endblock %}
{% macro catalog_test_params_line(t) -%}
{%- set tl = t.time_limit -%}
{%- set timestr = 'без ограничения' if tl is none or tl == 0 else (tl|string ~ ' мин') -%}
{%- set rm = t.result_mode or 'end' -%}
{%- set res = 'сразу' if rm == 'immediate' else 'в конце' -%}
{%- if rm != 'immediate' -%}
{%- set hint = 'недоступны' -%}
{%- elif t.hints_enabled -%}
{%- set hint = 'вкл' -%}
{%- else -%}
{%- set hint = 'выкл' -%}
{%- endif -%}
Порог: {{ t.passing_threshold }}% · Вопросов: {{ t.questions_count }} · Время: {{ timestr }} · Результат: {{ res }} · Подсказки: {{ hint }}
{%- endmacro %}
{% block content %}
{% if ui_variant == 'legacy' %}
<section class="legacy-list-shell">
@@ -22,6 +37,7 @@
{{ t.author_full_name or '—' }}
<span class="list-row__meta-tail"> · Версия {{ t.version }}</span>
</span>
<span class="list-row__params muted" style="display:block;font-size:0.78rem;margin-top:0.2rem;line-height:1.35;">{{ catalog_test_params_line(t) }}</span>
</a>
</div>
<div class="list-row__side">
@@ -48,6 +64,7 @@
{{ t.author_full_name or '—' }}
<span class="list-row__meta-tail"> · Версия {{ t.version }} · скрыт</span>
</span>
<span class="list-row__params muted" style="display:block;font-size:0.78rem;margin-top:0.2rem;line-height:1.35;">{{ catalog_test_params_line(t) }}</span>
</a>
</div>
<div class="list-row__side">
@@ -96,6 +113,7 @@
Открыть
</span>
</div>
<p class="mt-1.5 text-xs text-ink-500 leading-snug">{{ catalog_test_params_line(t) }}</p>
</a>
</li>
{% endfor %}
@@ -111,10 +129,12 @@
</summary>
<ul class="mt-3 space-y-2">
{% for t in hidden %}
<li class="flex items-center justify-between gap-2 text-sm">
<span>{{ t.title }} <span class="text-ink-500">· v{{ t.version }}</span></span>
<li class="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between text-sm">
<span class="min-w-0">{{ t.title }} <span class="text-ink-500">· v{{ t.version }}</span>
<span class="block text-xs text-ink-500 mt-0.5 leading-snug">{{ catalog_test_params_line(t) }}</span>
</span>
<a href="{{ url_for('tests.tests_editor_page', test_id=t.id) }}"
class="text-brand-700 hover:underline">Открыть</a>
class="text-brand-700 hover:underline shrink-0">Открыть</a>
</li>
{% endfor %}
</ul>