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.

60 lines
1.7 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. label.radio
  11. input(
  12. v-model="format"
  13. v-bind:checked="format == 'plain'"
  14. type="radio"
  15. name="format"
  16. value="plain"
  17. )
  18. | Plain
  19. block select-format-area
  20. block example-format-area
  21. div.field.is-grouped(style="margin-top: 1em;")
  22. div.control
  23. div.file.has-name.is-primary
  24. label.file-label
  25. input.file-input(
  26. v-on:change="upload()"
  27. type="file"
  28. ref="file"
  29. name="file"
  30. required
  31. )
  32. span.file-cta.button(v-bind:class="{'is-loading': isLoading}")
  33. span.file-icon
  34. i.fas.fa-upload
  35. span.file-label Select a file…
  36. span.file-name {{ file.name }}
  37. div.control(v-if="canUploadFromCloud")
  38. button.button(
  39. v-on:click="isCloudUploadActive = !isCloudUploadActive"
  40. v-bind:class="{'is-loading': isLoading}"
  41. )
  42. span.file-icon
  43. i.fa.fa-cloud-upload-alt
  44. span Browse cloud…
  45. div(v-if="isCloudUploadActive")
  46. iframe(
  47. ref="cloudUploadPane"
  48. v-bind:src="cloudUploadUrl"
  49. v-on:load="cloudUpload"
  50. style="width: 100%; height: 20em;"
  51. )