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.

56 lines
1.8 KiB

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. :searchers="searchers"
  33. @newFile="uploadNewFile"
  34. @error="onError">
  35. </process-file>
  36. </template>
  37. </template>
  38. <template v-else>
  39. <h1> Something went wrong while processing. </h1>
  40. <p> {{ error }} </p>
  41. <a href="/">
  42. <button type="button" class="p-button p-button-primary">
  43. Try another file
  44. </button>
  45. </a>
  46. </template>
  47. </div>
  48. </template>
  49. <script lang="ts" src="./Home.ts"></script>