1
0
Fork 0
mirror of https://github.com/CorentinTh/it-tools.git synced 2025-08-09 07:25:18 +02:00
This commit is contained in:
sharevb 2024-06-09 01:56:18 -07:00 committed by GitHub
commit d5fa491261
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 89 additions and 1 deletions

2
components.d.ts vendored
View file

@ -126,6 +126,8 @@ declare module '@vue/runtime-core' {
MenuLayout: typeof import('./src/components/MenuLayout.vue')['default'] MenuLayout: typeof import('./src/components/MenuLayout.vue')['default']
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default'] MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default'] MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
MorseConverter: typeof import('./src/tools/morse-converter/morse-converter.vue')['default']
NAlert: typeof import('naive-ui')['NAlert']
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default'] NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
NCode: typeof import('naive-ui')['NCode'] NCode: typeof import('naive-ui')['NCode']
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']

View file

@ -41,6 +41,7 @@
"@tiptap/pm": "2.1.6", "@tiptap/pm": "2.1.6",
"@tiptap/starter-kit": "2.1.6", "@tiptap/starter-kit": "2.1.6",
"@tiptap/vue-3": "2.0.3", "@tiptap/vue-3": "2.0.3",
"@types/morsee": "^1.0.2",
"@types/figlet": "^1.5.8", "@types/figlet": "^1.5.8",
"@vicons/material": "^0.12.0", "@vicons/material": "^0.12.0",
"@vicons/tabler": "^0.12.0", "@vicons/tabler": "^0.12.0",
@ -73,6 +74,7 @@
"mathjs": "^11.9.1", "mathjs": "^11.9.1",
"mime-types": "^2.1.35", "mime-types": "^2.1.35",
"monaco-editor": "^0.43.0", "monaco-editor": "^0.43.0",
"morsee": "^1.0.9",
"naive-ui": "^2.35.0", "naive-ui": "^2.35.0",
"netmask": "^2.0.2", "netmask": "^2.0.2",
"node-forge": "^1.3.1", "node-forge": "^1.3.1",

15
pnpm-lock.yaml generated
View file

@ -23,6 +23,9 @@ dependencies:
'@tiptap/vue-3': '@tiptap/vue-3':
specifier: 2.0.3 specifier: 2.0.3
version: 2.0.3(@tiptap/core@2.1.12)(@tiptap/pm@2.1.6)(vue@3.3.4) version: 2.0.3(@tiptap/core@2.1.12)(@tiptap/pm@2.1.6)(vue@3.3.4)
'@types/morsee':
specifier: ^1.0.2
version: 1.0.2
'@types/figlet': '@types/figlet':
specifier: ^1.5.8 specifier: ^1.5.8
version: 1.5.8 version: 1.5.8
@ -119,6 +122,9 @@ dependencies:
monaco-editor: monaco-editor:
specifier: ^0.43.0 specifier: ^0.43.0
version: 0.43.0 version: 0.43.0
morsee:
specifier: ^1.0.9
version: 1.0.9
naive-ui: naive-ui:
specifier: ^2.35.0 specifier: ^2.35.0
version: 2.35.0(vue@3.3.4) version: 2.35.0(vue@3.3.4)
@ -2986,6 +2992,10 @@ packages:
resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==}
dev: true dev: true
/@types/morsee@1.0.2:
resolution: {integrity: sha512-WANv1kCyQtmGZTiov9FzFdt1X4wRtXYZA6B4YR3CghKgx4ychU7d1gkOx7oD+ddVGI+SWmWOPccco7pAc6wXeA==}
dev: false
/@types/netmask@2.0.0: /@types/netmask@2.0.0:
resolution: {integrity: sha512-6LjGn0BPF0gOHGuRuJ0hGfdBJLz/9K8Ikz+oRThTNc2w7CGLvwqdjAP7/CydsUeL4cxBBXAHLFfC9bMs74757Q==} resolution: {integrity: sha512-6LjGn0BPF0gOHGuRuJ0hGfdBJLz/9K8Ikz+oRThTNc2w7CGLvwqdjAP7/CydsUeL4cxBBXAHLFfC9bMs74757Q==}
dev: true dev: true
@ -6958,6 +6968,10 @@ packages:
resolution: {integrity: sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==} resolution: {integrity: sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==}
dev: false dev: false
/morsee@1.0.9:
resolution: {integrity: sha512-8X8jKVUmZBHKpET9Ap6FPiwlAAASvv60M1K25/YwCU7veuj5MfYgaWX3oEPHtMGgC44IIkIKzyD73fduEKB/9g==}
dev: false
/mrmime@1.0.1: /mrmime@1.0.1:
resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==}
engines: {node: '>=10'} engines: {node: '>=10'}
@ -9449,6 +9463,7 @@ packages:
/workbox-google-analytics@7.0.0: /workbox-google-analytics@7.0.0:
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==} resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
dependencies: dependencies:
workbox-background-sync: 7.0.0 workbox-background-sync: 7.0.0
workbox-core: 7.0.0 workbox-core: 7.0.0

