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.

87 lines
1.9 KiB

  1. <template>
  2. <v-card>
  3. <v-card-title>
  4. Welcome to doccano!
  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. Continue
  39. </v-btn>
  40. <v-btn
  41. class="mt-5"
  42. text
  43. @click="prev"
  44. >
  45. 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. middleware: ['check-auth', 'auth'],
  56. data() {
  57. return {
  58. e6: 1,
  59. items: [
  60. { title: 'Import a dataset', videoId: 'dA4ID1DSxCE' },
  61. { title: 'Create labels for this project', videoId: '1bSML270quU' },
  62. { title: 'Add members for collaborative work', videoId: 'NI09dcBz-qA' },
  63. { title: 'Define a guideline for the work', videoId: 'AvvX3Xs32nA' },
  64. { title: 'Annotate the dataset', videoId: 'F3XoSdyiMhA' },
  65. { title: 'View statistics', videoId: 'kfRpa0mNQMY' },
  66. { title: 'Export the dataset', videoId: 'Pfy_QcHEeQ4' }
  67. ]
  68. }
  69. },
  70. methods: {
  71. next() {
  72. this.e6 = Math.max(1, (this.e6 + 1) % (this.items.length + 1))
  73. },
  74. prev() {
  75. this.e6 = Math.max(1, this.e6 - 1)
  76. }
  77. },
  78. validate({ params }) {
  79. return /^\d+$/.test(params.id)
  80. }
  81. }
  82. </script>