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.

85 lines
2.0 KiB

4 years ago
4 years ago
3 years ago
  1. <template>
  2. <v-card>
  3. <v-card-title>
  4. {{ $t('projectHome.welcome') }}
  5. </v-card-title>
  6. <v-stepper
  7. v-model="e6"
  8. vertical
  9. non-linear
  10. >
  11. <div
  12. v-for="(item, index) in items"
  13. :key="index"
  14. >
  15. <v-stepper-step
  16. :complete="e6 > index + 1"
  17. :step="index + 1"
  18. editable
  19. >
  20. {{ item.title }}
  21. </v-stepper-step>
  22. <v-stepper-content :step="index + 1">
  23. <v-card
  24. v-if="e6 === index + 1"
  25. class="mb-12"
  26. width="560"
  27. height="315"
  28. >
  29. <youtube
  30. ref="youtube"
  31. :video-id="item.videoId"
  32. />
  33. </v-card>
  34. <v-btn
  35. color="primary mt-5"
  36. @click="next"
  37. >
  38. {{ $t('generic.continue') }}
  39. </v-btn>
  40. <v-btn
  41. class="mt-5"
  42. text
  43. @click="prev"
  44. >
  45. {{ $t('generic.cancel') }}
  46. </v-btn>
  47. </v-stepper-content>
  48. </div>
  49. </v-stepper>
  50. </v-card>
  51. </template>
  52. <script>
  53. export default {
  54. layout: 'project',
  55. validate({ params }) {
  56. return /^\d+$/.test(params.id)
  57. },
  58. data() {
  59. return {
  60. e6: 1,
  61. items: [
  62. { title: this.$t('projectHome.importData'), videoId: 'dA4ID1DSxCE' },
  63. { title: this.$t('projectHome.createLabels'), videoId: '1bSML270quU' },
  64. { title: this.$t('projectHome.addMembers'), videoId: 'NI09dcBz-qA' },
  65. { title: this.$t('projectHome.defineGuideline'), videoId: 'AvvX3Xs32nA' },
  66. { title: this.$t('projectHome.annotateDataset'), videoId: 'F3XoSdyiMhA' },
  67. { title: this.$t('projectHome.viewStatistics'), videoId: 'kfRpa0mNQMY' },
  68. { title: this.$t('projectHome.exportDataset'), videoId: 'Pfy_QcHEeQ4' }
  69. ]
  70. }
  71. },
  72. methods: {
  73. next() {
  74. this.e6 = Math.max(1, (this.e6 + 1) % (this.items.length + 1))
  75. },
  76. prev() {
  77. this.e6 = Math.max(1, this.e6 - 1)
  78. }
  79. }
  80. }
  81. </script>