DNSCredential.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <script setup lang="tsx">
  2. import {useGettext} from 'vue3-gettext'
  3. import {datetime} from '@/components/StdDataDisplay/StdTableTransformer'
  4. import dns_credential from '@/api/dns_credential'
  5. import StdCurd from '@/components/StdDataDisplay/StdCurd.vue'
  6. import DNSChallenge from './DNSChallenge.vue'
  7. import {input} from '@/components/StdDataEntry'
  8. const {$gettext, interpolate} = useGettext()
  9. const columns = [{
  10. title: () => $gettext('Name'),
  11. dataIndex: 'name',
  12. sorter: true,
  13. pithy: true,
  14. edit: {
  15. type: input
  16. }
  17. }, {
  18. title: () => $gettext('Provider'),
  19. dataIndex: ['config', 'name'],
  20. sorter: true,
  21. pithy: true
  22. }, {
  23. title: () => $gettext('Updated at'),
  24. dataIndex: 'updated_at',
  25. customRender: datetime,
  26. sorter: true,
  27. pithy: true
  28. }, {
  29. title: () => $gettext('Action'),
  30. dataIndex: 'action'
  31. }]
  32. </script>
  33. <template>
  34. <std-curd :title="$gettext('DNS Credentials')" :api="dns_credential" :columns="columns"
  35. row-key="name"
  36. >
  37. <template #beforeEdit>
  38. <a-alert type="info" show-icon :message="$gettext('Note')">
  39. <template #description>
  40. <p v-translate>
  41. Please fill in the API authentication credentials provided by your DNS provider.
  42. We will add one or more TXT records to the DNS records of your domain for ownership
  43. verification.
  44. Once the verification is complete, the records will be removed.
  45. Please note that the time configurations below are all in seconds.
  46. </p>
  47. </template>
  48. </a-alert>
  49. </template>
  50. <template #edit="{data}">
  51. <d-n-s-challenge/>
  52. </template>
  53. </std-curd>
  54. </template>
  55. <style lang="less" scoped>
  56. </style>