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.

111 lines
4.0 KiB

  1. <template>
  2. <div class="p-d-flex p-flex-row p-jc-between p-ai-stretch">
  3. <Toast />
  4. <Card
  5. class="p-mr-2 p-as-stretch file-card"
  6. >
  7. <template #header>
  8. <Toolbar>
  9. <template #left>
  10. <h3>File preview</h3>
  11. </template>
  12. </Toolbar>
  13. </template>
  14. <template #content>
  15. <template v-if="fileContent === ''">
  16. <Skeleton /><br />
  17. <Skeleton /><br />
  18. <Skeleton /><br />
  19. <Skeleton /><br />
  20. <Skeleton /><br />
  21. <Skeleton /><br />
  22. <Skeleton /><br />
  23. </template>
  24. <template v-else>
  25. <vue-markdown :source="fileContent" />
  26. </template>
  27. </template>
  28. </Card>
  29. <Card class="p-mr-2 p-as-stretch filters-card">
  30. <template #header>
  31. <Toolbar>
  32. <template #left>
  33. <h3>Document searchers</h3>
  34. </template>
  35. <template #right>
  36. <Button
  37. icon="pi pi-plus"
  38. class="p-button-success p-button-sm p-button-text"
  39. @click="toggleSearchersMenu"
  40. aria:haspopup="true"
  41. aria-controls="overlay_panel" />
  42. </template>
  43. </Toolbar>
  44. </template>
  45. <template #content>
  46. <DataTable
  47. :value.sync="selectedSearchers"
  48. dataKey="id"
  49. :expandedRows.sync="expandedRows"
  50. @row-reorder="onSelectedSearchersReorder"
  51. @row-expand="onSelectedSearcherExpand"
  52. @row-collapse="onSelectedSearcherCollapse">
  53. <Column :rowReorder="true" headerStyle="width: 3rem" />
  54. <Column field="name" header="Name" sortable></Column>
  55. <Column :expander="true" headerStyle="width: 3rem" />
  56. <template #expansion="slotProps">
  57. <div class="options-subtable">
  58. <!-- TODO: Add real options here -->
  59. <h5>Options for {{slotProps.data.name}}</h5>
  60. <!-- <ProgressSpinner /> -->
  61. <div class="p-fluid">
  62. <div class="p-field">
  63. <label for="firstname">Option 1</label>
  64. <InputText id="firstname" type="text" class="p-inputtext-sm" />
  65. </div>
  66. <div class="p-field">
  67. <label for="lastname">Option 2</label>
  68. <InputText id="lastname" type="text" class="p-inputtext-sm" />
  69. </div>
  70. </div>
  71. </div>
  72. </template>
  73. </DataTable>
  74. </template>
  75. </Card>
  76. <OverlayPanel
  77. ref="searchers-overlay"
  78. appendTo="body"
  79. id="overlay_panel"
  80. style="width: 300px">
  81. <DataTable
  82. :value.sync="searchersData"
  83. :selection.sync="selectedSearchers"
  84. dataKey="id"
  85. selectionMode="multiple"
  86. class="p-datatable-sm"
  87. :metaKeySelection="false">
  88. <Column selectionMode="multiple" headerStyle="width: 3em"></Column>
  89. <Column field="name" header="Name" sortable></Column>
  90. </DataTable>
  91. </OverlayPanel>
  92. </div>
  93. </template>
  94. <script lang="ts" src="./ProcessFile.ts"></script>
  95. <style lang="scss" src="./ProcessFile.scss"></style>