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 {