mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-24 14:50:17 +03:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97544530c9 | ||
|
|
0de51a2dea | ||
|
|
3b7b0a45e6 | ||
|
|
3a0b612239 | ||
|
|
e073b2babf | ||
|
|
83832f3e2c | ||
|
|
ee40ba1439 | ||
|
|
3f32990499 |
No files matched your search
@@ -15,7 +15,7 @@ jobs:
|
|||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 20
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 20
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Get Playwright version
|
- name: Get Playwright version
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
"@vueuse/core": "^10.3.0",
|
"@vueuse/core": "^10.3.0",
|
||||||
"@vueuse/head": "^1.0.0",
|
"@vueuse/head": "^1.0.0",
|
||||||
"@vueuse/router": "^10.0.0",
|
"@vueuse/router": "^10.0.0",
|
||||||
|
"apache-md5": "^1.1.8",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"change-case": "^4.1.2",
|
"change-case": "^4.1.2",
|
||||||
"colord": "^2.9.3",
|
"colord": "^2.9.3",
|
||||||
@@ -81,6 +82,7 @@
|
|||||||
"plausible-tracker": "^0.3.8",
|
"plausible-tracker": "^0.3.8",
|
||||||
"qrcode": "^1.5.1",
|
"qrcode": "^1.5.1",
|
||||||
"sql-formatter": "^13.0.0",
|
"sql-formatter": "^13.0.0",
|
||||||
|
"sshpk": "^1.18.0",
|
||||||
"ua-parser-js": "^1.0.35",
|
"ua-parser-js": "^1.0.35",
|
||||||
"ulid": "^2.3.0",
|
"ulid": "^2.3.0",
|
||||||
"unicode-emoji-json": "^0.4.0",
|
"unicode-emoji-json": "^0.4.0",
|
||||||
@@ -110,6 +112,7 @@
|
|||||||
"@types/node": "^18.15.11",
|
"@types/node": "^18.15.11",
|
||||||
"@types/node-forge": "^1.3.2",
|
"@types/node-forge": "^1.3.2",
|
||||||
"@types/qrcode": "^1.5.0",
|
"@types/qrcode": "^1.5.0",
|
||||||
|
"@types/sshpk": "^1.17.4",
|
||||||
"@types/ua-parser-js": "^0.7.36",
|
"@types/ua-parser-js": "^0.7.36",
|
||||||
"@types/uuid": "^9.0.0",
|
"@types/uuid": "^9.0.0",
|
||||||
"@unocss/eslint-config": "^0.57.0",
|
"@unocss/eslint-config": "^0.57.0",
|
||||||
@@ -131,6 +134,7 @@
|
|||||||
"unplugin-icons": "^0.17.0",
|
"unplugin-icons": "^0.17.0",
|
||||||
"unplugin-vue-components": "^0.25.0",
|
"unplugin-vue-components": "^0.25.0",
|
||||||
"vite": "^4.4.9",
|
"vite": "^4.4.9",
|
||||||
|
"vite-plugin-node-polyfills": "^0.21.0",
|
||||||
"vite-plugin-pwa": "^0.16.0",
|
"vite-plugin-pwa": "^0.16.0",
|
||||||
"vite-plugin-vue-markdown": "^0.23.5",
|
"vite-plugin-vue-markdown": "^0.23.5",
|
||||||
"vite-svg-loader": "^4.0.0",
|
"vite-svg-loader": "^4.0.0",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const useWebServer = process.env.NO_WEB_SERVER !== 'true';
|
|||||||
*/
|
*/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: './src',
|
testDir: './src',
|
||||||
testMatch: /.*\.e2e\.(spec\.)?ts/,
|
testMatch: /\.e2e\.(spec\.)?ts$/,
|
||||||
/* Run tests in files in parallel */
|
/* Run tests in files in parallel */
|
||||||
fullyParallel: true,
|
fullyParallel: true,
|
||||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||||
@@ -57,7 +57,7 @@ export default defineConfig({
|
|||||||
&& {
|
&& {
|
||||||
webServer: {
|
webServer: {
|
||||||
command: 'npm run preview',
|
command: 'npm run preview',
|
||||||
url: 'http://127.0.0.1:5050',
|
url: 'http://localhost:5050',
|
||||||
reuseExistingServer: !isCI,
|
reuseExistingServer: !isCI,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+645
-10
File diff suppressed because it is too large.
Load diff
@@ -16,6 +16,7 @@ const props = withDefaults(
|
|||||||
language?: string
|
language?: string
|
||||||
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
|
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
|
||||||
copyMessage?: string
|
copyMessage?: string
|
||||||
|
wordWrap?: boolean
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
followHeightOf: null,
|
followHeightOf: null,
|
||||||
@@ -47,7 +48,7 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
|
|||||||
:style="height ? `min-height: ${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : ''"
|
:style="height ? `min-height: ${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : ''"
|
||||||
>
|
>
|
||||||
<n-config-provider :hljs="hljs">
|
<n-config-provider :hljs="hljs">
|
||||||
<n-code :code="value" :language="language" :trim="false" data-test-id="area-content" />
|
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
|
||||||
</n-config-provider>
|
</n-config-provider>
|
||||||
</n-scrollbar>
|
</n-scrollbar>
|
||||||
<div absolute right-10px top-10px>
|
<div absolute right-10px top-10px>
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { hashSync } from 'bcryptjs';
|
||||||
|
import md5 from 'apache-md5';
|
||||||
|
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||||
|
|
||||||
|
const username = ref('');
|
||||||
|
const password = ref('');
|
||||||
|
const hashMethod = ref('bcrypt');
|
||||||
|
const saltCount = ref(10);
|
||||||
|
|
||||||
|
const htpasswd = computed(() => {
|
||||||
|
if (username.value === '' || password.value === '') {
|
||||||
|
return '# username and password must not be empty';
|
||||||
|
}
|
||||||
|
let hash;
|
||||||
|
if (hashMethod.value === 'md5') {
|
||||||
|
hash = md5(password.value);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
hash = hashSync(password.value, saltCount.value);
|
||||||
|
}
|
||||||
|
return `${username.value}:${hash}`;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<c-input-text
|
||||||
|
v-model:value="username"
|
||||||
|
label="Username"
|
||||||
|
placeholder="Your username..."
|
||||||
|
clearable raw-text mb-5
|
||||||
|
/>
|
||||||
|
<c-input-text
|
||||||
|
v-model:value="password"
|
||||||
|
label="Password"
|
||||||
|
placeholder="Your password..."
|
||||||
|
clearable
|
||||||
|
raw-text
|
||||||
|
mb-2
|
||||||
|
type="password"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<c-select
|
||||||
|
v-model:value="hashMethod"
|
||||||
|
label="Hash method:"
|
||||||
|
:options="['bcrypt', 'md5']"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<n-form-item v-if="hashMethod === 'bcrypt'" label="Salt count: " label-placement="left" label-width="120">
|
||||||
|
<n-input-number v-model:value="saltCount" placeholder="Salt rounds..." :max="100" :min="0" w-full />
|
||||||
|
</n-form-item>
|
||||||
|
|
||||||
|
<n-divider />
|
||||||
|
|
||||||
|
<n-form-item label="htpasswd content:">
|
||||||
|
<TextareaCopyable :value="htpasswd" />
|
||||||
|
</n-form-item>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { PasswordRound } from '@vicons/material';
|
||||||
|
import { defineTool } from '../tool';
|
||||||
|
|
||||||
|
export const tool = defineTool({
|
||||||
|
name: 'Htpasswd/htaccess generator',
|
||||||
|
path: '/htpasswd-generator',
|
||||||
|
description: 'htpassword/htaccess user/password generator',
|
||||||
|
keywords: ['htpasswd', 'htaccess', 'bcrypt', 'password'],
|
||||||
|
component: () => import('./htpasswd-generator.vue'),
|
||||||
|
icon: PasswordRound,
|
||||||
|
createdAt: new Date('2024-02-20'),
|
||||||
|
});
|
||||||
@@ -5,6 +5,7 @@ import { tool as basicAuthGenerator } from './basic-auth-generator';
|
|||||||
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';
|
||||||
|
import { tool as htpasswdGenerator } from './htpasswd-generator';
|
||||||
import { tool as safelinkDecoder } from './safelink-decoder';
|
import { tool as safelinkDecoder } from './safelink-decoder';
|
||||||
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
||||||
import { tool as numeronymGenerator } from './numeronym-generator';
|
import { tool as numeronymGenerator } from './numeronym-generator';
|
||||||
@@ -117,6 +118,7 @@ export const toolsByCategory: ToolCategory[] = [
|
|||||||
urlParser,
|
urlParser,
|
||||||
deviceInformation,
|
deviceInformation,
|
||||||
basicAuthGenerator,
|
basicAuthGenerator,
|
||||||
|
htpasswdGenerator,
|
||||||
metaTagGenerator,
|
metaTagGenerator,
|
||||||
otpCodeGeneratorAndValidator,
|
otpCodeGeneratorAndValidator,
|
||||||
mimeTypes,
|
mimeTypes,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { resolve } from 'node:path';
|
import { resolve } from 'node:path';
|
||||||
import { URL, fileURLToPath } from 'node:url';
|
import { URL, fileURLToPath } from 'node:url';
|
||||||
|
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||||
|
|
||||||
import VueI18n from '@intlify/unplugin-vue-i18n/vite';
|
import VueI18n from '@intlify/unplugin-vue-i18n/vite';
|
||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
@@ -97,6 +98,7 @@ export default defineConfig({
|
|||||||
resolvers: [NaiveUiResolver(), IconsResolver({ prefix: 'icon' })],
|
resolvers: [NaiveUiResolver(), IconsResolver({ prefix: 'icon' })],
|
||||||
}),
|
}),
|
||||||
Unocss(),
|
Unocss(),
|
||||||
|
nodePolyfills(),
|
||||||
],
|
],
|
||||||
base: baseUrl,
|
base: baseUrl,
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|||||||
Reference in new issue
Block a user