Repo for the search and displace core module including the interface to select files and search and displace operations to run on them. https://searchanddisplace.com
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.

61 lines
2.1 KiB

3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="wrap">
  3. <template v-if=" ! error">
  4. <template v-if=" ! fileUploaded">
  5. <template v-if=" ! uploading">
  6. <Panel header="Please upload a file">
  7. <FileUpload
  8. name="demo[]"
  9. :showUploadButton="false"
  10. :showCancelButton="false"
  11. chooseLabel="Choose file"
  12. :customUpload="true"
  13. :auto="true"
  14. @uploader="uploadFile"
  15. >
  16. <template #empty>
  17. <p>Drag and drop files to here to upload.</p>
  18. </template>
  19. </FileUpload>
  20. </Panel>
  21. <BlockUI :blocked="uiBlocked" :fullScreen="true"></BlockUI>
  22. </template>
  23. <template v-else>
  24. <Skeleton /><br />
  25. <Skeleton /><br />
  26. <Skeleton /><br />
  27. <Skeleton /><br />
  28. <Skeleton /><br />
  29. <Skeleton /><br />
  30. <Skeleton /><br />
  31. </template>
  32. </template>
  33. <template v-else>
  34. <process-file :file="uploadResult"
  35. :document="document"
  36. :searchers="availableSearchers"
  37. @newFile="uploadNewFile"
  38. @newSearcher="onNewSearcher"
  39. @error="onError">
  40. </process-file>
  41. </template>
  42. </template>
  43. <template v-else>
  44. <h1> Something went wrong while processing. </h1>
  45. <p> {{ error }} </p>
  46. <a href="/">
  47. <button type="button" class="p-button p-button-primary">
  48. Try another file
  49. </button>
  50. </a>
  51. </template>
  52. </div>
  53. </template>
  54. <script lang="ts" src="./Home.ts"></script>