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
  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. data() {
  56. return {
  57. e6: 1,
  58. items: [
  59. { title: this.$t('projectHome.importData'), videoId: 'dA4ID1DSxCE' },
  60. { title: this.$t('projectHome.createLabels'), videoId: '1bSML270quU' },
  61. { title: this.$t('projectHome.addMembers'), videoId: 'NI09dcBz-qA' },
  62. { title: this.$t('projectHome.defineGuideline'), videoId: 'AvvX3Xs32nA' },
  63. { title: this.$t('projectHome.annotateDataset'), videoId: 'F3XoSdyiMhA' },
  64. { title: this.$t('projectHome.viewStatistics'), videoId: 'kfRpa0mNQMY' },
  65. { title: this.$t('projectHome.exportDataset'), videoId: 'Pfy_QcHEeQ4' }
  66. ]
  67. }
  68. },
  69. methods: {
  70. next() {
  71. this.e6 = Math.max(1, (this.e6 + 1) % (this.items.length + 1))
  72. },
  73. prev() {
  74. this.e6 = Math.max(1, this.e6 - 1)
  75. }
  76. },
  77. validate({ params }) {
  78. return /^\d+$/.test(params.id)
  79. }
  80. }
  81. </script>