mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-24 23:00:19 +03:00
Parse Certificate and Keys (Public, Private, Signature, Fingerprint...) and displays infos Fix #671
34 lines
884 B
Vue
34 lines
884 B
Vue
<script setup lang="ts">
|
|
import { useVModel } from '@vueuse/core';
|
|
import { useCopy } from '@/composable/copy';
|
|
|
|
const props = defineProps<{
|
|
value: string
|
|
multiline?: boolean
|
|
rows?: number | string
|
|
autosize?: boolean
|
|
}>();
|
|
const emit = defineEmits(['update:value']);
|
|
|
|
const value = useVModel(props, 'value', emit);
|
|
const { copy, isJustCopied } = useCopy({ source: value, createToast: false });
|
|
const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : 'Copy to clipboard');
|
|
</script>
|
|
|
|
<template>
|
|
<c-input-text
|
|
v-model:value="value"
|
|
:multiline="multiline"
|
|
:rows="rows"
|
|
:autosize="autosize"
|
|
>
|
|
<template #suffix>
|
|
<c-tooltip :tooltip="tooltipText">
|
|
<c-button circle variant="text" size="small" @click="copy()">
|
|
<icon-mdi-content-copy />
|
|
</c-button>
|
|
</c-tooltip>
|
|
</template>
|
|
</c-input-text>
|
|
</template>
|