mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-06 06:17:11 -04:00
feat(TextareaCopyable): word-wrap prop
Add word-wrap property (to allow presenting long public keys)
This commit is contained in:
parent
92b723ae69
commit
c413ac293e
6 changed files with 146 additions and 126 deletions
32
components.d.ts
vendored
32
components.d.ts
vendored
|
@ -57,6 +57,7 @@ declare module '@vue/runtime-core' {
|
||||||
CrontabGenerator: typeof import('./src/tools/crontab-generator/crontab-generator.vue')['default']
|
CrontabGenerator: typeof import('./src/tools/crontab-generator/crontab-generator.vue')['default']
|
||||||
CSelect: typeof import('./src/ui/c-select/c-select.vue')['default']
|
CSelect: typeof import('./src/ui/c-select/c-select.vue')['default']
|
||||||
'CSelect.demo': typeof import('./src/ui/c-select/c-select.demo.vue')['default']
|
'CSelect.demo': typeof import('./src/ui/c-select/c-select.demo.vue')['default']
|
||||||
|
CsrGenerator: typeof import('./src/tools/csr-generator/csr-generator.vue')['default']
|
||||||
CTable: typeof import('./src/ui/c-table/c-table.vue')['default']
|
CTable: typeof import('./src/ui/c-table/c-table.vue')['default']
|
||||||
'CTable.demo': typeof import('./src/ui/c-table/c-table.demo.vue')['default']
|
'CTable.demo': typeof import('./src/ui/c-table/c-table.demo.vue')['default']
|
||||||
CTextCopyable: typeof import('./src/ui/c-text-copyable/c-text-copyable.vue')['default']
|
CTextCopyable: typeof import('./src/ui/c-text-copyable/c-text-copyable.vue')['default']
|
||||||
|
@ -88,28 +89,17 @@ declare module '@vue/runtime-core' {
|
||||||
HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default']
|
HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default']
|
||||||
IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default']
|
IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default']
|
||||||
'IconMdi:brushVariant': typeof import('~icons/mdi/brush-variant')['default']
|
'IconMdi:brushVariant': typeof import('~icons/mdi/brush-variant')['default']
|
||||||
'IconMdi:contentCopy': typeof import('~icons/mdi/content-copy')['default']
|
|
||||||
'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default']
|
'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default']
|
||||||
IconMdiArrowDown: typeof import('~icons/mdi/arrow-down')['default']
|
|
||||||
IconMdiArrowRightBottom: typeof import('~icons/mdi/arrow-right-bottom')['default']
|
|
||||||
IconMdiCamera: typeof import('~icons/mdi/camera')['default']
|
|
||||||
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
||||||
IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
|
IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
|
||||||
IconMdiClose: typeof import('~icons/mdi/close')['default']
|
IconMdiClose: typeof import('~icons/mdi/close')['default']
|
||||||
IconMdiContentCopy: typeof import('~icons/mdi/content-copy')['default']
|
IconMdiContentCopy: typeof import('~icons/mdi/content-copy')['default']
|
||||||
IconMdiDeleteOutline: typeof import('~icons/mdi/delete-outline')['default']
|
|
||||||
IconMdiDownload: typeof import('~icons/mdi/download')['default']
|
|
||||||
IconMdiEye: typeof import('~icons/mdi/eye')['default']
|
IconMdiEye: typeof import('~icons/mdi/eye')['default']
|
||||||
IconMdiEyeOff: typeof import('~icons/mdi/eye-off')['default']
|
IconMdiEyeOff: typeof import('~icons/mdi/eye-off')['default']
|
||||||
IconMdiHeart: typeof import('~icons/mdi/heart')['default']
|
IconMdiHeart: typeof import('~icons/mdi/heart')['default']
|
||||||
IconMdiPause: typeof import('~icons/mdi/pause')['default']
|
|
||||||
IconMdiPlay: typeof import('~icons/mdi/play')['default']
|
|
||||||
IconMdiRecord: typeof import('~icons/mdi/record')['default']
|
|
||||||
IconMdiRefresh: typeof import('~icons/mdi/refresh')['default']
|
|
||||||
IconMdiSearch: typeof import('~icons/mdi/search')['default']
|
IconMdiSearch: typeof import('~icons/mdi/search')['default']
|
||||||
IconMdiTranslate: typeof import('~icons/mdi/translate')['default']
|
IconMdiTranslate: typeof import('~icons/mdi/translate')['default']
|
||||||
IconMdiTriangleDown: typeof import('~icons/mdi/triangle-down')['default']
|
IconMdiTriangleDown: typeof import('~icons/mdi/triangle-down')['default']
|
||||||
IconMdiVideo: typeof import('~icons/mdi/video')['default']
|
|
||||||
InputCopyable: typeof import('./src/components/InputCopyable.vue')['default']
|
InputCopyable: typeof import('./src/components/InputCopyable.vue')['default']
|
||||||
IntegerBaseConverter: typeof import('./src/tools/integer-base-converter/integer-base-converter.vue')['default']
|
IntegerBaseConverter: typeof import('./src/tools/integer-base-converter/integer-base-converter.vue')['default']
|
||||||
Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default']
|
Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default']
|
||||||
|
@ -136,39 +126,21 @@ 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']
|
||||||
NAlert: typeof import('naive-ui')['NAlert']
|
|
||||||
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
|
||||||
NCode: typeof import('naive-ui')['NCode']
|
NCode: typeof import('naive-ui')['NCode']
|
||||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||||
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
|
||||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||||
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
|
||||||
NDivider: typeof import('naive-ui')['NDivider']
|
NDivider: typeof import('naive-ui')['NDivider']
|
||||||
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
|
|
||||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||||
NForm: typeof import('naive-ui')['NForm']
|
|
||||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||||
NGi: typeof import('naive-ui')['NGi']
|
|
||||||
NGrid: typeof import('naive-ui')['NGrid']
|
|
||||||
NH1: typeof import('naive-ui')['NH1']
|
NH1: typeof import('naive-ui')['NH1']
|
||||||
NH2: typeof import('naive-ui')['NH2']
|
|
||||||
NH3: typeof import('naive-ui')['NH3']
|
NH3: typeof import('naive-ui')['NH3']
|
||||||
NIcon: typeof import('naive-ui')['NIcon']
|
NIcon: typeof import('naive-ui')['NIcon']
|
||||||
NImage: typeof import('naive-ui')['NImage']
|
NInput: typeof import('naive-ui')['NInput']
|
||||||
NInputGroup: typeof import('naive-ui')['NInputGroup']
|
|
||||||
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
|
|
||||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
|
||||||
NLayout: typeof import('naive-ui')['NLayout']
|
NLayout: typeof import('naive-ui')['NLayout']
|
||||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||||
NMenu: typeof import('naive-ui')['NMenu']
|
NMenu: typeof import('naive-ui')['NMenu']
|
||||||
NProgress: typeof import('naive-ui')['NProgress']
|
|
||||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||||
NSlider: typeof import('naive-ui')['NSlider']
|
|
||||||
NStatistic: typeof import('naive-ui')['NStatistic']
|
|
||||||
NSwitch: typeof import('naive-ui')['NSwitch']
|
|
||||||
NTable: typeof import('naive-ui')['NTable']
|
|
||||||
NTag: typeof import('naive-ui')['NTag']
|
|
||||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||||
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
||||||
|
|
20
pnpm-lock.yaml
generated
20
pnpm-lock.yaml
generated
|
@ -3378,7 +3378,7 @@ packages:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@unhead/dom': 0.5.1
|
'@unhead/dom': 0.5.1
|
||||||
'@unhead/schema': 0.5.1
|
'@unhead/schema': 0.5.1
|
||||||
'@vueuse/shared': 10.7.2(vue@3.3.4)
|
'@vueuse/shared': 10.9.0(vue@3.3.4)
|
||||||
unhead: 0.5.1
|
unhead: 0.5.1
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
@ -4020,10 +4020,10 @@ packages:
|
||||||
- vue
|
- vue
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@vueuse/shared@10.7.2(vue@3.3.4):
|
/@vueuse/shared@10.9.0(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==}
|
resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
vue-demi: 0.14.6(vue@3.3.4)
|
vue-demi: 0.14.7(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@vue/composition-api'
|
- '@vue/composition-api'
|
||||||
- vue
|
- vue
|
||||||
|
@ -4679,8 +4679,8 @@ packages:
|
||||||
delayed-stream: 1.0.0
|
delayed-stream: 1.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/commander@10.0.0:
|
/commander@10.0.1:
|
||||||
resolution: {integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==}
|
resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
@ -4703,8 +4703,9 @@ packages:
|
||||||
|
|
||||||
/composerize-ts@0.6.2:
|
/composerize-ts@0.6.2:
|
||||||
resolution: {integrity: sha512-8tw5p/FBxg77ubjVftaXA+pknWbkUgbZ4rbZZs2yFUsj2yvO38IvtfpGLfaJ9mGFj324lFEr/OU9xULrKSF9Ag==}
|
resolution: {integrity: sha512-8tw5p/FBxg77ubjVftaXA+pknWbkUgbZ4rbZZs2yFUsj2yvO38IvtfpGLfaJ9mGFj324lFEr/OU9xULrKSF9Ag==}
|
||||||
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
commander: 10.0.0
|
commander: 10.0.1
|
||||||
deepmerge-ts: 5.1.0
|
deepmerge-ts: 5.1.0
|
||||||
flex-js: 1.0.5
|
flex-js: 1.0.5
|
||||||
ip-cidr: 3.1.0
|
ip-cidr: 3.1.0
|
||||||
|
@ -9752,8 +9753,8 @@ packages:
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/vue-demi@0.14.6(vue@3.3.4):
|
/vue-demi@0.14.7(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
|
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
@ -10196,6 +10197,7 @@ packages:
|
||||||
|
|
||||||
/yamljs@0.3.0:
|
/yamljs@0.3.0:
|
||||||
resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==}
|
resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==}
|
||||||
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
argparse: 1.0.10
|
argparse: 1.0.10
|
||||||
glob: 7.2.3
|
glob: 7.2.3
|
||||||
|
|
|
@ -37,27 +37,27 @@ async function generateCSR(config: {
|
||||||
const csr = pki.createCertificationRequest();
|
const csr = pki.createCertificationRequest();
|
||||||
csr.publicKey = publicKey;
|
csr.publicKey = publicKey;
|
||||||
csr.setSubject([{
|
csr.setSubject([{
|
||||||
name: 'CN',
|
name: 'commonName',
|
||||||
value: config.commonName,
|
value: config.commonName,
|
||||||
}, {
|
}, {
|
||||||
name: 'C',
|
name: 'countryName',
|
||||||
value: config.countryName,
|
value: config.countryName,
|
||||||
}, {
|
}, {
|
||||||
shortName: 'ST',
|
name: 'stateOrProvinceName',
|
||||||
value: config.state,
|
value: config.state,
|
||||||
}, {
|
}, {
|
||||||
name: 'L',
|
name: 'localityName',
|
||||||
value: config.city,
|
value: config.city,
|
||||||
}, {
|
}, {
|
||||||
name: 'O',
|
name: 'organizationName',
|
||||||
value: config.organizationName,
|
value: config.organizationName,
|
||||||
}, {
|
}, {
|
||||||
shortName: 'OU',
|
name: 'organizationalUnitName',
|
||||||
value: config.organizationalUnit,
|
value: config.organizationalUnit,
|
||||||
}, {
|
}, {
|
||||||
name: 'EMAIL',
|
name: 'emailAddress',
|
||||||
value: config.contactEmail,
|
value: config.contactEmail,
|
||||||
}]);
|
}].filter(attr => attr.value));
|
||||||
|
|
||||||
// sign certification request
|
// sign certification request
|
||||||
csr.sign(privateKey);
|
csr.sign(privateKey);
|
||||||
|
|
|
@ -1,20 +1,36 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { generateCSR } from './csr-generator.service';
|
||||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||||
import { withDefaultOnErrorAsync } from '@/utils/defaults';
|
import { withDefaultOnErrorAsync } from '@/utils/defaults';
|
||||||
import { computedRefreshableAsync } from '@/composable/computedRefreshable';
|
import { computedRefreshableAsync } from '@/composable/computedRefreshable';
|
||||||
import { generateCSR } from "./csr-generator.service.ts";
|
import { useValidation } from '@/composable/validation';
|
||||||
|
|
||||||
const commonName = ref('');
|
const commonName = ref('test.com');
|
||||||
const organizationName = ref('');
|
const commonNameValidation = useValidation({
|
||||||
const organizationUnit = ref('');
|
source: commonName,
|
||||||
const city = ref('');
|
rules: [
|
||||||
const state = ref('');
|
{
|
||||||
const country = ref('');
|
message: 'Common Name/Domain Name must not be empty',
|
||||||
|
validator: value => value?.trim() !== '',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
const organizationName = ref('Test');
|
||||||
|
const organizationalUnit = ref('');
|
||||||
|
const password = ref('');
|
||||||
|
const city = ref('Paris');
|
||||||
|
const state = ref('FR');
|
||||||
|
const country = ref('France');
|
||||||
const contactEmail = ref('');
|
const contactEmail = ref('');
|
||||||
const emptyCSR = { csrPem: '', privateKeyPem: '', publicKeyPem: '' };
|
const emptyCSR = { csrPem: '', privateKeyPem: '', publicKeyPem: '' };
|
||||||
|
|
||||||
const [certs, refreshCerts] = computedRefreshableAsync(
|
const [certs, refreshCerts] = computedRefreshableAsync(
|
||||||
() => withDefaultOnErrorAsync(() => {
|
() => withDefaultOnErrorAsync(() => {
|
||||||
|
if (!commonNameValidation.isValid) {
|
||||||
|
return emptyCSR;
|
||||||
|
}
|
||||||
|
|
||||||
return generateCSR({
|
return generateCSR({
|
||||||
password: password.value,
|
password: password.value,
|
||||||
commonName: commonName.value,
|
commonName: commonName.value,
|
||||||
|
@ -26,14 +42,103 @@ const [certs, refreshCerts] = computedRefreshableAsync(
|
||||||
contactEmail: contactEmail.value,
|
contactEmail: contactEmail.value,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
), emptyCSR),
|
|
||||||
emptyCSR,
|
emptyCSR,
|
||||||
);
|
), emptyCSR);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<n-form-item label="Private Key passphrase:" label-placement="left">
|
<div mb-2>
|
||||||
|
<n-form-item
|
||||||
|
label="Common Name/Domain Name:"
|
||||||
|
label-placement="top"
|
||||||
|
:feedback="commonNameValidation.message"
|
||||||
|
:validation-status="commonNameValidation.status"
|
||||||
|
>
|
||||||
|
<n-input
|
||||||
|
v-model:value="commonName"
|
||||||
|
placeholder="Common/Domain Name"
|
||||||
|
/>
|
||||||
|
</n-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<n-form-item
|
||||||
|
label="Organization Name:"
|
||||||
|
label-placement="left" label-width="100"
|
||||||
|
>
|
||||||
|
<n-input
|
||||||
|
v-model:value="organizationName"
|
||||||
|
placeholder="Organization Name"
|
||||||
|
/>
|
||||||
|
</n-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<n-form-item
|
||||||
|
label="Organization Unit:"
|
||||||
|
label-placement="left" label-width="100"
|
||||||
|
>
|
||||||
|
<n-input
|
||||||
|
v-model:value="organizationalUnit"
|
||||||
|
placeholder="Organization Unit"
|
||||||
|
/>
|
||||||
|
</n-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<n-form-item
|
||||||
|
label="State:"
|
||||||
|
label-placement="left" label-width="100"
|
||||||
|
>
|
||||||
|
<n-input
|
||||||
|
v-model:value="state"
|
||||||
|
placeholder="State"
|
||||||
|
/>
|
||||||
|
</n-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<n-form-item
|
||||||
|
label="City:"
|
||||||
|
label-placement="left" label-width="100"
|
||||||
|
>
|
||||||
|
<n-input
|
||||||
|
v-model:value="city"
|
||||||
|
placeholder="City"
|
||||||
|
/>
|
||||||
|
</n-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<n-form-item
|
||||||
|
label="Country:"
|
||||||
|
label-placement="left" label-width="100"
|
||||||
|
>
|
||||||
|
<n-input
|
||||||
|
v-model:value="country"
|
||||||
|
placeholder="Country"
|
||||||
|
/>
|
||||||
|
</n-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<n-form-item
|
||||||
|
label="Contact Email:"
|
||||||
|
label-placement="left" label-width="100"
|
||||||
|
>
|
||||||
|
<n-input
|
||||||
|
v-model:value="contactEmail"
|
||||||
|
placeholder="Contact Email"
|
||||||
|
/>
|
||||||
|
</n-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<n-form-item
|
||||||
|
label="Private Key passphrase:"
|
||||||
|
label-placement="top"
|
||||||
|
>
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="password"
|
v-model:value="password"
|
||||||
type="password"
|
type="password"
|
||||||
|
@ -43,75 +148,15 @@ const [certs, refreshCerts] = computedRefreshableAsync(
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div flex justify-center>
|
||||||
<n-form-item label="Common Name/Domain Name:" label-placement="left">
|
|
||||||
<n-input
|
|
||||||
v-model:value="commonName"
|
|
||||||
placeholder="Common/Domain Name"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<n-form-item label="Organization Name:" label-placement="left">
|
|
||||||
<n-input
|
|
||||||
v-model:value="organizationName"
|
|
||||||
placeholder="Organization Name"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<n-form-item label="Organization Unit:" label-placement="left">
|
|
||||||
<n-input
|
|
||||||
v-model:value="organizationalUnit"
|
|
||||||
placeholder="Organization Unit"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<n-form-item label="State:" label-placement="left">
|
|
||||||
<n-input
|
|
||||||
v-model:value="state"
|
|
||||||
placeholder="State"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<n-form-item label="City:" label-placement="left">
|
|
||||||
<n-input
|
|
||||||
v-model:value="city"
|
|
||||||
placeholder="City"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<n-form-item label="Country:" label-placement="left">
|
|
||||||
<n-input
|
|
||||||
v-model:value="country"
|
|
||||||
placeholder="Country"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<n-form-item label="Contact Email:" label-placement="left">
|
|
||||||
<n-input
|
|
||||||
v-model:value="contactEmail"
|
|
||||||
placeholder="Contact Email"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<c-button @click="refreshCerts">
|
<c-button @click="refreshCerts">
|
||||||
Refresh CSR
|
Refresh CSR
|
||||||
</c-button>
|
</c-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<n-divider />
|
||||||
|
|
||||||
|
<div v-if="commonNameValidation.isValid">
|
||||||
<div>
|
<div>
|
||||||
<h3>Certifacate Signing Request</h3>
|
<h3>Certifacate Signing Request</h3>
|
||||||
<TextareaCopyable :value="certs.csrPem" />
|
<TextareaCopyable :value="certs.csrPem" />
|
||||||
|
@ -119,7 +164,7 @@ const [certs, refreshCerts] = computedRefreshableAsync(
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h3>Public key</h3>
|
<h3>Public key</h3>
|
||||||
<TextareaCopyable :value="certs.publicKeyPem" word-wrap="true" />
|
<TextareaCopyable :value="certs.publicKeyPem" :word-wrap="true" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -127,4 +172,5 @@ const [certs, refreshCerts] = computedRefreshableAsync(
|
||||||
<TextareaCopyable :value="certs.privateKeyPem" />
|
<TextareaCopyable :value="certs.privateKeyPem" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,11 +2,11 @@ import { ArrowsShuffle } from '@vicons/tabler';
|
||||||
import { defineTool } from '../tool';
|
import { defineTool } from '../tool';
|
||||||
|
|
||||||
export const tool = defineTool({
|
export const tool = defineTool({
|
||||||
name: 'Csr generator',
|
name: 'CSR Generator',
|
||||||
path: '/csr-generator',
|
path: '/csr-generator',
|
||||||
description: '',
|
description: 'Certificate Signing Request generator (PEM format)',
|
||||||
keywords: ['csr', 'certificate', 'signing', 'request', 'x509', 'generator'],
|
keywords: ['csr', 'certificate', 'signing', 'request', 'x509', 'generator'],
|
||||||
component: () => import('./csr-generator.vue'),
|
component: () => import('./csr-generator.vue'),
|
||||||
icon: ArrowsShuffle,
|
icon: ArrowsShuffle,
|
||||||
createdAt: new Date('2024-02-22'),
|
createdAt: new Date('2024-02-25'),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue