2023-05-28 23:13:24 +02:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { textToNatoAlphabet } from './text-to-nato-alphabet.service';
|
|
|
|
import { useCopy } from '@/composable/copy';
|
|
|
|
|
|
|
|
const input = ref('');
|
|
|
|
const natoText = computed(() => textToNatoAlphabet({ text: input.value }));
|
|
|
|
const { copy } = useCopy({ source: natoText, text: 'NATO alphabet string copied.' });
|
|
|
|
</script>
|
|
|
|
|
2023-02-15 00:43:08 +01:00
|
|
|
<template>
|
|
|
|
<div>
|
2023-05-14 21:26:18 +02:00
|
|
|
<c-input-text
|
|
|
|
v-model:value="input"
|
|
|
|
label="Your text to convert to NATO phonetic alphabet"
|
|
|
|
placeholder="Put your text here..."
|
|
|
|
clearable
|
|
|
|
mb-5
|
|
|
|
/>
|
2023-02-15 00:43:08 +01:00
|
|
|
|
2023-05-27 17:36:15 +02:00
|
|
|
<div v-if="natoText">
|
2023-06-25 15:49:43 +02:00
|
|
|
<div mb-2>
|
2023-05-28 23:13:24 +02:00
|
|
|
Your text in NATO phonetic alphabet
|
2023-06-25 15:49:43 +02:00
|
|
|
</div>
|
2023-04-20 20:49:28 +02:00
|
|
|
<c-card>
|
2023-02-15 00:43:08 +01:00
|
|
|
{{ natoText }}
|
2023-04-20 20:49:28 +02:00
|
|
|
</c-card>
|
2023-02-15 00:43:08 +01:00
|
|
|
|
2023-05-27 17:36:15 +02:00
|
|
|
<div mt-3 flex justify-center>
|
2023-05-28 23:13:24 +02:00
|
|
|
<c-button autofocus @click="copy">
|
|
|
|
Copy NATO string
|
|
|
|
</c-button>
|
2023-05-27 17:36:15 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-02-15 00:43:08 +01:00
|
|
|
</div>
|
|
|
|
</template>
|