1 Commits

4 changed files with 42 additions and 30 deletions
+10 -11
View File
@@ -638,6 +638,7 @@
"integrity": "sha512-zx0EIq78WlY/lBb1uXlziZmDZI4ubcCXIMJ4uGjXzZW0nS19TjSPeXPAjzzTmKQlJUZm0SbmZhPKP7tuQ1SsEw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"chalk": "^4.1.1",
"fs-extra": "^9.0.1",
@@ -1781,6 +1782,7 @@
"integrity": "sha512-yl43JD/86CIj3Mz5mvvLJqAOfIup7ncxfJ0Btnl0/v5TouVUyeEdcpknfgc+yMevS/48oH9WAkkw93m7otLb/A==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@inquirer/checkbox": "^3.0.1",
"@inquirer/confirm": "^4.0.1",
@@ -2963,6 +2965,7 @@
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
"license": "MIT",
"peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -3029,6 +3032,7 @@
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.3",
"fast-uri": "^3.0.1",
@@ -3253,6 +3257,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.9.0",
"caniuse-lite": "^1.0.30001759",
@@ -3769,6 +3774,7 @@
"integrity": "sha512-9nF4PdUle+5ta4W5SyZdLCCmFd37uVimSjg1evcTqKJCyvCEEj12WKzOSBNak6r4im4J4iYXKH1OWpUV5LBYFg==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@emotion/hash": "~0.8.0",
"csstype": "~3.0.5"
@@ -3793,6 +3799,7 @@
"integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==",
"dev": true,
"license": "MIT",
"peer": true,
"funding": {
"type": "github",
"url": "https://github.com/sponsors/kossnocorp"
@@ -4598,17 +4605,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/encoding": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"iconv-lite": "^0.6.2"
}
},
"node_modules/end-of-stream": {
"version": "1.4.5",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
@@ -8222,6 +8218,7 @@
"integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"esbuild": "^0.21.3",
"postcss": "^8.4.43",
@@ -8294,6 +8291,7 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.28.tgz",
"integrity": "sha512-BRdrNfeoccSoIZeIhyPBfvWSLFP4q8J3u8Ju8Ug5vu3LdD+yTM13Sg4sKtljxozbnuMu1NB1X5HBHRYUzFocKg==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/compiler-dom": "3.5.28",
"@vue/compiler-sfc": "3.5.28",
@@ -8366,6 +8364,7 @@
"integrity": "sha512-gX/dMkRQc7QOMzgTe6KsYFM7DxeIONQSui1s0n/0xht36HvrgbxtM1xBlgx596NbpHuQU8P7QpKwrZYwUX48nw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@types/eslint-scope": "^3.7.7",
"@types/estree": "^1.0.8",
+30 -14
View File
@@ -60,8 +60,7 @@ function setNumber(item) {
}
}
function openPreview(event) {
event.currentTarget.blur()
function openPreview() {
generateCode()
if (!listOfTrips.value.length) {
izitoast.error({
@@ -73,9 +72,8 @@ function openPreview(event) {
isCodeViewVisible.value = true;
}
function saveResult(event) {
function saveResult() {
isModalVisible.value = true;
event.currentTarget.blur()
generateCode()
}
@@ -96,18 +94,18 @@ function generateCode() {
let textOfCode = color
textOfCode = textOfCode.split('<<separator>>')
colorDetectClass.value = textOfCode[0]
colorDetectCode.value += ` ${textOfCode[1].trim()}\n`;
colorDetectCode.value += `\t${textOfCode[1].trim()}\n`;
}
if (isUsedQR) {
let textOfCode = qr
textOfCode = textOfCode.split('<<separator>>')
QRDetectClass.value = textOfCode[0]
QRDetectCode.value += ` ${textOfCode[1].trim()}\n`;
QRDetectCode.value += `\t${textOfCode[1].trim()}\n`;
}
for (const item of listOfTrips.value) {
mainCode.value += ` navigate_wait(${item.x}, ${item.y})\n`;
mainCode.value += `\tnavigate_wait(${item.x}, ${item.y})\n`;
if (item.isPlatform) {
mainCode.value += colorDetectCode.value + '\n'
}
@@ -129,8 +127,7 @@ function generateCode() {
}
}
function cancel(event) {
event.currentTarget.blur()
function cancel() {
if (clickCount.value === 1) {
return;
}
@@ -142,8 +139,7 @@ function cancel(event) {
clickCount.value--;
}
function cleanResult(event) {
event.currentTarget.blur()
function cleanResult() {
clickCount.value = 1;
numbers.value.forEach(item => {
item.isPlatform = false;
@@ -276,6 +272,16 @@ function createIcon(src) {
})
}
function createSvgIcon(svg) {
return h(svg,{
style:{
color: '#000',
width: '20px',
height: '20px',
}
})
}
function onContextMenu(e, item) {
ContextMenu.showContextMenu({
theme: 'mac dark',
@@ -304,7 +310,7 @@ function onContextMenu(e, item) {
{
label: "Удалить",
onClick: () => deletePlatform(item),
icon: h(Trash),
icon: createSvgIcon(Trash),
},
]
},
@@ -320,14 +326,14 @@ function onContextMenu(e, item) {
{
label: "Удалить",
onClick: () => deleteQR(item),
icon: h(Trash)
icon: createSvgIcon(Trash),
},
],
},
{
label: "Удалить",
icon: h(Trash),
icon: createSvgIcon(Trash),
onClick: () => deletePointMap(item),
},
]
@@ -395,6 +401,10 @@ function onContextMenu(e, item) {
<style>
* {
font-family: 'Courier New', Courier, monospace;
outline: none;
}
* :focus-visible {
box-shadow: 0 0 0 3px #23aae3e2;
}
html {
@@ -477,11 +487,17 @@ body {
}
.actions svg {
outline: none;
width: 40px;
height: 40px;
transition: color 0.4s;
}
.actions svg:focus-visible {
box-shadow: 0 0 0 3px #23aae3e2;
border-radius: 8px;
}
.actions svg:hover {
color: rgba(20, 104, 140, 0.89);
}
-3
View File
@@ -20,7 +20,4 @@
.cls-1{
fill:none;
}
#Layer_2 {
color: black;
}
</style>
+2 -2
View File
@@ -41,7 +41,7 @@ def emergency_stop():
"""Функция экстренной остановки, срабатывает при нажатии Ctrl + C"""
print("="*50)
print("\n" + "="*50)
print("EMERGENCY STOP ACTIVATED!")
print("="*50)
@@ -81,7 +81,7 @@ def signal_handler(sig, frame):
"""Перехват Ctrl+C: вместо аварийного завершения программы
выполняет безопасную посадку дрона."""
print("Ctrl+C detected - Emergency stop!")
print("\nCtrl+C detected - Emergency stop!")
emergency_stop()
sys.exit(0)