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.

50 lines
1.5 KiB

  1. div.columns(v-cloak="")
  2. div.column.is-12
  3. messages(v-bind:messages="messages")
  4. div.card
  5. header.card-header
  6. p.card-header-title File Uploader
  7. div.card-content
  8. h2.subtitle Upload a file to annotate text.
  9. div.control(style="margin-bottom: 1em;")
  10. block select-format-area
  11. block example-format-area
  12. div.field.is-grouped(style="margin-top: 1em;")
  13. div.control
  14. div.file.has-name.is-primary
  15. label.file-label
  16. input.file-input(
  17. v-on:change="upload()"
  18. type="file"
  19. ref="file"
  20. name="file"
  21. required
  22. )
  23. span.file-cta.button(v-bind:class="{'is-loading': isLoading}")
  24. span.file-icon
  25. i.fas.fa-upload
  26. span.file-label Select a file…
  27. span.file-name {{ file.name }}
  28. div.control(v-if="canUploadFromCloud")
  29. button.button(
  30. v-on:click="isCloudUploadActive = !isCloudUploadActive"
  31. v-bind:class="{'is-loading': isLoading}"
  32. )
  33. span.file-icon
  34. i.fa.fa-cloud-upload-alt
  35. span Browse cloud…
  36. div(v-if="isCloudUploadActive")
  37. iframe(
  38. ref="cloudUploadPane"
  39. v-bind:src="cloudUploadUrl"
  40. v-on:load="cloudUpload"
  41. style="width: 100%; height: 20em;"
  42. )