2024-01-19 17:06:16 +01:00
|
|
|
<script setup>
|
|
|
|
import { useNotifyStore } from '@/stores/notify'
|
|
|
|
|
|
|
|
const notify = useNotifyStore()
|
|
|
|
const { copy } = useClipboard({ legacy: true })
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
token: String,
|
|
|
|
})
|
|
|
|
|
|
|
|
function copyToClipboard() {
|
|
|
|
copy(props.token)
|
|
|
|
notify.success({ text: trans('commons.copied_to_clipboard') })
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2024-02-26 08:37:30 +01:00
|
|
|
<button :aria-label="$t('commons.copy_to_clipboard')" :title="$t('commons.copy_to_clipboard')" class="button is-like-text is-pulled-right is-small is-text" @click.stop="copyToClipboard()">
|
2024-01-19 17:06:16 +01:00
|
|
|
<FontAwesomeIcon :icon="['fas', 'copy']" />
|
|
|
|
</button>
|
|
|
|
</template>
|