View file

@ -1,7 +1,7 @@
import { tool as base64FileConverter } from './base64-file-converter'; import { tool as base64FileConverter } from './base64-file-converter';
import { tool as base64StringConverter } from './base64-string-converter'; import { tool as base64StringConverter } from './base64-string-converter';
import { tool as basicAuthGenerator } from './basic-auth-generator'; import { tool as basicAuthGenerator } from './basic-auth-generator';
import { tool as morseConverter } from './morse-converter';
import { tool as asciiTextDrawer } from './ascii-text-drawer'; import { tool as asciiTextDrawer } from './ascii-text-drawer';
import { tool as textToUnicode } from './text-to-unicode'; import { tool as textToUnicode } from './text-to-unicode';
@ -107,6 +107,7 @@ export const toolsByCategory: ToolCategory[] = [
listConverter, listConverter,
tomlToJson, tomlToJson,
tomlToYaml, tomlToYaml,
morseConverter,
], ],
}, },
{ {

View file

@ -0,0 +1,12 @@
import { ArrowsShuffle } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Morse Code Converter',
path: '/morse-converter',
description: 'Encode/Decode to Morse code',
keywords: ['morse', 'converter'],
component: () => import('./morse-converter.vue'),
icon: ArrowsShuffle,
createdAt: new Date('2024-04-20'),
});

View file

@ -0,0 +1,56 @@
<script setup lang="ts">
import { decode, encode } from 'morsee';
import { computedCatch } from '@/composable/computed/catchedComputed';
const encodeInput = ref('');
const encodeOutput = computed(() => encode(encodeInput.value));
const decodeInput = ref('');
const [decodeOutput, decodeError] = computedCatch(() => decode(decodeInput.value), {
defaultValue: '',
defaultErrorMessage: 'Unable to decode your text',
});
</script>
<template>
<c-card title="Encode">
<div flex gap-3>
<c-input-text
v-model:value="encodeInput"
label="Your text:"
placeholder="The string to encode"
rows="4"
multiline raw-text monospace autosize flex-1
/>
</div>
<c-input-text
label="Your text encoded to Morse code:"
:value="encodeOutput"
rows="3"
placeholder="Your string encoded"
multiline monospace readonly autosize mt-5
/>
</c-card>
<c-card title="Decode">
<div flex gap-3>
<c-input-text
v-model:value="decodeInput"
label="Your Morse encoded text:"
placeholder="The string to decode"
rows="4"
multiline raw-text monospace autosize flex-1
/>
</div>
<c-alert v-if="decodeError" type="error" mt-12 title="Error while decoding">
{{ decodeError }}
</c-alert>
<c-input-text
v-else
label="Your decoded text:"
:value="decodeOutput"
placeholder="Your string decoded"
rows="3"
multiline monospace readonly autosize mt-5
/>
</c-card>
</template>