You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

checkpoints.vue 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <div class="wizard-project">
  3. <PageHeader>
  4. <h2 class="title">
  5. <span class="icon"><font-awesome-icon icon="sync-alt" /></span>
  6. <span>Updater</span>
  7. </h2>
  8. <h3 class="subtitle">
  9. {{ $checkpoints.name }}
  10. </h3>
  11. <template v-slot:right>
  12. <button class="button" @click="$dreampower.openAppFolder()">
  13. <span class="icon"><font-awesome-icon icon="folder-open" /></span>
  14. <span>{{ $dreampower.name }} Folder</span>
  15. </button>
  16. </template>
  17. </PageHeader>
  18. <div class="project__content">
  19. <div v-if="!requirements.power.checkpoints" class="notification notification--warning">
  20. This component is required to continue using {{ $dreamtime.name }}.
  21. </div>
  22. <div v-else class="notification">
  23. Installed version: <strong>{{ $checkpoints.version }}</strong>
  24. </div>
  25. <div v-if="updater.error" class="notification notification--danger">
  26. <h5>CONNECTION ERROR!</h5>
  27. <span>It is not possible to update this component because a problem has occurred when trying to get the information from Github, please make sure you have a stable internet connection and restart the application.</span>
  28. <br><br>
  29. <pre>
  30. <span v-if="updater.errorResponse">{{ updater.errorResponse }}</span>
  31. {{ updater.error.stack }}
  32. </pre>
  33. </div>
  34. <AppBox>
  35. <ProjectUpdate project="checkpoints" />
  36. </AppBox>
  37. <AppBox title="Settings.">
  38. <!-- Download protocol. -->
  39. <MenuItem
  40. label="Download protocol.">
  41. <template v-slot:description>
  42. <span class="item__description">Select the protocol that will be used to download the file. <AppTip tooltip="- <strong>Any</strong>: Use all protocols if necessary.<br>- <strong>HTTP</strong>: Download the file from verified servers. Fastest and most reliable for most connections.<br>- <strong>Torrent & IPFS</strong>: Download the file from other computers. It is possible to cancel the download and resume it later. More reliable for low speed connections. May require a few minutes of preparation before starting the download." /></span>
  43. </template>
  44. <select v-model="updater.downloadMethod" class="input">
  45. <option :value="0">
  46. Any
  47. </option>
  48. <option :value="1">
  49. HTTP
  50. </option>
  51. <option v-if="updater.hasTorrentUrls" :value="3">
  52. Torrent
  53. </option>
  54. <option v-if="updater.hasIPFSUrls" :value="2">
  55. IPFS
  56. </option>
  57. </select>
  58. </MenuItem>
  59. </AppBox>
  60. </div>
  61. </div>
  62. </template>
  63. <script>
  64. import { requirements } from '~/modules/system'
  65. import { checkpoints } from '~/modules/projects'
  66. export default {
  67. layout: 'wizard',
  68. middleware({ redirect, route }) {
  69. if (!route.query.forced) {
  70. if (requirements.power.checkpoints) {
  71. redirect('/wizard/waifu')
  72. }
  73. }
  74. },
  75. data: () => ({
  76. requirements,
  77. }),
  78. computed: {
  79. updater() {
  80. return checkpoints.updater
  81. },
  82. },
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. </style>