2023-02-15 00:43:08 +01:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<n-form-item label="Your text to convert to NATO phonetic alphabet">
|
|
|
|
<n-input v-model:value="input" placeholder="Put your text here..." clearable />
|
|
|
|
</n-form-item>
|
|
|
|
|
|
|
|
<n-space v-if="natoText" vertical>
|
|
|
|
<n-text>Your text in NATO phonetic alphabet</n-text>
|
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
|
|
|
|
|
|
|
<n-space justify="center">
|
2023-04-19 21:38:59 +02:00
|
|
|
<c-button autofocus @click="copy"> Copy NATO string </c-button>
|
2023-02-15 00:43:08 +01:00
|
|
|
</n-space>
|
|
|
|
</n-space>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { useCopy } from '@/composable/copy';
|
|
|
|
import { computed, ref } from 'vue';
|
|
|
|
import { textToNatoAlphabet } from './text-to-nato-alphabet.service';
|
|
|
|
|
|
|
|
const input = ref('');
|
|
|
|
const natoText = computed(() => textToNatoAlphabet({ text: input.value }));
|
|
|
|
const { copy } = useCopy({ source: natoText, text: 'NATO alphabet string copied.' });
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped></style>
|