logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

data_import_export_tab.vue (4059B)


  1. <template>
  2. <div
  3. :label="$t('settings.data_import_export_tab')"
  4. >
  5. <div class="setting-item">
  6. <h2>{{ $t('settings.follow_import') }}</h2>
  7. <p>{{ $t('settings.import_followers_from_a_csv_file') }}</p>
  8. <Importer
  9. :submit-handler="importFollows"
  10. :success-message="$t('settings.follows_imported')"
  11. :error-message="$t('settings.follow_import_error')"
  12. />
  13. </div>
  14. <div class="setting-item">
  15. <h2>{{ $t('settings.follow_export') }}</h2>
  16. <Exporter
  17. :get-content="getFollowsContent"
  18. filename="friends.csv"
  19. :export-button-label="$t('settings.follow_export_button')"
  20. />
  21. </div>
  22. <div class="setting-item">
  23. <h2>{{ $t('settings.block_import') }}</h2>
  24. <p>{{ $t('settings.import_blocks_from_a_csv_file') }}</p>
  25. <Importer
  26. :submit-handler="importBlocks"
  27. :success-message="$t('settings.blocks_imported')"
  28. :error-message="$t('settings.block_import_error')"
  29. />
  30. </div>
  31. <div class="setting-item">
  32. <h2>{{ $t('settings.block_export') }}</h2>
  33. <Exporter
  34. :get-content="getBlocksContent"
  35. filename="blocks.csv"
  36. :export-button-label="$t('settings.block_export_button')"
  37. />
  38. </div>
  39. <div class="setting-item">
  40. <h2>{{ $t('settings.mute_import') }}</h2>
  41. <p>{{ $t('settings.import_mutes_from_a_csv_file') }}</p>
  42. <Importer
  43. :submit-handler="importMutes"
  44. :success-message="$t('settings.mutes_imported')"
  45. :error-message="$t('settings.mute_import_error')"
  46. />
  47. </div>
  48. <div class="setting-item">
  49. <h2>{{ $t('settings.mute_export') }}</h2>
  50. <Exporter
  51. :get-content="getMutesContent"
  52. filename="mutes.csv"
  53. :export-button-label="$t('settings.mute_export_button')"
  54. />
  55. </div>
  56. <div class="setting-item">
  57. <h2>{{ $t('settings.account_backup') }}</h2>
  58. <p>{{ $t('settings.account_backup_description') }}</p>
  59. <table>
  60. <thead>
  61. <tr>
  62. <th>{{ $t('settings.account_backup_table_head') }}</th>
  63. <th />
  64. </tr>
  65. </thead>
  66. <tbody>
  67. <tr
  68. v-for="backup in backups"
  69. :key="backup.id"
  70. >
  71. <td>{{ backup.inserted_at }}</td>
  72. <td class="actions">
  73. <a
  74. v-if="backup.processed"
  75. target="_blank"
  76. :href="backup.url"
  77. >
  78. {{ $t('settings.download_backup') }}
  79. </a>
  80. <span
  81. v-else-if="backup.state === 'running'"
  82. >
  83. {{ $tc('settings.backup_running', backup.processed_number, { number: backup.processed_number }) }}
  84. </span>
  85. <span
  86. v-else-if="backup.state === 'failed'"
  87. >
  88. {{ $t('settings.backup_failed') }}
  89. </span>
  90. <span
  91. v-else
  92. >
  93. {{ $t('settings.backup_not_ready') }}
  94. </span>
  95. </td>
  96. </tr>
  97. </tbody>
  98. </table>
  99. <div
  100. v-if="listBackupsError"
  101. class="alert error"
  102. >
  103. {{ $t('settings.list_backups_error', { error }) }}
  104. <button
  105. :title="$t('settings.hide_list_backups_error_action')"
  106. @click="listBackupsError = false"
  107. >
  108. <FAIcon
  109. class="fa-scale-110 fa-old-padding"
  110. icon="times"
  111. />
  112. </button>
  113. </div>
  114. <button
  115. class="btn button-default"
  116. @click="addBackup"
  117. >
  118. {{ $t('settings.add_backup') }}
  119. </button>
  120. <p v-if="addedBackup">
  121. {{ $t('settings.added_backup') }}
  122. </p>
  123. <template v-if="addBackupError !== false">
  124. <p>{{ $t('settings.add_backup_error', { error: addBackupError }) }}</p>
  125. </template>
  126. </div>
  127. </div>
  128. </template>
  129. <script src="./data_import_export_tab.js"></script>
  130. <!-- <style lang="scss" src="./profile.scss"></style> -->