ExportButtons.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <script setup>
  2. import { UseColorMode } from '@vueuse/components'
  3. const router = useRouter()
  4. const emit = defineEmits(['export-twofauth-format', 'export-otpauth-format'])
  5. const $2fauth = inject('2fauth')
  6. </script>
  7. <template>
  8. <div class="block">
  9. <UseColorMode v-slot="{ mode }">
  10. <p class="has-text-weight-bold has-text-grey">
  11. {{ $t('twofaccounts.twofauth_export_format_sub') }}
  12. </p>
  13. </UseColorMode>
  14. <p class="is-size-7-mobile">
  15. {{ $t('twofaccounts.twofauth_export_format_desc') }}
  16. {{ $t('twofaccounts.twofauth_export_format_url') }}
  17. <a id="lnkExportSchemaUrl" class="is-link" tabindex="0" :href="$2fauth.urls.exportSchemaUrl" target="_blank">
  18. {{ $t('twofaccounts.twofauth_export_schema') }}
  19. </a>
  20. </p>
  21. <button id="btnExport2FAuth" class="button is-link is-rounded is-focus my-3" @click="$emit('export-twofauth-format')" :title="$t('twofaccounts.export_selected_to_json')">
  22. {{ $t('twofaccounts.twofauth_export_format') }}
  23. </button>
  24. </div>
  25. <div class="block">
  26. <p class="has-text-weight-bold has-text-grey">
  27. {{ $t('twofaccounts.otpauth_export_format_sub') }}
  28. </p>
  29. <p class="is-size-7-mobile">
  30. {{ $t('twofaccounts.otpauth_export_format_desc') }}
  31. </p>
  32. <button id="btnExportOtpauth" class="button is-link is-rounded is-focus my-3" @click="$emit('export-otpauth-format')" :title="$t('twofaccounts.export_selected_to_otpauth_uri')">
  33. {{ $t('twofaccounts.otpauth_export_format') }}
  34. </button>
  35. </div>
  36. </template>