mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
Merge branch 'feat/npm-display' into chore/all-my-stuffs
# Conflicts: # components.d.ts # package.json # pnpm-lock.yaml
This commit is contained in:
commit
952f69a6f1
47 files changed
+93
-5
No files matched your search
@@ -197,6 +197,7 @@
|
||||
"vue-color-wheel": "^0.1.1",
|
||||
"vue-i18n": "^9.9.1",
|
||||
"vue-mathjax-next": "^0.0.6",
|
||||
"vue-markdown-render": "^2.2.1",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue-shadow-dom": "^4.2.0",
|
||||
"vue-tsc": "^1.8.1",
|
||||
|
||||
Generated
+12
-5
@@ -428,6 +428,9 @@ dependencies:
|
||||
vue-i18n:
|
||||
specifier: ^9.9.1
|
||||
version: 9.9.1(vue@3.3.4)
|
||||
vue-markdown-render:
|
||||
specifier: ^2.2.1
|
||||
version: 2.2.1(vue@3.3.4)
|
||||
vue-mathjax-next:
|
||||
specifier: ^0.0.6
|
||||
version: 0.0.6
|
||||
@@ -6975,7 +6978,6 @@ packages:
|
||||
/entities@3.0.1:
|
||||
resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==}
|
||||
engines: {node: '>=0.12'}
|
||||
dev: true
|
||||
|
||||
/entities@4.5.0:
|
||||
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
|
||||
@@ -9160,7 +9162,6 @@ packages:
|
||||
resolution: {integrity: sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==}
|
||||
dependencies:
|
||||
uc.micro: 1.0.6
|
||||
dev: true
|
||||
|
||||
/linkify-it@5.0.0:
|
||||
resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
|
||||
@@ -9368,7 +9369,6 @@ packages:
|
||||
linkify-it: 4.0.1
|
||||
mdurl: 1.0.1
|
||||
uc.micro: 1.0.6
|
||||
dev: true
|
||||
|
||||
/markdown-it@14.1.0:
|
||||
resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
|
||||
@@ -9449,7 +9449,6 @@ packages:
|
||||
|
||||
/mdurl@1.0.1:
|
||||
resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==}
|
||||
dev: true
|
||||
|
||||
/mdurl@2.0.0:
|
||||
resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
|
||||
@@ -12129,7 +12128,6 @@ packages:
|
||||
|
||||
/uc.micro@1.0.6:
|
||||
resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==}
|
||||
dev: true
|
||||
|
||||
/uc.micro@2.1.0:
|
||||
resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
|
||||
@@ -12894,6 +12892,15 @@ packages:
|
||||
'@vue/devtools-api': 6.5.0
|
||||
vue: 3.3.4
|
||||
|
||||
/vue-markdown-render@2.2.1(vue@3.3.4):
|
||||
resolution: {integrity: sha512-XkYnC0PMdbs6Vy6j/gZXSvCuOS0787Se5COwXlepRqiqPiunyCIeTPQAO2XnB4Yl04EOHXwLx5y6IuszMWSgyQ==}
|
||||
peerDependencies:
|
||||
vue: ^3.3.4
|
||||
dependencies:
|
||||
markdown-it: 13.0.2
|
||||
vue: 3.3.4
|
||||
dev: false
|
||||
|
||||
/vue-mathjax-next@0.0.6:
|
||||
resolution: {integrity: sha512-H4nZ8t31TmBJgiR6pHrOGz+RWhlw34d0yhD8fi8CnXoGOydGFreNH/Crd/9Jfd2IMSu/I0AC3ymT9D09JRMIrw==}
|
||||
dev: false
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useHead } from '@vueuse/head';
|
||||
import type { HeadObject } from '@vueuse/head';
|
||||
import VueMarkdown from 'vue-markdown-render';
|
||||
|
||||
import { useThemeVars } from 'naive-ui';
|
||||
import BaseLayout from './base.layout.vue';
|
||||
import FavoriteButton from '@/components/FavoriteButton.vue';
|
||||
import type { Tool } from '@/tools/tools.types';
|
||||
@@ -28,6 +30,23 @@ const { t } = useI18n();
|
||||
const i18nKey = computed<string>(() => route.path.trim().replace('/', ''));
|
||||
const toolTitle = computed<string>(() => t(`tools.${i18nKey.value}.title`, String(route.meta.name)));
|
||||
const toolDescription = computed<string>(() => t(`tools.${i18nKey.value}.description`, String(route.meta.description)));
|
||||
const toolFooter = computed<string>(() => {
|
||||
const createLink = (linkText: string, url: string) => {
|
||||
return `[${linkText.replace('[', '\\[').replace(']', '\\]')}](${url.replace('(', '%28').replace(')', '%29')})`;
|
||||
};
|
||||
let footer = t(`tools.${i18nKey.value}.footer`, String(route.meta.footer));
|
||||
if (footer === 'undefined') {
|
||||
footer = '';
|
||||
}
|
||||
const npmPackages = (route.meta.npmPackages as string[] || [])
|
||||
.map(
|
||||
packageName => createLink(
|
||||
packageName,
|
||||
packageName.includes('://') ? packageName : `https://www.npmjs.com/package/${packageName}`),
|
||||
);
|
||||
return ((npmPackages.length > 0 ? `Made with ${npmPackages.join(', ')}\n` : '') + footer).trim();
|
||||
});
|
||||
const themeVars = useThemeVars();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -55,6 +74,10 @@ const toolDescription = computed<string>(() => t(`tools.${i18nKey.value}.descrip
|
||||
<div class="tool-content">
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<div class="tool-footer">
|
||||
<VueMarkdown :source="toolFooter" />
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</template>
|
||||
|
||||
@@ -66,9 +89,11 @@ const toolDescription = computed<string>(() => t(`tools.${i18nKey.value}.descrip
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
overflow-x: auto;
|
||||
|
||||
::v-deep(& > *) {
|
||||
flex: 0 1 600px;
|
||||
min-width:0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,4 +130,14 @@ const toolDescription = computed<string>(() => t(`tools.${i18nKey.value}.descrip
|
||||
}
|
||||
}
|
||||
}
|
||||
.tool-footer {
|
||||
opacity: 0.7;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
|
||||
::v-deep(a) {
|
||||
color: v-bind('themeVars.textColor1');
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
component: () => import('./ascii-text-drawer.vue'),
|
||||
icon: Artboard,
|
||||
createdAt: new Date('2024-03-03'),
|
||||
npmPackages: ['figlet'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['base64', 'converter', 'upload', 'image', 'file', 'conversion', 'web', 'data', 'format'],
|
||||
component: () => import('./base64-file-converter.vue'),
|
||||
icon: FileDigit,
|
||||
npmPackages: ['js-base64'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./base64-string-converter.vue'),
|
||||
icon: FileDigit,
|
||||
redirectFrom: ['/file-to-base64', '/base64-converter'],
|
||||
npmPackages: ['js-base64'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['bcrypt', 'hash', 'compare', 'password', 'salt', 'round', 'storage', 'crypto'],
|
||||
component: () => import('./bcrypt.vue'),
|
||||
icon: LockSquare,
|
||||
npmPackages: ['bcryptjs'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['BIP39', 'passphrase', 'generator', 'mnemonic', 'entropy'],
|
||||
component: () => import('./bip39-generator.vue'),
|
||||
icon: AlignJustified,
|
||||
npmPackages: ['@it-tools/bip39'],
|
||||
});
|
||||
@@ -23,4 +23,5 @@ export const tool = defineTool({
|
||||
],
|
||||
component: () => import('./case-converter.vue'),
|
||||
icon: LetterCaseToggle,
|
||||
npmPackages: ['change-case'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./color-converter.vue'),
|
||||
icon: Palette,
|
||||
redirectFrom: ['/color-picker-converter'],
|
||||
npmPackages: ['colord'],
|
||||
});
|
||||
@@ -23,4 +23,5 @@ export const tool = defineTool({
|
||||
],
|
||||
component: () => import('./crontab-generator.vue'),
|
||||
icon: Alarm,
|
||||
npmPackages: ['cronstrue'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['date', 'time', 'converter', 'iso', 'utc', 'timezone', 'year', 'month', 'day', 'minute', 'seconde'],
|
||||
component: () => import('./date-time-converter.vue'),
|
||||
icon: Calendar,
|
||||
npmPackages: ['date-fns'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./emoji-picker.vue'),
|
||||
icon: MoodSmile,
|
||||
createdAt: new Date('2023-08-07'),
|
||||
npmPackages: ['unicode-emoji-json', 'emojilib'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./encryption.vue'),
|
||||
icon: Lock,
|
||||
redirectFrom: ['/cypher'],
|
||||
npmPackages: ['crypto-s'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['hmac', 'generator', 'MD5', 'SHA1', 'SHA256', 'SHA224', 'SHA512', 'SHA384', 'SHA3', 'RIPEMD160'],
|
||||
component: () => import('./hmac-generator.vue'),
|
||||
icon: ShortTextRound,
|
||||
npmPackages: ['crypto-js'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['html', 'wysiwyg', 'editor', 'p', 'ul', 'ol', 'converter', 'live'],
|
||||
component: () => import('./html-wysiwyg-editor.vue'),
|
||||
icon: Edit,
|
||||
npmPackages: ['monaco', 'prettier'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./iban-validator-and-parser.vue'),
|
||||
icon: Bank,
|
||||
createdAt: new Date('2023-08-26'),
|
||||
npmPackages: ['ibantools'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./ipv6-ula-generator.vue'),
|
||||
icon: BuildingFactory,
|
||||
createdAt: new Date('2023-04-09'),
|
||||
npmPackages: ['crypto-js'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./json-diff.vue'),
|
||||
icon: CompareArrowsRound,
|
||||
createdAt: new Date('2023-04-20'),
|
||||
npmPackages: ['json5'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['json', 'minify', 'format'],
|
||||
component: () => import('./json-minify.vue'),
|
||||
icon: Braces,
|
||||
npmPackages: ['json5'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./json-to-csv.vue'),
|
||||
icon: List,
|
||||
createdAt: new Date('2023-06-18'),
|
||||
npmPackages: ['json5'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./json-to-toml.vue'),
|
||||
icon: Braces,
|
||||
createdAt: new Date('2023-06-23'),
|
||||
npmPackages: ['json5', 'iarna-toml-esm'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./json-to-yaml.vue'),
|
||||
icon: Braces,
|
||||
createdAt: new Date('2023-04-10'),
|
||||
npmPackages: ['yaml', 'json5'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./json-viewer.vue'),
|
||||
icon: Braces,
|
||||
redirectFrom: ['/json-viewer'],
|
||||
npmPackages: ['json5'],
|
||||
});
|
||||
@@ -25,4 +25,5 @@ export const tool = defineTool({
|
||||
],
|
||||
component: () => import('./jwt-parser.vue'),
|
||||
icon: Key,
|
||||
npmPackages: ['jwt-decode'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./mac-address-lookup.vue'),
|
||||
icon: Devices,
|
||||
createdAt: new Date('2023-04-06'),
|
||||
npmPackages: ['oui-data'],
|
||||
});
|
||||
@@ -41,4 +41,5 @@ export const tool = defineTool({
|
||||
],
|
||||
component: () => import('./math-evaluator.vue'),
|
||||
icon: Math,
|
||||
npmPackages: ['mathjs'],
|
||||
});
|
||||
@@ -23,4 +23,5 @@ export const tool = defineTool({
|
||||
],
|
||||
component: () => import('./meta-tag-generator.vue'),
|
||||
icon: Tags,
|
||||
npmPackages: ['@it-tools/oggen'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['mime', 'types', 'extension', 'content', 'type'],
|
||||
component: () => import('./mime-types.vue'),
|
||||
icon: World,
|
||||
npmPackages: ['mime-types'],
|
||||
});
|
||||
@@ -25,4 +25,5 @@ export const tool = defineTool({
|
||||
],
|
||||
component: () => import('./otp-code-generator-and-validator.vue'),
|
||||
icon: DeviceMobile,
|
||||
npmPackages: ['crypto-js'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./pdf-signature-checker.vue'),
|
||||
icon: FileCertIcon,
|
||||
createdAt: new Date('2023-12-09'),
|
||||
npmPackages: ['pdf-signature-reader'],
|
||||
});
|
||||
@@ -22,4 +22,5 @@ export const tool = defineTool({
|
||||
component: () => import('./phone-parser-and-formatter.vue'),
|
||||
icon: Phone,
|
||||
createdAt: new Date('2023-05-01'),
|
||||
npmPackages: ['libphonenumber-js', 'country-code-lookup'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['qr', 'code', 'generator', 'square', 'color', 'link', 'low', 'medium', 'quartile', 'high', 'transparent'],
|
||||
component: () => import('./qr-code-generator.vue'),
|
||||
icon: Qrcode,
|
||||
npmPackages: ['qrcode'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['rsa', 'key', 'pair', 'generator', 'public', 'private', 'secret', 'ssh', 'pem'],
|
||||
component: () => import('./rsa-key-pair-generator.vue'),
|
||||
icon: Certificate,
|
||||
npmPackages: ['node-forge'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['slugify', 'string', 'escape', 'emoji', 'special', 'character', 'space', 'trim'],
|
||||
component: () => import('./slugify-string.vue'),
|
||||
icon: AbcRound,
|
||||
npmPackages: ['@sindresorhus/slugify'],
|
||||
});
|
||||
@@ -24,4 +24,5 @@ export const tool = defineTool({
|
||||
],
|
||||
component: () => import('./sql-prettify.vue'),
|
||||
icon: Database,
|
||||
npmPackages: ['sql-formatter'],
|
||||
});
|
||||
@@ -11,4 +11,5 @@ export const tool = defineTool({
|
||||
component: () => import('./toml-to-json.vue'),
|
||||
icon: BracketIcon,
|
||||
createdAt: new Date('2023-06-23'),
|
||||
npmPackages: ['yaml', 'iarna-toml-esm'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./toml-to-yaml.vue'),
|
||||
icon: BracketIcon,
|
||||
createdAt: new Date('2023-06-23'),
|
||||
npmPackages: ['yaml', 'iarna-toml-esm'],
|
||||
});
|
||||
@@ -10,6 +10,8 @@ export interface Tool {
|
||||
redirectFrom?: string[]
|
||||
isNew: boolean
|
||||
createdAt?: Date
|
||||
npmPackages?: string[]
|
||||
footer?: string
|
||||
}
|
||||
|
||||
export interface ToolCategory {
|
||||
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./ulid-generator.vue'),
|
||||
icon: SortDescendingNumbers,
|
||||
createdAt: new Date('2023-09-11'),
|
||||
npmPackages: ['ulid'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./user-agent-parser.vue'),
|
||||
icon: Browser,
|
||||
createdAt: new Date('2023-04-06'),
|
||||
npmPackages: ['ua-parser-js'],
|
||||
});
|
||||
@@ -9,4 +9,5 @@ export const tool = defineTool({
|
||||
keywords: ['uuid', 'v4', 'random', 'id', 'alphanumeric', 'identity', 'token', 'string', 'identifier', 'unique', 'v1', 'v3', 'v5', 'nil'],
|
||||
component: () => import('./uuid-generator.vue'),
|
||||
icon: Fingerprint,
|
||||
npmPackages: ['uuid'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./wifi-qr-code-generator.vue'),
|
||||
icon: Qrcode,
|
||||
createdAt: new Date('2023-09-06'),
|
||||
npmPackages: ['qrcode'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./xml-formatter.vue'),
|
||||
icon: Code,
|
||||
createdAt: new Date('2023-06-17'),
|
||||
npmPackages: ['xml-formatter'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./yaml-to-json.vue'),
|
||||
icon: AlignJustified,
|
||||
createdAt: new Date('2023-04-10'),
|
||||
npmPackages: ['yaml'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./yaml-to-toml.vue'),
|
||||
icon: AlignJustified,
|
||||
createdAt: new Date('2023-06-23'),
|
||||
npmPackages: ['yaml', 'iarna-toml-esm'],
|
||||
});
|
||||
@@ -10,4 +10,5 @@ export const tool = defineTool({
|
||||
component: () => import('./yaml-viewer.vue'),
|
||||
icon: AlignJustified,
|
||||
createdAt: new Date('2024-01-31'),
|
||||
npmPackages: ['yaml'],
|
||||
});
|
||||
Reference in new issue
Block a user