mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-29 03:33:17 +01:00
21 lines
608 B
Vue
21 lines
608 B
Vue
|
<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>
|
||
|
<button :aria-label="$t('commons.copy_to_clipboard')" class="button is-like-text is-pulled-right is-small is-text" @click.stop="copyToClipboard()">
|
||
|
<FontAwesomeIcon :icon="['fas', 'copy']" />
|
||
|
</button>
|
||
|
</template>
|