From e53fc702238bd5d5ca34d32a27bc0680c1df1aca Mon Sep 17 00:00:00 2001 From: Denis Voinovich Date: Tue, 3 Jun 2025 08:56:41 +0300 Subject: [PATCH] =?UTF-8?q?fix=20[P-251]:=20=D1=84=D0=B8=D0=BA=D1=81=20?= =?UTF-8?q?=D1=82=D1=91=D0=BC=D0=BD=D0=BE=D0=B9=20=D1=82=D0=B5=D0=BC=D1=8B?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D1=82=D0=B5=D1=81=D1=82=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20+=20=D1=84=D0=B8=D0=BA?= =?UTF-8?q?=D1=81=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=B8=20?= =?UTF-8?q?=D1=82=D0=B0=D0=B9=D0=BC=D0=B5=D1=80=D0=B0=20=D0=B2=20=D0=B8?= =?UTF-8?q?=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/testing/AssignTestDialog.vue | 26 +++++++- .../components/testing/BodyDetailTesting.vue | 44 +++++++++++-- .../src/components/testing/CatalogTest.vue | 13 ++-- .../src/components/testing/DetailCardTest.vue | 17 ++--- .../src/components/testing/QuestionBlock.vue | 13 ++-- .../src/components/testing/TestResults.vue | 10 +-- src/front/src/plugins/vuetify.js | 62 ++++++++++--------- src/front/src/views/TestHomePage.vue | 57 ++++++++++------- 8 files changed, 161 insertions(+), 81 deletions(-) diff --git a/src/front/src/components/testing/AssignTestDialog.vue b/src/front/src/components/testing/AssignTestDialog.vue index 024ad56bd..df2002812 100644 --- a/src/front/src/components/testing/AssignTestDialog.vue +++ b/src/front/src/components/testing/AssignTestDialog.vue @@ -6,7 +6,7 @@ max-width="800" persistent > - + Назначение теста @@ -116,7 +116,7 @@ - + + + diff --git a/src/front/src/components/testing/BodyDetailTesting.vue b/src/front/src/components/testing/BodyDetailTesting.vue index 46bab2575..0e4ef3c3e 100644 --- a/src/front/src/components/testing/BodyDetailTesting.vue +++ b/src/front/src/components/testing/BodyDetailTesting.vue @@ -2,7 +2,7 @@ - + Информация - Время на прохождение: {{ data?.time }} {{ timeWordDeclension }} + Время на прохождение: {{ formatTime.value }} {{ formatTime.unit }} @@ -42,8 +42,8 @@ {{ isExamMode ? 'Начать' : 'Тренироваться' }} @@ -72,6 +72,28 @@ export default { const route = useRoute(); const isExamMode = computed(() => route.query.mode === 'exam'); + const formatTime = computed(() => { + if (!props.data?.time) return { value: 0, unit: 'минут' }; + + const time = Number(props.data.time); + + // Если число больше 60, значит это секунды (таймер запущен) + if (time > 60) { + const minutes = Math.floor(time / 60); + const seconds = time % 60; + return { + value: `${minutes} мин. ${seconds}`, + unit: 'сек.' + }; + } else { + // Если меньше 60, значит это минуты (таймер не запущен) + return { + value: time, + unit: time === 1 ? 'минута' : time >= 2 && time <= 4 ? 'минуты' : 'минут' + }; + } + }); + const timeWordDeclension = computed(() => { if (!props.data?.time) return 'минут'; @@ -92,7 +114,8 @@ export default { return { isExamMode, timeWordDeclension, - formatDescription + formatDescription, + formatTime }; } }; @@ -102,6 +125,15 @@ export default { .test-info { padding: 16px; border-radius: 8px; - background-color: rgba(0, 150, 136, 0.05); + background-color: rgba(var(--v-theme-btn_text), 0.05); + color: rgb(var(--v-theme-text_carous)); +} + +:deep(.v-card-text) { + color: rgb(var(--v-theme-text_carous)); +} + +:deep(.v-card-title) { + color: rgb(var(--v-theme-text_carous)); } diff --git a/src/front/src/components/testing/CatalogTest.vue b/src/front/src/components/testing/CatalogTest.vue index 0af4abe1a..c08617bce 100644 --- a/src/front/src/components/testing/CatalogTest.vue +++ b/src/front/src/components/testing/CatalogTest.vue @@ -169,11 +169,12 @@ export default { diff --git a/src/front/src/components/testing/DetailCardTest.vue b/src/front/src/components/testing/DetailCardTest.vue index 3a050c5d9..76d31042e 100644 --- a/src/front/src/components/testing/DetailCardTest.vue +++ b/src/front/src/components/testing/DetailCardTest.vue @@ -282,7 +282,7 @@ export default {