mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
feat: extract strings of new tools
This commit is contained in:
1 parent
fdb39a80cb
commit
9425d3419b
21 files changed
+1615
-1505
No files matched your search
+1425
-1354
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { parse } from 'creditcard';
|
||||
import { useQueryParam } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const cardNumber = useQueryParam({ tool: 'credit-card-validator', name: 'number', defaultValue: '' });
|
||||
const parsed = computed(() => {
|
||||
if (!cardNumber.value) {
|
||||
@@ -15,22 +18,22 @@ const parsed = computed(() => {
|
||||
<div style="max-width: 600px;">
|
||||
<c-input-text
|
||||
v-model:value="cardNumber"
|
||||
label="Credit Card Number:"
|
||||
:label="t('tools.credit-card-checker.texts.label-credit-card-number')"
|
||||
label-position="left"
|
||||
placeholder="e.g. 4111 1111 1111 1111"
|
||||
:placeholder="t('tools.credit-card-checker.texts.placeholder-e-g-4111-1111-1111-1111')"
|
||||
mb-2
|
||||
/>
|
||||
|
||||
<n-alert v-if="parsed && !parsed.validates" type="error">
|
||||
Invlid Credit Card Number
|
||||
{{ t('tools.credit-card-checker.texts.tag-invlid-credit-card-number') }}
|
||||
</n-alert>
|
||||
<n-card v-if="parsed && parsed.validates" title="Credit Card Number Info">
|
||||
<input-copyable label="Formatted:" label-position="left" label-width="150px" mb-1 :value="parsed.formatted" />
|
||||
<input-copyable label="PAN Truncated:" label-position="left" label-width="150px" mb-1 :value="parsed.truncate" />
|
||||
<input-copyable label="Scheme:" label-position="left" label-width="150px" mb-1 :value="parsed.scheme || 'Unknown'" />
|
||||
<input-copyable label="Major Industry Identifier:" mb-1 :value="parsed.mii" />
|
||||
<input-copyable label="Issuer Identifier Number:" mb-1 :value="parsed.iin" />
|
||||
<input-copyable label="CVV Length:" label-position="left" label-width="150px" mb-1 :value="parsed.cvv" />
|
||||
<n-card v-if="parsed && parsed.validates" :title="t('tools.credit-card-checker.texts.title-credit-card-number-info')">
|
||||
<input-copyable :label="t('tools.credit-card-checker.texts.label-formatted')" label-position="left" label-width="150px" mb-1 :value="parsed.formatted" />
|
||||
<input-copyable :label="t('tools.credit-card-checker.texts.label-pan-truncated')" label-position="left" label-width="150px" mb-1 :value="parsed.truncate" />
|
||||
<input-copyable :label="t('tools.credit-card-checker.texts.label-scheme')" label-position="left" label-width="150px" mb-1 :value="parsed.scheme || 'Unknown'" />
|
||||
<input-copyable :label="t('tools.credit-card-checker.texts.label-major-industry-identifier')" mb-1 :value="parsed.mii" />
|
||||
<input-copyable :label="t('tools.credit-card-checker.texts.label-issuer-identifier-number')" mb-1 :value="parsed.iin" />
|
||||
<input-copyable :label="t('tools.credit-card-checker.texts.label-cvv-length')" label-position="left" label-width="150px" mb-1 :value="parsed.cvv" />
|
||||
</n-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,10 +1,11 @@
|
||||
import { CreditCard } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Credit Card Checker',
|
||||
name: t('tools.credit-card-checker.title'),
|
||||
path: '/credit-card-checker',
|
||||
description: 'Check a Credit Card number for validity',
|
||||
description: t('tools.credit-card-checker.description'),
|
||||
keywords: ['credit', 'card', 'checker'],
|
||||
component: () => import('./credit-card-checker.vue'),
|
||||
icon: CreditCard,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { GenCC, Schemes } from 'creditcard-generator';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const schemes = Object.keys(Schemes);
|
||||
|
||||
const selectedScheme = useQueryParamOrStorage({ name: 'type', storageName: 'credit-card-gen:t', defaultValue: 'VISA' });
|
||||
@@ -19,26 +22,26 @@ function generateCards() {
|
||||
<c-select
|
||||
v-model:value="selectedScheme"
|
||||
:options="schemes"
|
||||
label="Credit Card Scheme:"
|
||||
:label="t('tools.credit-card-generator.texts.label-credit-card-scheme')"
|
||||
label-position="left"
|
||||
placeholder="Select Scheme"
|
||||
:placeholder="t('tools.credit-card-generator.texts.placeholder-select-scheme')"
|
||||
mb-1
|
||||
/>
|
||||
<n-form-item label="Number of Credit Card to generate:" label-placement="left">
|
||||
<n-form-item :label="t('tools.credit-card-generator.texts.label-number-of-credit-card-to-generate')" label-placement="left">
|
||||
<n-input-number
|
||||
v-model:value="count"
|
||||
:min="1"
|
||||
:max="50"
|
||||
placeholder="Number of cards"
|
||||
:placeholder="t('tools.credit-card-generator.texts.placeholder-number-of-cards')"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" mb-3 @click="generateCards">
|
||||
Generate Random Credit Card numbers
|
||||
{{ t('tools.credit-card-generator.texts.tag-generate-random-credit-card-numbers') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
<c-card v-if="cards" title="Generated Credit Card numbers">
|
||||
<c-card v-if="cards" :title="t('tools.credit-card-generator.texts.title-generated-credit-card-numbers')">
|
||||
<textarea-copyable :value="cards" />
|
||||
</c-card>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { CreditCard } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Credit Card Number Generator',
|
||||
name: t('tools.credit-card-generator.title'),
|
||||
path: '/credit-card-generator',
|
||||
description: 'Generate Random Credit Card Number',
|
||||
description: t('tools.credit-card-generator.description'),
|
||||
keywords: ['credit', 'card', 'generator'],
|
||||
component: () => import('./credit-card-generator.vue'),
|
||||
icon: CreditCard,
|
||||
|
||||
+41
-38
@@ -1,35 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const dbType = useQueryParamOrStorage({ name: 'type', storageName: 'conn-string-builder:t', defaultValue: 'postgres' });
|
||||
const dbOptions = [
|
||||
{ label: 'MySQL', value: 'mysql' },
|
||||
{ label: 'PostgreSQL', value: 'postgres' },
|
||||
{ label: 'SQL Server', value: 'sqlserver' },
|
||||
{ label: 'SQLite', value: 'sqlite' },
|
||||
{ label: 'MongoDB', value: 'mongodb' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-mysql'), value: 'mysql' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-postgresql'), value: 'postgres' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-sql-server'), value: 'sqlserver' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-sqlite'), value: 'sqlite' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-mongodb'), value: 'mongodb' },
|
||||
];
|
||||
|
||||
const formatOptions = [
|
||||
{ label: 'URI Scheme', value: 'uri' },
|
||||
{ label: 'Keyword-Value Pairs', value: 'kvp' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-uri-scheme'), value: 'uri' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-keyword-value-pairs'), value: 'kvp' },
|
||||
];
|
||||
|
||||
const authOptions: Record<string, { label: string; value: string }[]> = {
|
||||
mysql: [{ label: 'Username/Password', value: 'basic' }],
|
||||
mysql: [{ label: t('tools.database-connection-string-builder.texts.label-username-password'), value: 'basic' }],
|
||||
postgres: [
|
||||
{ label: 'Username/Password', value: 'basic' },
|
||||
{ label: 'Peer', value: 'peer' },
|
||||
{ label: 'GSSAPI/SSPI', value: 'gssapi' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-username-password'), value: 'basic' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-peer'), value: 'peer' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-gssapi-sspi'), value: 'gssapi' },
|
||||
],
|
||||
sqlserver: [
|
||||
{ label: 'Username/Password', value: 'basic' },
|
||||
{ label: 'Windows Integrated', value: 'windows' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-username-password'), value: 'basic' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-windows-integrated'), value: 'windows' },
|
||||
],
|
||||
sqlite: [],
|
||||
mongodb: [
|
||||
{ label: 'Username/Password (SCRAM)', value: 'basic' },
|
||||
{ label: 'X.509 Certificate', value: 'x509' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-username-password-scram'), value: 'basic' },
|
||||
{ label: t('tools.database-connection-string-builder.texts.label-x-509-certificate'), value: 'x509' },
|
||||
],
|
||||
};
|
||||
|
||||
@@ -123,12 +126,12 @@ const connectionString = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-card title="Database Connection String Generator" style="max-width: 750px; margin: auto;">
|
||||
<n-card :title="t('tools.database-connection-string-builder.texts.title-database-connection-string-generator')" style="max-width: 750px; margin: auto;">
|
||||
<c-select
|
||||
v-model:value="dbType"
|
||||
:options="dbOptions"
|
||||
placeholder="Select a database"
|
||||
label="Database type:"
|
||||
:placeholder="t('tools.database-connection-string-builder.texts.placeholder-select-a-database')"
|
||||
:label="t('tools.database-connection-string-builder.texts.label-database-type')"
|
||||
label-position="left"
|
||||
mb-2
|
||||
/>
|
||||
@@ -136,61 +139,61 @@ const connectionString = computed(() => {
|
||||
<c-select
|
||||
v-model:value="form.format"
|
||||
:options="formatOptions"
|
||||
placeholder="Select format"
|
||||
label="Connection String Format:"
|
||||
:placeholder="t('tools.database-connection-string-builder.texts.placeholder-select-format')"
|
||||
:label="t('tools.database-connection-string-builder.texts.label-connection-string-format')"
|
||||
label-position="left"
|
||||
mb-2
|
||||
/>
|
||||
|
||||
<n-divider>Options</n-divider>
|
||||
<n-divider>{{ t('tools.database-connection-string-builder.texts.tag-options') }}</n-divider>
|
||||
|
||||
<n-form :model="form" label-placement="left" label-width="140">
|
||||
<n-form-item v-if="authOptions[dbType]?.length" label="Authentication Type">
|
||||
<n-form-item v-if="authOptions[dbType]?.length" :label="t('tools.database-connection-string-builder.texts.label-authentication-type')">
|
||||
<n-select
|
||||
v-model:value="form.authType"
|
||||
:options="authOptions[dbType]"
|
||||
placeholder="Select authentication"
|
||||
:placeholder="t('tools.database-connection-string-builder.texts.placeholder-select-authentication')"
|
||||
/>
|
||||
</n-form-item>
|
||||
|
||||
<template v-if="dbType !== 'sqlite' && form.authType !== 'peer' && form.authType !== 'windows' && form.authType !== 'x509'">
|
||||
<n-form-item label="Host">
|
||||
<n-input v-model:value="form.host" placeholder="e.g. localhost" />
|
||||
<n-form-item :label="t('tools.database-connection-string-builder.texts.label-host')">
|
||||
<n-input v-model:value="form.host" :placeholder="t('tools.database-connection-string-builder.texts.placeholder-e-g-localhost')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Port">
|
||||
<n-form-item :label="t('tools.database-connection-string-builder.texts.label-port')">
|
||||
<n-input-number v-model:value="form.port" :min="1" :max="65535" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Username">
|
||||
<n-form-item :label="t('tools.database-connection-string-builder.texts.label-username')">
|
||||
<n-input v-model:value="form.username" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Password">
|
||||
<n-form-item :label="t('tools.database-connection-string-builder.texts.label-password')">
|
||||
<n-input v-model:value="form.password" type="password" />
|
||||
</n-form-item>
|
||||
</template>
|
||||
|
||||
<n-form-item label="Database">
|
||||
<n-input v-model:value="form.database" placeholder="e.g. mydb" />
|
||||
<n-form-item :label="t('tools.database-connection-string-builder.texts.label-database')">
|
||||
<n-input v-model:value="form.database" :placeholder="t('tools.database-connection-string-builder.texts.placeholder-e-g-mydb')" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item v-if="dbType === 'sqlite'" label="File Path">
|
||||
<n-input v-model:value="form.filePath" placeholder="/path/to/sqlite.db" />
|
||||
<n-form-item v-if="dbType === 'sqlite'" :label="t('tools.database-connection-string-builder.texts.label-file-path')">
|
||||
<n-input v-model:value="form.filePath" :placeholder="t('tools.database-connection-string-builder.texts.placeholder-path-to-sqlite-db')" />
|
||||
</n-form-item>
|
||||
|
||||
<details mb-3>
|
||||
<summary>Advanced Options</summary>
|
||||
<n-form-item label="SSL Enabled">
|
||||
<summary>{{ t('tools.database-connection-string-builder.texts.tag-advanced-options') }}</summary>
|
||||
<n-form-item :label="t('tools.database-connection-string-builder.texts.label-ssl-enabled')">
|
||||
<n-switch v-model:value="form.ssl" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Timeout (s)">
|
||||
<n-form-item :label="t('tools.database-connection-string-builder.texts.label-timeout-s')">
|
||||
<n-input-number v-model:value="form.timeout" :min="0" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Extra Params">
|
||||
<n-input v-model:value="form.extra" placeholder="e.g. charset=utf8&applicationName=myapp" />
|
||||
<n-form-item :label="t('tools.database-connection-string-builder.texts.label-extra-params')">
|
||||
<n-input v-model:value="form.extra" :placeholder="t('tools.database-connection-string-builder.texts.placeholder-e-g-charset-utf8-applicationname-myapp')" />
|
||||
</n-form-item>
|
||||
</details>
|
||||
</n-form>
|
||||
|
||||
<c-card title="Generate Connection String">
|
||||
<c-card :title="t('tools.database-connection-string-builder.texts.title-generate-connection-string')">
|
||||
<textarea-copyable :value="connectionString" />
|
||||
</c-card>
|
||||
</n-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Database } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Database Connection String Builder',
|
||||
name: t('tools.database-connection-string-builder.title'),
|
||||
path: '/database-connection-string-builder',
|
||||
description: 'Build connection string for common database',
|
||||
description: t('tools.database-connection-string-builder.description'),
|
||||
keywords: ['database', 'connection', 'builder', 'mysql', 'mongodb', 'sqlserver', 'sqlite', 'postgresql'],
|
||||
component: () => import('./database-connection-string-builder.vue'),
|
||||
icon: Database,
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { dbmToMw, mwToDbm } from './dbm-mw-converter.service'; // Adjust path as needed
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { dbmToMw, mwToDbm } from './dbm-mw-converter.service';
|
||||
|
||||
const { t } = useI18n(); // Adjust path as needed
|
||||
|
||||
const dbmInput = ref(1);
|
||||
const mwOutput = computed(() => dbmToMw(dbmInput.value).toFixed(3));
|
||||
@@ -9,19 +12,19 @@ const dbmOutput = computed(() => mwToDbm(mwInput.value).toFixed(3));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-card title="dBm to mW">
|
||||
<n-form-item label="dBm value:" label-placement="left">
|
||||
<c-card :title="t('tools.dbm-mw-converter.texts.title-dbm-to-mw')">
|
||||
<n-form-item :label="t('tools.dbm-mw-converter.texts.label-dbm-value')" label-placement="left">
|
||||
<n-input-number-i18n v-model:value="dbmInput" />
|
||||
</n-form-item>
|
||||
|
||||
<input-copyable label="Corresponding mW value:" label-position="left" :value="mwOutput" />
|
||||
<input-copyable :label="t('tools.dbm-mw-converter.texts.label-corresponding-mw-value')" label-position="left" :value="mwOutput" />
|
||||
</c-card>
|
||||
|
||||
<c-card title="mW to dBm">
|
||||
<n-form-item label="mW value:" label-placement="left">
|
||||
<c-card :title="t('tools.dbm-mw-converter.texts.title-mw-to-dbm')">
|
||||
<n-form-item :label="t('tools.dbm-mw-converter.texts.label-mw-value')" label-placement="left">
|
||||
<n-input-number-i18n v-model:value="mwInput" :min="0" />
|
||||
</n-form-item>
|
||||
|
||||
<input-copyable label="Corresponding dBm value:" label-position="left" :value="dbmOutput" />
|
||||
<input-copyable :label="t('tools.dbm-mw-converter.texts.label-corresponding-dbm-value')" label-position="left" :value="dbmOutput" />
|
||||
</c-card>
|
||||
</template>
|
||||
@@ -1,10 +1,11 @@
|
||||
import { DeviceAudioTape } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'dBm mW Converter',
|
||||
name: t('tools.dbm-mw-converter.title'),
|
||||
path: '/dbm-mw-converter',
|
||||
description: 'Convert dBm to mW and conversely',
|
||||
description: t('tools.dbm-mw-converter.description'),
|
||||
keywords: ['dbm', 'mw', 'converter'],
|
||||
component: () => import('./dbm-mw-converter.vue'),
|
||||
icon: DeviceAudioTape,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import dwGen from 'diceware-generator';
|
||||
import enWL from 'diceware-wordlist-en';
|
||||
import enEffWL from 'diceware-wordlist-en-eff';
|
||||
@@ -9,16 +10,18 @@ import { computedRefreshable } from '@/composable/computedRefreshable';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const count = useQueryParamOrStorage({ name: 'count', storageName: 'diceware-generator:count', defaultValue: 1 });
|
||||
const words = useQueryParamOrStorage({ name: 'words', storageName: 'diceware-generator:words', defaultValue: 5 });
|
||||
const lang = useQueryParamOrStorage({ name: 'lang', storageName: 'diceware-generator:lang', defaultValue: 'en' });
|
||||
|
||||
const langs = [
|
||||
{ value: 'en', label: 'English' },
|
||||
{ value: 'en-eff', label: 'English EFF' },
|
||||
{ value: 'sp', label: 'Spanish' },
|
||||
{ value: 'jp', label: 'Japanese' },
|
||||
{ value: 'swe', label: 'Swedish' },
|
||||
{ value: 'en', label: t('tools.diceware-generator.texts.label-english') },
|
||||
{ value: 'en-eff', label: t('tools.diceware-generator.texts.label-english-eff') },
|
||||
{ value: 'sp', label: t('tools.diceware-generator.texts.label-spanish') },
|
||||
{ value: 'jp', label: t('tools.diceware-generator.texts.label-japanese') },
|
||||
{ value: 'swe', label: t('tools.diceware-generator.texts.label-swedish') },
|
||||
];
|
||||
|
||||
const [dicewares, refreshDicewares] = computedRefreshable(
|
||||
@@ -47,7 +50,7 @@ const [dicewares, refreshDicewares] = computedRefreshable(
|
||||
}).join('\n'),
|
||||
);
|
||||
|
||||
const { copy } = useCopy({ source: dicewares, text: 'Diceward Passwords copied to clipboard!' });
|
||||
const { copy } = useCopy({ source: dicewares, text: t('tools.diceware-generator.texts.text-diceward-passwords-copied-to-clipboard') });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -59,14 +62,14 @@ const { copy } = useCopy({ source: dicewares, text: 'Diceward Passwords copied t
|
||||
<n-input-number-i18n v-model:value="words" size="small" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Number of Diceware passwords to generate:" label-placement="left">
|
||||
<n-form-item :label="t('tools.diceware-generator.texts.label-number-of-diceware-passwords-to-generate')" label-placement="left">
|
||||
<n-input-number-i18n v-model:value="count" size="small" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<c-select
|
||||
v-model:value="lang"
|
||||
label="Languages:"
|
||||
:label="t('tools.diceware-generator.texts.label-languages')"
|
||||
label-position="left"
|
||||
:options="langs"
|
||||
mb-4
|
||||
@@ -74,9 +77,9 @@ const { copy } = useCopy({ source: dicewares, text: 'Diceward Passwords copied t
|
||||
|
||||
<c-input-text
|
||||
v-model:value="dicewares"
|
||||
label="Generated passwords:"
|
||||
:label="t('tools.diceware-generator.texts.label-generated-passwords')"
|
||||
multiline
|
||||
placeholder="Diceware passwords..."
|
||||
:placeholder="t('tools.diceware-generator.texts.placeholder-diceware-passwords')"
|
||||
readonly
|
||||
rows="3"
|
||||
autosize
|
||||
@@ -86,10 +89,10 @@ const { copy } = useCopy({ source: dicewares, text: 'Diceward Passwords copied t
|
||||
|
||||
<div mt-5 flex justify-center gap-3>
|
||||
<c-button @click="copy()">
|
||||
Copy
|
||||
{{ t('tools.diceware-generator.texts.tag-copy') }}
|
||||
</c-button>
|
||||
<c-button @click="refreshDicewares">
|
||||
Refresh
|
||||
{{ t('tools.diceware-generator.texts.tag-refresh') }}
|
||||
</c-button>
|
||||
</div>
|
||||
</c-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { ArrowsShuffle } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Diceware Password Generator',
|
||||
name: t('tools.diceware-generator.title'),
|
||||
path: '/diceware-generator',
|
||||
description: 'Generate random password using Diceware method',
|
||||
description: t('tools.diceware-generator.description'),
|
||||
keywords: ['diceware', 'generator'],
|
||||
component: () => import('./diceware-generator.vue'),
|
||||
icon: ArrowsShuffle,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import {
|
||||
calculateCheckDigitForGTIN,
|
||||
getFormatOfGTIN,
|
||||
@@ -8,6 +9,8 @@ import {
|
||||
} from 'gtin-validator';
|
||||
import { useQueryParam } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const input = useQueryParam({ tool: 'gtin-validator', name: 'gtin', defaultValue: '' });
|
||||
|
||||
const results = computed(() => {
|
||||
@@ -40,23 +43,23 @@ const results = computed(() => {
|
||||
<div style="max-width: 600px; margin: auto;">
|
||||
<c-input-text
|
||||
v-model:value="input"
|
||||
placeholder="Enter GTIN (e.g., 4006381333931)"
|
||||
label="GTIN:" label-position="left"
|
||||
:placeholder="t('tools.gtin-validator.texts.placeholder-enter-gtin-e-g-4006381333931')"
|
||||
:label="t('tools.gtin-validator.texts.label-gtin')" label-position="left"
|
||||
mb-2
|
||||
/>
|
||||
|
||||
<n-card v-if="results" title="Validation">
|
||||
<n-card v-if="results" :title="t('tools.gtin-validator.texts.title-validation')">
|
||||
<n-alert v-if="!results.isValid" type="error" mb-2>
|
||||
{{ results.message }}
|
||||
</n-alert>
|
||||
<n-alert v-else type="success" mb-2>
|
||||
GTIN is valid
|
||||
{{ t('tools.gtin-validator.texts.tag-gtin-is-valid') }}
|
||||
</n-alert>
|
||||
|
||||
<input-copyable :value="results.format" label="Format:" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="results.minified" label="Minified:" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="results.minifiedFormat" label="Minified Format:" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="results.checkDigit" label="Check Digit:" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="results.format" :label="t('tools.gtin-validator.texts.label-format')" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="results.minified" :label="t('tools.gtin-validator.texts.label-minified')" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="results.minifiedFormat" :label="t('tools.gtin-validator.texts.label-minified-format')" label-position="left" label-width="120px" mb-1 />
|
||||
<input-copyable :value="results.checkDigit" :label="t('tools.gtin-validator.texts.label-check-digit')" label-position="left" label-width="120px" mb-1 />
|
||||
</n-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Barcode } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'GTIN Validator',
|
||||
name: t('tools.gtin-validator.title'),
|
||||
path: '/gtin-validator',
|
||||
description: 'Validate and display information about GTIN (Global Trade Identifier Number formerly EAN Number), UPC and other product codes formats',
|
||||
description: t('tools.gtin-validator.description'),
|
||||
keywords: ['gtin', 'validator', 'ean', 'trade', 'identifier'],
|
||||
component: () => import('./gtin-validator.vue'),
|
||||
icon: Barcode,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQueryParam } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const domain = useQueryParam({ tool: 'whois-checker', name: 'domain', defaultValue: '' });
|
||||
|
||||
function launchWhois() {
|
||||
@@ -17,14 +20,14 @@ function launchWhois() {
|
||||
<div style="max-width: 600px">
|
||||
<c-input-text
|
||||
v-model:value="domain"
|
||||
label="Domain to check:"
|
||||
:label="t('tools.iana-whois-checker.texts.label-domain-to-check')"
|
||||
label-position="left"
|
||||
placeholder="Enter a domain (e.g. example.com)"
|
||||
:placeholder="t('tools.iana-whois-checker.texts.placeholder-enter-a-domain-e-g-example-com')"
|
||||
mb-2
|
||||
/>
|
||||
<n-space justify="center">
|
||||
<n-button type="primary" @click="launchWhois">
|
||||
Lookup WHOIS
|
||||
{{ t('tools.iana-whois-checker.texts.tag-lookup-whois') }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { World } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Whois Checker',
|
||||
name: t('tools.iana-whois-checker.title'),
|
||||
path: '/iana-whois-checker',
|
||||
description: 'Check whois for a domain using IANA Website',
|
||||
description: t('tools.iana-whois-checker.description'),
|
||||
keywords: ['iana', 'whois', 'checker'],
|
||||
component: () => import('./iana-whois-checker.vue'),
|
||||
icon: World,
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { invertImageFile } from './image-color-inverter.service';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
import { useDownloadFileFromBase64 } from '@/composable/downloadBase64';
|
||||
import { withDefaultOnError } from '@/utils/defaults';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const originalImageSrc = ref<string>('');
|
||||
const invertedImageSrc = ref<string>('');
|
||||
const isProcessing = ref(false);
|
||||
@@ -11,7 +14,7 @@ const error = ref<string | null>(null);
|
||||
|
||||
const { copy: copyInvertedImage } = useCopy({
|
||||
source: invertedImageSrc,
|
||||
text: 'Inverted image base64 copied to clipboard',
|
||||
text: t('tools.image-color-inverter.texts.text-inverted-image-base64-copied-to-clipboard'),
|
||||
});
|
||||
|
||||
const { download: downloadInvertedImage } = useDownloadFileFromBase64({
|
||||
@@ -58,7 +61,7 @@ function clearImages() {
|
||||
<template>
|
||||
<c-card>
|
||||
<c-file-upload
|
||||
title="Drag and drop an image here, or click to select"
|
||||
:title="t('tools.image-color-inverter.texts.title-drag-and-drop-an-image-here-or-click-to-select')"
|
||||
accept="image/*"
|
||||
@file-upload="handleFileUpload"
|
||||
/>
|
||||
@@ -73,7 +76,7 @@ function clearImages() {
|
||||
<n-grid v-if="originalImageSrc || invertedImageSrc" :cols="2" :x-gap="16">
|
||||
<n-gi v-if="originalImageSrc">
|
||||
<div>
|
||||
<n-h3>Original Image</n-h3>
|
||||
<n-h3>{{ t('tools.image-color-inverter.texts.tag-original-image') }}</n-h3>
|
||||
<div class="image-container">
|
||||
<img :src="originalImageSrc" alt="Original">
|
||||
</div>
|
||||
@@ -82,16 +85,16 @@ function clearImages() {
|
||||
|
||||
<n-gi v-if="invertedImageSrc">
|
||||
<div>
|
||||
<n-h3>Inverted Image</n-h3>
|
||||
<n-h3>{{ t('tools.image-color-inverter.texts.tag-inverted-image') }}</n-h3>
|
||||
<div class="image-container">
|
||||
<img :src="invertedImageSrc" alt="Inverted">
|
||||
</div>
|
||||
<n-space style="margin-top: 12px" justify="start">
|
||||
<c-button @click="downloadInvertedImage()">
|
||||
Download PNG
|
||||
{{ t('tools.image-color-inverter.texts.tag-download-png') }}
|
||||
</c-button>
|
||||
<c-button @click="copyInvertedImage()">
|
||||
Copy Base64
|
||||
{{ t('tools.image-color-inverter.texts.tag-copy-base64') }}
|
||||
</c-button>
|
||||
</n-space>
|
||||
</div>
|
||||
@@ -100,7 +103,7 @@ function clearImages() {
|
||||
|
||||
<div v-if="originalImageSrc || invertedImageSrc" style="margin-top: 16px; text-align: center">
|
||||
<c-button secondary @click="clearImages()">
|
||||
Clear & Upload New
|
||||
{{ t('tools.image-color-inverter.texts.tag-clear-upload-new') }}
|
||||
</c-button>
|
||||
</div>
|
||||
</n-spin>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Keyboard } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Keyboard Layout Converter',
|
||||
name: t('tools.keyboard-layout-converter.title'),
|
||||
path: '/keyboard-layout-converter',
|
||||
description: 'Convert keys sequence from one keyboard layout to another',
|
||||
description: t('tools.keyboard-layout-converter.description'),
|
||||
keywords: ['keyboard', 'layout', 'converter'],
|
||||
component: () => import('./keyboard-layout-converter.vue'),
|
||||
icon: Keyboard,
|
||||
|
||||
@@ -1,29 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { ArrowRight } from '@vicons/tabler';
|
||||
import layouts from '@langfreak/convert-layout';
|
||||
import { useQueryParam, useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
// Layout options with keyword names
|
||||
const layoutOptions = [
|
||||
{ label: 'Arabic (ar) – Arabic Keyboard', value: 'ar' },
|
||||
{ label: 'Belarusian (by) – Cyrillic QWERTY', value: 'by' },
|
||||
{ label: 'Colemak (colemak) – Colemak Layout', value: 'colemak' },
|
||||
{ label: 'Czech (cs) – QWERTZ', value: 'cs' },
|
||||
{ label: 'Dvorak (dvorak) – Dvorak Layout', value: 'dvorak' },
|
||||
{ label: 'English (en) – QWERTY', value: 'en' },
|
||||
{ label: 'French (fr) – AZERTY', value: 'fr' },
|
||||
{ label: 'German (de) – QWERTZ', value: 'de' },
|
||||
{ label: 'Greek (gr) – Greek Keyboard', value: 'gr' },
|
||||
{ label: 'Hebrew (he) – Hebrew Keyboard', value: 'he' },
|
||||
{ label: 'Italian (it) – QWERTY', value: 'it' },
|
||||
{ label: 'Kazakh (kk) – Cyrillic QWERTY', value: 'kk' },
|
||||
{ label: 'Korean (kr) – Hangul Keyboard', value: 'kr' },
|
||||
{ label: 'Persian (fa) – Persian Keyboard', value: 'fa' },
|
||||
{ label: 'Russian (ru) – Cyrillic JCUKEN', value: 'ru' },
|
||||
{ label: 'Spanish (es) – QWERTY (Spanish ISO)', value: 'es' },
|
||||
{ label: 'Swedish (sv) – QWERTY (Nordic)', value: 'sv' },
|
||||
{ label: 'Turkish (tr) – Turkish QWERTY (Q)', value: 'tr' },
|
||||
{ label: 'Ukrainian (uk) – Cyrillic JCUKEN', value: 'uk' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-arabic-ar-arabic-keyboard'), value: 'ar' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-belarusian-by-cyrillic-qwerty'), value: 'by' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-colemak-colemak-colemak-layout'), value: 'colemak' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-czech-cs-qwertz'), value: 'cs' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-dvorak-dvorak-dvorak-layout'), value: 'dvorak' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-english-en-qwerty'), value: 'en' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-french-fr-azerty'), value: 'fr' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-german-de-qwertz'), value: 'de' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-greek-gr-greek-keyboard'), value: 'gr' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-hebrew-he-hebrew-keyboard'), value: 'he' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-italian-it-qwerty'), value: 'it' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-kazakh-kk-cyrillic-qwerty'), value: 'kk' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-korean-kr-hangul-keyboard'), value: 'kr' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-persian-fa-persian-keyboard'), value: 'fa' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-russian-ru-cyrillic-jcuken'), value: 'ru' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-spanish-es-qwerty-spanish-iso'), value: 'es' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-swedish-sv-qwerty-nordic'), value: 'sv' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-turkish-tr-turkish-qwerty-q'), value: 'tr' },
|
||||
{ label: t('tools.keyboard-layout-converter.texts.label-ukrainian-uk-cyrillic-jcuken'), value: 'uk' },
|
||||
];
|
||||
|
||||
const inputText = useQueryParam({ tool: 'keyboard-layout-conv', name: 'input', defaultValue: '' });
|
||||
@@ -45,7 +48,7 @@ const outputText = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="Keyboard Layout Converter">
|
||||
<NCard :title="t('tools.keyboard-layout-converter.texts.title-keyboard-layout-converter')">
|
||||
<NSpace vertical size="large">
|
||||
<NSpace align="center" justify="center">
|
||||
<NSelect
|
||||
@@ -53,7 +56,7 @@ const outputText = computed(() => {
|
||||
:options="layoutOptions"
|
||||
label-field="label"
|
||||
value-field="value"
|
||||
placeholder="Source layout"
|
||||
:placeholder="t('tools.keyboard-layout-converter.texts.placeholder-source-layout')"
|
||||
style="min-width: 200px;"
|
||||
/>
|
||||
<NIcon size="20">
|
||||
@@ -64,22 +67,22 @@ const outputText = computed(() => {
|
||||
:options="layoutOptions"
|
||||
label-field="label"
|
||||
value-field="value"
|
||||
placeholder="Target layout"
|
||||
:placeholder="t('tools.keyboard-layout-converter.texts.placeholder-target-layout')"
|
||||
style="min-width: 200px;"
|
||||
/>
|
||||
</NSpace>
|
||||
|
||||
<c-input-text
|
||||
v-model:value="inputText"
|
||||
placeholder="Type here…"
|
||||
label="Input value:"
|
||||
:placeholder="t('tools.keyboard-layout-converter.texts.placeholder-type-here')"
|
||||
:label="t('tools.keyboard-layout-converter.texts.label-input-value')"
|
||||
multiline
|
||||
/>
|
||||
|
||||
<c-card title="Converted to target keyboard layout">
|
||||
<c-card :title="t('tools.keyboard-layout-converter.texts.title-converted-to-target-keyboard-layout')">
|
||||
<textarea-copyable
|
||||
:value="outputText"
|
||||
placeholder="Converted output"
|
||||
:placeholder="t('tools.keyboard-layout-converter.texts.placeholder-converted-output')"
|
||||
readonly
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Binary } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Niceware Bytes to Passphrase',
|
||||
name: t('tools.niceware-bytes-to-passphrase.title'),
|
||||
path: '/niceware-bytes-to-passphrase',
|
||||
description: 'Convert bytes array to passphrase and conversely',
|
||||
description: t('tools.niceware-bytes-to-passphrase.description'),
|
||||
keywords: ['niceware', 'bytes', 'passphrase'],
|
||||
component: () => import('./niceware-bytes-to-passphrase.vue'),
|
||||
icon: Binary,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import hexArray from 'hex-array';
|
||||
import { bytesToPassphrase, passphraseToBytes } from 'niceware';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const textInput = ref('');
|
||||
const nicewareOutput = computed(() => {
|
||||
try {
|
||||
@@ -33,46 +36,46 @@ const textOutput = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-card title="Hex Array to Niceware passphrase">
|
||||
<c-card :title="t('tools.niceware-bytes-to-passphrase.texts.title-hex-array-to-niceware-passphrase')">
|
||||
<c-input-text
|
||||
v-model:value="textInput"
|
||||
multiline
|
||||
placeholder="Put your hex array here..."
|
||||
:placeholder="t('tools.niceware-bytes-to-passphrase.texts.placeholder-put-your-hex-array-here')"
|
||||
rows="5"
|
||||
label="Hex array to encode:"
|
||||
:label="t('tools.niceware-bytes-to-passphrase.texts.label-hex-array-to-encode')"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<n-form-item label="Converted Niceware passphrase:">
|
||||
<n-form-item :label="t('tools.niceware-bytes-to-passphrase.texts.label-converted-niceware-passphrase')">
|
||||
<textarea-copyable :value="nicewareOutput" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Niceware passphrase to hex array">
|
||||
<c-card :title="t('tools.niceware-bytes-to-passphrase.texts.title-niceware-passphrase-to-hex-array')">
|
||||
<n-space align="baseline" justify="center" mb-1>
|
||||
<n-form-item label="Uppercase" label-placement="left">
|
||||
<n-form-item :label="t('tools.niceware-bytes-to-passphrase.texts.label-uppercase')" label-placement="left">
|
||||
<n-switch v-model:value="uppercase" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Group by" label-placement="left">
|
||||
<n-form-item :label="t('tools.niceware-bytes-to-passphrase.texts.label-group-by')" label-placement="left">
|
||||
<n-input-number-i18n v-model:value="grouping" :min="0" style="width: 6em" mr-1 />
|
||||
<span>(Digit 0 = No grouping)</span>
|
||||
<span>{{ t('tools.niceware-bytes-to-passphrase.texts.tag-digit-0-no-grouping') }}</span>
|
||||
</n-form-item>
|
||||
<n-form-item label="Split as row by" label-placement="left">
|
||||
<n-form-item :label="t('tools.niceware-bytes-to-passphrase.texts.label-split-as-row-by')" label-placement="left">
|
||||
<n-input-number-i18n v-model:value="rowlength" :min="0" style="width: 6em" mr-1 />
|
||||
<span>(Digit 0 = No row)</span>
|
||||
<span>{{ t('tools.niceware-bytes-to-passphrase.texts.tag-digit-0-no-row') }}</span>
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
<c-input-text
|
||||
v-model:value="nicewareInput"
|
||||
multiline
|
||||
placeholder="Put your niceware passphrase here..."
|
||||
:placeholder="t('tools.niceware-bytes-to-passphrase.texts.placeholder-put-your-niceware-passphrase-here')"
|
||||
rows="5"
|
||||
label="Niceware passphrase to decode:"
|
||||
:label="t('tools.niceware-bytes-to-passphrase.texts.label-niceware-passphrase-to-decode')"
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<n-form-item label="Converted to Hex array:">
|
||||
<n-form-item :label="t('tools.niceware-bytes-to-passphrase.texts.label-converted-to-hex-array')">
|
||||
<textarea-copyable :value="textOutput" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
|
||||
@@ -25,9 +25,9 @@ function transformer(value: string) {
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
:input-label="t('tools.unicode-to-gsm7.texts.input-label-your-text-to-encode-to-gsm-7')"
|
||||
:input-placeholder="t('tools.unicode-to-gsm7.texts.input-placeholder-put-your-text-here')"
|
||||
:output-label="t('tools.unicode-to-gsm7.texts.output-label-gsm-7-encoded-version')"
|
||||
:input-:label="t('tools.unicode-to-gsm7.texts.label-t-tools-unicode-to-gsm7-texts-input-label-your-text-to-encode-to-gsm-7')"
|
||||
:input-:placeholder="t('tools.unicode-to-gsm7.texts.placeholder-t-tools-unicode-to-gsm7-texts-input-placeholder-put-your-text-here')"
|
||||
:output-:label="t('tools.unicode-to-gsm7.texts.label-t-tools-unicode-to-gsm7-texts-output-label-gsm-7-encoded-version')"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
|
||||
|
||||
Reference in new issue
Block a user