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.

70 lines
1.9 KiB

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