This commit is contained in:
steffenrapp 2024-09-05 17:26:23 +00:00
parent ab7b3a6588
commit 3eefdacf9c

View file

@ -22,7 +22,7 @@ const props = withDefaults(
followHeightOf: null, followHeightOf: null,
language: 'txt', language: 'txt',
copyPlacement: 'top-right', copyPlacement: 'top-right',
copyMessage: t('copyClipboard.tooltip'), copyMessage: 'Copy to clipboard',
}, },
); );
hljs.registerLanguage('sql', sqlHljs); hljs.registerLanguage('sql', sqlHljs);
@ -37,7 +37,7 @@ const { value, language, followHeightOf, copyPlacement, copyMessage } = toRefs(p
const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) }; const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) };
const { copy, isJustCopied } = useCopy({ source: value, createToast: false }); const { copy, isJustCopied } = useCopy({ source: value, createToast: false });
const tooltipText = computed(() => isJustCopied.value ? t('copyClipboard.success') : copyMessage.value); const tooltipText = computed(() => isJustCopied.value ? $t('copyClipboard.success') : copyMessage.value);
</script> </script>
<template> <template>