2024-04-19 14:41:49 +03:00
|
|
|
<template>
|
|
|
|
<h2 class="tool-title">Str to NATO alphabet</h2>
|
2024-10-16 11:19:00 +03:00
|
|
|
<hr class="mt-5 mb-5" />
|
2024-04-19 14:41:49 +03:00
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="data">Data</label>
|
2024-10-16 11:19:00 +03:00
|
|
|
<input id="data" v-model="toolData.data" v-on:keyup="result" type="text" />
|
2024-04-19 14:41:49 +03:00
|
|
|
</div>
|
|
|
|
|
2024-10-16 11:19:00 +03:00
|
|
|
<hr class="mt-5 mb-5" />
|
2024-04-19 14:41:49 +03:00
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="result">Result</label>
|
2024-10-16 11:19:00 +03:00
|
|
|
<MonacoEditor
|
|
|
|
name="result"
|
|
|
|
language="php"
|
|
|
|
:value="toolResult"
|
|
|
|
></MonacoEditor>
|
2024-04-19 14:41:49 +03:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-09-28 15:16:10 +03:00
|
|
|
import axios from "axios";
|
2024-04-19 14:41:49 +03:00
|
|
|
import MonacoEditor from "@/components/MonacoEditor.vue";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2024-10-16 11:19:00 +03:00
|
|
|
MonacoEditor,
|
2024-04-19 14:41:49 +03:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
toolData: {
|
2024-10-16 11:19:00 +03:00
|
|
|
data: "",
|
2024-04-19 14:41:49 +03:00
|
|
|
},
|
2024-10-16 11:19:00 +03:00
|
|
|
toolResult: "",
|
2024-04-19 14:41:49 +03:00
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
result() {
|
|
|
|
const natoAlphabet = {
|
2024-10-16 11:19:00 +03:00
|
|
|
A: "Alpha",
|
|
|
|
B: "Bravo",
|
|
|
|
C: "Charlie",
|
|
|
|
D: "Delta",
|
|
|
|
E: "Echo",
|
|
|
|
F: "Foxtrot",
|
|
|
|
G: "Golf",
|
|
|
|
H: "Hotel",
|
|
|
|
I: "India",
|
|
|
|
J: "Juliett",
|
|
|
|
K: "Kilo",
|
|
|
|
L: "Lima",
|
|
|
|
M: "Mike",
|
|
|
|
N: "November",
|
|
|
|
O: "Oscar",
|
|
|
|
P: "Papa",
|
|
|
|
Q: "Quebec",
|
|
|
|
R: "Romeo",
|
|
|
|
S: "Sierra",
|
|
|
|
T: "Tango",
|
|
|
|
U: "Uniform",
|
|
|
|
V: "Victor",
|
|
|
|
W: "Whiskey",
|
|
|
|
X: "X-ray",
|
|
|
|
Y: "Yankee",
|
|
|
|
Z: "Zulu",
|
2024-04-19 14:41:49 +03:00
|
|
|
};
|
|
|
|
|
2024-10-16 11:19:00 +03:00
|
|
|
this.toolResult = this.toolData.data
|
|
|
|
.toUpperCase()
|
|
|
|
.split("")
|
|
|
|
.map((char) => natoAlphabet[char] || char)
|
|
|
|
.join(" ");
|
|
|
|
},
|
|
|
|
},
|
2024-09-28 15:16:10 +03:00
|
|
|
};
|
2024-04-19 14:41:49 +03:00
|
|
|
</script>
|
|
|
|
|
2024-10-16 11:19:00 +03:00
|
|
|
<style lang="scss"></style>
|