it-tools/src/tools/text-to-nato-alphabet/text-to-nato-alphabet.vue

36 lines
867 B
Vue
Raw Normal View History

<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>
<template>
<div>
<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-05-27 17:36:15 +02:00
<div v-if="natoText">
2023-06-25 15:49:43 +02:00
<div mb-2>
Your text in NATO phonetic alphabet
2023-06-25 15:49:43 +02:00
</div>
<c-card>
{{ natoText }}
</c-card>
2023-05-27 17:36:15 +02:00
<div mt-3 flex justify-center>
<c-button autofocus @click="copy">
Copy NATO string
</c-button>
2023-05-27 17:36:15 +02:00
</div>
</div>
</div>
</template>