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.

58 lines
1.9 KiB

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. :customUpload="true"
  10. :auto="true"
  11. @uploader="uploadFile"
  12. >
  13. <template #empty>
  14. <p>Drag and drop files to here to upload.</p>
  15. </template>
  16. </FileUpload>
  17. </Panel>
  18. <BlockUI :blocked="uiBlocked" :fullScreen="true"></BlockUI>
  19. </template>
  20. <template v-else>
  21. <Skeleton /><br />
  22. <Skeleton /><br />
  23. <Skeleton /><br />
  24. <Skeleton /><br />
  25. <Skeleton /><br />
  26. <Skeleton /><br />
  27. <Skeleton /><br />
  28. </template>
  29. </template>
  30. <template v-else>
  31. <process-file :file="uploadResult"
  32. :document="document"
  33. :searchers="availableSearchers"
  34. @newFile="uploadNewFile"
  35. @newSearcher="onNewSearcher"
  36. @error="onError">
  37. </process-file>
  38. </template>
  39. </template>
  40. <template v-else>
  41. <h1> Something went wrong while processing. </h1>
  42. <p> {{ error }} </p>
  43. <a href="/">
  44. <button type="button" class="p-button p-button-primary">
  45. Try another file
  46. </button>
  47. </a>
  48. </template>
  49. </div>
  50. </template>
  51. <script lang="ts" src="./Home.ts"></script>