more tools

This commit is contained in:
steffenrapp 2024-09-05 17:01:34 +00:00
parent c756058c5c
commit 917ff521ea
4 changed files with 23 additions and 7 deletions

View file

@ -430,6 +430,10 @@ tools:
description: >-
Informationen zu einem Text erhalten, wie die Anzahl der Zeichen, die
Anzahl der Wörter, die Größe usw.
characters: Anzahl Zeichen
words: Anzahl Wörter
lines: Anzahl Zeilen
bytes: Bytegröße
text-to-nato-alphabet:
title: Text zu NATO-Alphabet
description: >-
@ -474,6 +478,9 @@ tools:
safelink-decoder:
title: Outlook Safelink-Decoder
description: Outlook Safelinks decodieren
input: 'Eingabe einer Outlook Safelink-URL:'
input-placeholder: Deine eingegebene Outlook Safelink-URL...
output: 'Ausgabe der decodierten URL:'
ascii-text-drawer:
title: ASCII-Art-Text-Generator
description: ASCII-Art-Text mit vielen Schriftarten und Stilen erstellen.

View file

@ -403,6 +403,10 @@ tools:
description: >-
Get information about a text, the number of characters, the number of
words, its size in bytes, ...
characters: Character count
words: Word count
lines: Line count
bytes: Byte size
text-to-nato-alphabet:
title: Text to NATO alphabet
description: Transform text into the NATO phonetic alphabet for oral transmission.
@ -443,6 +447,9 @@ tools:
safelink-decoder:
title: Outlook Safelink decoder
description: Decode Outlook SafeLink links
input: 'Your input Outlook SafeLink Url:'
input-placeholder: Your input Outlook SafeLink Url...
output: 'Output decoded URL:'
ascii-text-drawer:
title: ASCII Art Text Generator
description: Create ASCII art text with many fonts and styles.

View file

@ -2,6 +2,7 @@
import { decodeSafeLinksURL } from './safelink-decoder.service';
import TextareaCopyable from '@/components/TextareaCopyable.vue';
const { t } = useI18n();
const inputSafeLinkUrl = ref('');
const outputDecodedUrl = computed(() => {
try {
@ -18,14 +19,14 @@ const outputDecodedUrl = computed(() => {
<c-input-text
v-model:value="inputSafeLinkUrl"
raw-text
placeholder="Your input Outlook SafeLink Url..."
:placeholder="t('tools.safelink-decoder.input-placeholder')"
autofocus
label="Your input Outlook SafeLink Url:"
:label="t('tools.safelink-decoder.input')"
/>
<n-divider />
<n-form-item label="Output decoded URL:">
<n-form-item :label="t('tools.safelink-decoder.output')">
<TextareaCopyable :value="outputDecodedUrl" :word-wrap="true" />
</n-form-item>
</div>

View file

@ -3,6 +3,7 @@ import { getStringSizeInBytes } from './text-statistics.service';
import { formatBytes } from '@/utils/convert';
const text = ref('');
const { t } = useI18n();
</script>
<template>
@ -10,10 +11,10 @@ const text = ref('');
<c-input-text v-model:value="text" multiline placeholder="Your text..." rows="5" />
<div mt-5 flex>
<n-statistic label="Character count" :value="text.length" flex-1 />
<n-statistic label="Word count" :value="text === '' ? 0 : text.split(/\s+/).length" flex-1 />
<n-statistic label="Line count" :value="text === '' ? 0 : text.split(/\r\n|\r|\n/).length" flex-1 />
<n-statistic label="Byte size" :value="formatBytes(getStringSizeInBytes(text))" flex-1 />
<n-statistic :label="t('tools.text-statistics.characters')" :value="text.length" flex-1 />
<n-statistic :label="t('tools.text-statistics.words')" :value="text === '' ? 0 : text.split(/\s+/).length" flex-1 />
<n-statistic :label="t('tools.text-statistics.lines')" :value="text === '' ? 0 : text.split(/\r\n|\r|\n/).length" flex-1 />
<n-statistic :label="t('tools.text-statistics.bytes')" :value="formatBytes(getStringSizeInBytes(text))" flex-1 />
</div>
</c-card>
</template>