Исправили ошибки на которые указал тестировщик

This commit is contained in:
alisagerasimova
2026-03-16 14:59:27 +03:00
parent f7ae74dd9b
commit b43057e750
4 changed files with 92 additions and 60 deletions
+17 -13
View File
@@ -112,7 +112,7 @@ function cancel() {
function cleanResult() { function cleanResult() {
clickCount.value = 1; clickCount.value = 1;
listOfTrips.value.forEach(item => { numbers.value.forEach(item => {
item.isPlatform = false; item.isPlatform = false;
item.isQR = false; item.isQR = false;
item.variable = []; item.variable = [];
@@ -174,9 +174,11 @@ function createPlatform(item, color) {
} }
function deletePlatform(item) { function deletePlatform(item) {
if (item.isPlatform) {
item.BgImg = 'images/ArUco-marker.jpg' item.BgImg = 'images/ArUco-marker.jpg'
item.isPlatform = false item.isPlatform = false
} }
}
function createQR(item) { function createQR(item) {
if (!item.variable.length) { if (!item.variable.length) {
@@ -190,8 +192,10 @@ function createQR(item) {
} }
function deleteQR(item) { function deleteQR(item) {
if (item.isQR) {
item.BgImg = 'images/ArUco-marker.jpg' item.BgImg = 'images/ArUco-marker.jpg'
item.isQR = true item.isQR = false
}
} }
function deletePointMap(item) { function deletePointMap(item) {
@@ -288,9 +292,8 @@ function onContextMenu(e, item) {
<template> <template>
<div class="wraper"> <div class="wraper">
<div class="grid"> <div class="grid">
<div class="square" v-for="(item, index) in numbers" :data-key="index" :key="index" <div class="square" v-for="(item, index) in numbers" :data-key="index" :key="index" @click="setNumber(item)"
@click="setNumber(item)" @contextmenu.prevent="onContextMenu($event, item)" @contextmenu.prevent="onContextMenu($event, item)" :style="{ backgroundImage: `url(${item.BgImg})` }">
:style="{backgroundImage: `url(${item.BgImg})`}">
{{ numbers[index].variable.join(", ") }} {{ numbers[index].variable.join(", ") }}
</div> </div>
</div> </div>
@@ -304,11 +307,7 @@ function onContextMenu(e, item) {
</div> </div>
<MyDialog <MyDialog v-model:show="isModalVisible" class="dialogWindow" :is-success=Boolean(listOfTrips.length)>
v-model:show="isModalVisible"
class="dialogWindow"
:is-success=Boolean(listOfTrips.length)
>
<template #header> <template #header>
<strong v-if="listOfTrips.length">Код готов!</strong> <strong v-if="listOfTrips.length">Код готов!</strong>
<strong v-else>Код не готов!</strong> <strong v-else>Код не готов!</strong>
@@ -328,13 +327,17 @@ function onContextMenu(e, item) {
</template> </template>
<style> <style>
* {
font-family: 'Courier New', Courier, monospace;
}
html { html {
background-image: radial-gradient(#383838e2, #222222); background-image: radial-gradient(#23aae3e2, #222222);
font-size: 18px; font-size: 18px;
} }
:root { :root {
--side: 70px; --side: 75px;
} }
.wraper { .wraper {
@@ -346,7 +349,7 @@ html {
display: grid; display: grid;
padding: 3px; padding: 3px;
grid-template-columns: repeat(10, var(--side)); grid-template-columns: repeat(10, var(--side));
gap: 10px; gap: 5px;
user-select: none; user-select: none;
} }
@@ -367,6 +370,7 @@ html {
1px -1px 0 black, 1px -1px 0 black,
-1px 1px 0 black, -1px 1px 0 black,
1px 1px 0 black; 1px 1px 0 black;
box-sizing: border-box;
} }
.square:hover { .square:hover {
+8 -3
View File
@@ -38,6 +38,10 @@ const props = defineProps({
</script> </script>
<style> <style>
:root {
--successColor: #4ee882
}
.modal-backdrop { .modal-backdrop {
position: fixed; position: fixed;
top: 0; top: 0;
@@ -74,7 +78,7 @@ const props = defineProps({
} }
.modal-header-success { .modal-header-success {
color: #4AAE9B; color: var(--successColor);
} }
.modal-header-error { .modal-header-error {
@@ -89,17 +93,18 @@ const props = defineProps({
.modal-footer { .modal-footer {
justify-content: flex-end; justify-content: flex-end;
border-top: 1px solid white; border-top: 1px solid white;
} }
.modal-footer button { .modal-footer button {
justify-content: flex-end; justify-content: flex-end;
border-top: 1px solid white; border-top: 1px solid white;
padding: 5px; padding: 5px;
color: white; color: rgb(0, 0, 0);
} }
.modal-footer-success button { .modal-footer-success button {
background-color: #4AAE9B; background-color: var(--successColor);
border: none; border: none;
margin: 3px; margin: 3px;
} }
+41 -24
View File
@@ -1,12 +1,7 @@
<template> <template>
<div class="navigation-wrapper"> <div class="navigation-wrapper">
<!-- Кнопка Бургер --> <!-- Кнопка Бургер -->
<button <button class="burger-btn" @click="toggleMenu" :class="{ 'is-active': isOpen }" aria-label="Menu">
class="burger-btn"
@click="toggleMenu"
:class="{ 'is-active': isOpen }"
aria-label="Menu"
>
<span class="line"></span> <span class="line"></span>
<span class="line"></span> <span class="line"></span>
<span class="line"></span> <span class="line"></span>
@@ -29,10 +24,7 @@
</nav> </nav>
</aside> </aside>
</transition> </transition>
<MyDialog <MyDialog isSuccess v-model:show="isModalVisible">
isSuccess
v-model:show="isModalVisible"
>
<template #header> <template #header>
<strong>{{ infoCard.title }}</strong> <strong>{{ infoCard.title }}</strong>
</template> </template>
@@ -40,9 +32,11 @@
<p>{{ infoCard.body }}</p> <p>{{ infoCard.body }}</p>
</main> </main>
<template #footer> <template #footer>
<custom-button title="Посмотреть на stepike">Курс</custom-button> <div class="navigation-wrapper__footer">
<custom-button title="Посмотреть в официальной документации">Документация</custom-button> <custom-button :to="infoCard.hrefToCourse" title="Посмотреть на Stepik">Курс</custom-button>
<custom-button>ОК</custom-button> <custom-button :to="infoCard.hrefToDoc" title="Посмотреть в официальной документации">Документация</custom-button>
<custom-button @click="isModalVisible = false">ОК</custom-button>
</div>
</template> </template>
</MyDialog> </MyDialog>
</div> </div>
@@ -73,9 +67,9 @@ function openInfoCard(obj) {
const links = [ const links = [
{ {
title: 'Что такое ROS?', title: 'Что такое ROS?',
body: 'ROS — переводится как robot operation system', body: 'ROS (Robot Operating System) — экосистема для программирования роботов с открытым исходным кодом',
hrefToDoc: 'https://clover.coex.tech/ru/simple_offboard.html', hrefToDoc: 'https://www.ros.org/',
hrefToCourse: 'https://stepic.org' hrefToCourse: 'https://stepik.org/lesson/2260739/step/1?unit=2294748'
}, },
{ {
title: '2', title: '2',
@@ -139,10 +133,12 @@ defineExpose({open: () => (isOpen.value = true), close: closeMenu});
<style scoped> <style scoped>
.burger-btn { .burger-btn {
position: fixed; /* Она всегда на одном месте при скролле */ position: fixed;
/* Она всегда на одном месте при скролле */
top: 20px; top: 20px;
left: 20px; left: 20px;
z-index: 9999; /* Максимальный приоритет, чтобы быть ПОВЕРХ всего */ z-index: 9999;
/* Максимальный приоритет, чтобы быть ПОВЕРХ всего */
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
@@ -158,10 +154,17 @@ h1 {
text-align: center; text-align: center;
} }
.menu-content {
display: flex;
flex-direction: column;
gap: 10px;
}
.line { .line {
width: 100%; width: 100%;
height: 4px; height: 4px;
background-color: #383838; /* Ярко-красный цвет для теста */ background-color: #383838;
/* Ярко-красный цвет для теста */
transition: all 0.3s ease; transition: all 0.3s ease;
} }
@@ -185,7 +188,8 @@ h1 {
left: 0; left: 0;
width: 240px; width: 240px;
height: 100%; height: 100%;
background: white; background-image: radial-gradient(#23aae3e2, #222222);
color: white;
z-index: 1000; z-index: 1000;
padding: 0 20px 20px; padding: 0 20px 20px;
overflow-y: scroll; overflow-y: scroll;
@@ -199,22 +203,35 @@ h1 {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
z-index: 2; z-index: 2;
background-color: #333333;
opacity: 90%;
display: flex;
}
.navigation-wrapper__footer {
display: flex;
gap: 10px;
width: 100%;
} }
/* Анимации появления */ /* Анимации появления */
.slide-enter-active, .slide-leave-active { .slide-enter-active,
.slide-leave-active {
transition: transform 0.3s ease; transition: transform 0.3s ease;
} }
.slide-enter-from, .slide-leave-to { .slide-enter-from,
.slide-leave-to {
transform: translateX(-100%); transform: translateX(-100%);
} }
.fade-enter-active, .fade-leave-active { .fade-enter-active,
.fade-leave-active {
transition: opacity 0.3s ease; transition: opacity 0.3s ease;
} }
.fade-enter-from, .fade-leave-to { .fade-enter-from,
.fade-leave-to {
opacity: 0; opacity: 0;
} }
</style> </style>
+7 -1
View File
@@ -13,7 +13,7 @@ const props = defineProps({
</script> </script>
<template> <template>
<a v-if="to" :href="props.to" class="btn"> <a v-if="to" :href="props.to" target="_blank" class="btn">
<slot /> <slot />
</a> </a>
<button v-else class="btn"> <button v-else class="btn">
@@ -31,5 +31,11 @@ const props = defineProps({
color: white; color: white;
width: 100%; width: 100%;
font-size: 17px; font-size: 17px;
text-decoration: none;
box-sizing: border-box;
text-align: center;
font-family: 'Courier New', Courier, monospace;
margin: 0;
} }
</style> </style>