mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-09 05:54:34 +02:00
Move locales to single json files & Replace laravel-vue-i18n with vue-i18n
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
<script setup>
|
||||
const { copy } = useClipboard({ legacy: true })
|
||||
import { useNotifyStore } from '@/stores/notify'
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
const notify = useNotifyStore()
|
||||
|
||||
const props = defineProps({
|
||||
@ -38,26 +40,26 @@
|
||||
*/
|
||||
function copyToClipboard(data) {
|
||||
copy(data)
|
||||
notify.success({ text: trans('commons.copied_to_clipboard') })
|
||||
notify.success({ text: t('message.copied_to_clipboard') })
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="too-bad"></div>
|
||||
<div class="block">
|
||||
{{ $t('errors.data_of_qrcode_is_not_valid_URI') }}
|
||||
{{ $t('error.data_of_qrcode_is_not_valid_URI') }}
|
||||
</div>
|
||||
<div class="block mb-6 light-or-darker">{{ qrContent ? qrContent : '[' + trans('commons.nothing') + ']' }}</div>
|
||||
<div class="block mb-6 light-or-darker">{{ qrContent ? qrContent : '[' + $t('message.nothing') + ']' }}</div>
|
||||
<!-- Copy to clipboard -->
|
||||
<div class="block has-text-link" v-if="qrContent">
|
||||
<button type="button" class="button is-link is-outlined is-rounded" @click.stop="copyToClipboard(qrContent)">
|
||||
{{ $t('commons.copy_to_clipboard') }}
|
||||
{{ $t('message.copy_to_clipboard') }}
|
||||
</button>
|
||||
</div>
|
||||
<!-- Open in browser -->
|
||||
<div class="block has-text-link" v-if="isUrl(qrContent)" @click="openInBrowser(qrContent)">
|
||||
<button type="button" class="button is-link is-outlined is-rounded">
|
||||
<span>{{ $t('commons.open_in_browser') }}</span>
|
||||
<span>{{ $t('message.open_in_browser') }}</span>
|
||||
<span class="icon is-small">
|
||||
<FontAwesomeIcon :icon="['fas', 'external-link-alt']" />
|
||||
</span>
|
||||
|
Reference in New Issue
Block a user