Предваарительный коммит
This commit is contained in:
+35
-79
@@ -3,6 +3,7 @@ import { ref, onMounted } from "vue";
|
|||||||
import izitoast from "./izitoast";
|
import izitoast from "./izitoast";
|
||||||
import { useEventListener } from "@vueuse/core";
|
import { useEventListener } from "@vueuse/core";
|
||||||
import MyDialog from "./components/MyDialog.vue";
|
import MyDialog from "./components/MyDialog.vue";
|
||||||
|
import MyDropMenu from "./components/MyDropMenu.vue";
|
||||||
import copyToclipboard from "./copyToclipboard";
|
import copyToclipboard from "./copyToclipboard";
|
||||||
|
|
||||||
const numbers = ref([]); // Инициализируем массив с пустыми строками
|
const numbers = ref([]); // Инициализируем массив с пустыми строками
|
||||||
@@ -104,6 +105,7 @@ function copyAndToast(text) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="wraper">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<div
|
<div
|
||||||
class="square"
|
class="square"
|
||||||
@@ -112,69 +114,68 @@ function copyAndToast(text) {
|
|||||||
:key="index"
|
:key="index"
|
||||||
@click="setNumber(item)"
|
@click="setNumber(item)"
|
||||||
>
|
>
|
||||||
|
{{ numbers[index].variable.join(", ") }}
|
||||||
<div id="idenx">{{ numbers[index].variable.join(", ") }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="SaveCleanBtn">
|
<div class="actions">
|
||||||
<button id="saveBtn" @click="saveResult">Сохранить</button>
|
<button @click="saveResult">Сохранить</button>
|
||||||
<button id="cleanBtn" @click="cleanResult">Очистить</button>
|
<button @click="cleanResult">Очистить</button>
|
||||||
|
<button @click="cleanResult">Отменить</button>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <MyDropMenu/> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<MyDialog
|
<MyDialog
|
||||||
v-show="isModalVisible"
|
v-show="isModalVisible"
|
||||||
@close="isModalVisible = false"
|
@close="isModalVisible = false"
|
||||||
class="dialogWindow"
|
class="dialogWindow"
|
||||||
|
:is-success=listOfTrips.length
|
||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<strong id='codeIsReady' v-if="listOfTrips.length">Код готов!</strong>
|
<strong v-if="listOfTrips.length">Код готов!</strong>
|
||||||
<strong id='codeNotReady' v-else>Код не готов!</strong>
|
<strong v-else>Код не готов!</strong>
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<p v-if="listOfTrips.length" id="headText1">
|
<p v-if="listOfTrips.length">
|
||||||
Скопируйте или скачайте ваш код
|
Скопируйте или скачайте ваш код
|
||||||
</p>
|
</p>
|
||||||
<p v-else id='ReccomendText'>Выстройте маршрут перед сохранением кода.</p>
|
<p v-else>Выстройте маршрут перед сохранением кода.</p>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div v-if="listOfTrips.length">
|
<div v-if="listOfTrips.length">
|
||||||
<button type="button" class="btn-green" @click="isModalVisible = false">
|
<button type="button" @click="isModalVisible = false">
|
||||||
Скачать код
|
Скачать код
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn-green"
|
|
||||||
@click="copyAndToast(finallyText)"
|
@click="copyAndToast(finallyText)"
|
||||||
>
|
>
|
||||||
Скопировать код
|
Скопировать код
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn-green" @click="isModalVisible = false">
|
<button type="button"@click="isModalVisible = false">
|
||||||
ОК
|
ОК
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</MyDialog>
|
</MyDialog>
|
||||||
|
|
||||||
<div class="helptext">
|
|
||||||
<p>Для формирования маршрута</p>
|
|
||||||
<p>дрона нажимайте на маркеры,</p>
|
|
||||||
<p>по которым он полетит</p>
|
|
||||||
<p>Для отмены действия</p>
|
|
||||||
<p>нажмите Ctrl + Z</p>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
background-image: radial-gradient(#383838e2, #222222);
|
background-image: radial-gradient(#383838e2, #222222);
|
||||||
border: 3px solid rgb(251, 251, 251);
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--side: 70px;
|
--side: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wraper {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
@@ -183,14 +184,6 @@ html {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.helptext {
|
|
||||||
position: absolute;
|
|
||||||
top: 15px;
|
|
||||||
left: 20px;
|
|
||||||
font-size: 25px;
|
|
||||||
color: rgb(251, 251, 251);
|
|
||||||
}
|
|
||||||
|
|
||||||
.square {
|
.square {
|
||||||
width: var(--side); /* Ширина квадрата */
|
width: var(--side); /* Ширина квадрата */
|
||||||
height: var(--side); /* Высота квадрата */
|
height: var(--side); /* Высота квадрата */
|
||||||
@@ -198,7 +191,6 @@ html {
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
border: 3px solid rgb(251, 251, 251);
|
border: 3px solid rgb(251, 251, 251);
|
||||||
background-color: #e0e0e0;
|
background-color: #e0e0e0;
|
||||||
margin-left: 340px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.3s;
|
transition: background-color 0.3s;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
@@ -206,6 +198,13 @@ html {
|
|||||||
background-blend-mode: multiply;
|
background-blend-mode: multiply;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
transition: background-color 0.3s ease;
|
transition: background-color 0.3s ease;
|
||||||
|
|
||||||
|
color:white;
|
||||||
|
text-shadow:
|
||||||
|
-1px -1px 0 black,
|
||||||
|
1px -1px 0 black,
|
||||||
|
-1px 1px 0 black,
|
||||||
|
1px 1px 0 black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.square:hover {
|
.square:hover {
|
||||||
@@ -221,7 +220,12 @@ html {
|
|||||||
background-color: rgba(0, 2, 0, 0.638);
|
background-color: rgba(0, 2, 0, 0.638);
|
||||||
}
|
}
|
||||||
|
|
||||||
.SaveCleanBtn button {
|
.actions {
|
||||||
|
margin-left: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.actions button {
|
||||||
border: 2px solid rgb(251, 251, 251);
|
border: 2px solid rgb(251, 251, 251);
|
||||||
padding: 15px 30px;
|
padding: 15px 30px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
@@ -230,15 +234,6 @@ html {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
#saveBtn {
|
|
||||||
top: 320px;
|
|
||||||
left: 15px;
|
|
||||||
}
|
|
||||||
#cleanBtn {
|
|
||||||
top: 320px;
|
|
||||||
left: 180px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
@@ -246,50 +241,11 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal-body{
|
.modal-body{
|
||||||
color: beige;
|
|
||||||
size: 20px;
|
size: 20px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#headText1 {
|
|
||||||
color: white;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-green :hover {
|
.btn-green :hover {
|
||||||
background-color: rgb(229, 67, 67);
|
background-color: rgb(229, 67, 67);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-footer [type = 'button'] {
|
|
||||||
background-color: rgba(255, 255, 255, 0.777);
|
|
||||||
color: rgb(3, 3, 3);
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-header [type = 'button'] {
|
|
||||||
color: red;
|
|
||||||
font-size: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#codeIsReady {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#codeNotReady{
|
|
||||||
color:rgb(248, 8, 8);
|
|
||||||
size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ReccomendText{
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idenx{
|
|
||||||
color:white;
|
|
||||||
text-shadow:
|
|
||||||
-1px -1px 0 black,
|
|
||||||
1px -1px 0 black,
|
|
||||||
-1px 1px 0 black,
|
|
||||||
1px 1px 0 black;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+37
-22
@@ -2,20 +2,20 @@
|
|||||||
<transition name="modal-fade">
|
<transition name="modal-fade">
|
||||||
<div class="modal-backdrop" @click="closeModal">
|
<div class="modal-backdrop" @click="closeModal">
|
||||||
<div class="modal" @click.stop>
|
<div class="modal" @click.stop>
|
||||||
<header class="modal-header">
|
<header :class="['modal-header', isSuccess ? 'modal-header-success': 'modal-header-error']">
|
||||||
<slot name="header">
|
<slot name="header">
|
||||||
<strong>Заголовок по умолчанию</strong>
|
<strong>Заголовок по умолчанию</strong>
|
||||||
</slot>
|
</slot>
|
||||||
<button type="button" class="btn-close" @click="closeModal" aria-label="Закрыть модальное окно">
|
<button class="btn-close" @click="closeModal" aria-label="Закрыть модальное окно">
|
||||||
×
|
×
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
<section class="modal-body">
|
<section class="modal-body">
|
||||||
<slot name="body">Тело по умолчанию</slot>
|
<slot name="body">Тело по умолчанию</slot>
|
||||||
</section>
|
</section>
|
||||||
<footer class="modal-footer">
|
<footer :class="['modal-footer', isSuccess ? 'modal-footer-success': 'modal-footer-error']">
|
||||||
<slot name="footer">
|
<slot name="footer">
|
||||||
<button type="button" class="btn-green" @click="closeModal">Закрыть</button>
|
<button @click="closeModal">Закрыть</button>
|
||||||
</slot>
|
</slot>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
@@ -25,6 +25,12 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const emit = defineEmits(['close'])
|
const emit = defineEmits(['close'])
|
||||||
|
const props = defineProps({
|
||||||
|
isSuccess: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
})
|
||||||
function closeModal() {
|
function closeModal() {
|
||||||
emit('close');
|
emit('close');
|
||||||
}
|
}
|
||||||
@@ -62,13 +68,37 @@ function closeModal() {
|
|||||||
|
|
||||||
.modal-header {
|
.modal-header {
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
color: #4AAE9B;
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
.modal-header-success {
|
||||||
|
color: #4AAE9B;
|
||||||
|
}
|
||||||
|
.modal-header-error {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header [type = 'button'] {
|
||||||
|
color: red;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
.modal-footer {
|
.modal-footer {
|
||||||
border-top: 1px solid #eeeeee;
|
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
border-top: 1px solid white;
|
||||||
|
}
|
||||||
|
.modal-footer [type = 'button'] {
|
||||||
|
justify-content: flex-end;
|
||||||
|
border-top: 1px solid white;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.modal-footer-success [type = 'button'] {
|
||||||
|
background-color: #4AAE9B;
|
||||||
|
border: none;
|
||||||
|
margin: 3px;
|
||||||
|
}
|
||||||
|
.modal-footer-error [type = 'button'] {
|
||||||
|
background: red;
|
||||||
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
@@ -82,25 +112,10 @@ function closeModal() {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #4AAE9B;
|
color: red;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-green {
|
|
||||||
color: white;
|
|
||||||
background: #4AAE9B;
|
|
||||||
border: 1px solid #4AAE9B;
|
|
||||||
border-radius: 2px;
|
|
||||||
padding: 5px;
|
|
||||||
margin: 0 5px;
|
|
||||||
}
|
|
||||||
.btn-green:hover {
|
|
||||||
background-color: #0fa386;
|
|
||||||
}
|
|
||||||
.btn-green:active {
|
|
||||||
background-color: #65ebd2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-fade-enter,
|
.modal-fade-enter,
|
||||||
.modal-fade-leave-active {
|
.modal-fade-leave-active {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<div class="dropdown">
|
||||||
|
<button @click="toggleDropdown">☰ Меню</button>
|
||||||
|
<ul v-show="isOpen" class="dropdown-menu-left">
|
||||||
|
<li><a href="#">Пункт 1</a></li>
|
||||||
|
<li><a href="#">Пункт 2</a></li>
|
||||||
|
<li><a href="#">Пункт 3</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
const isOpen = ref(false);
|
||||||
|
|
||||||
|
function toggleDropdown() {
|
||||||
|
isOpen.value = !isOpen.value;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.dropdown-menu-left {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 100%;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
min-width: 150px;
|
||||||
|
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||||
|
transform: translateX(-100%);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu-left li a {
|
||||||
|
display: block;
|
||||||
|
padding: 10px 15px;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu-left li a:hover {
|
||||||
|
background: #f0f0f0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user