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.

45 lines
1.1 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="header">
  3. <!-- Left side of header -->
  4. <div class="left">
  5. <Button
  6. @click="onRouteChange('/')"
  7. class="p-button-primary"
  8. label="Search and Displace" />
  9. </div>
  10. <!-- Right side of header -->
  11. <div class="right">
  12. <Button
  13. @click="onRouteChange('/regex/create')"
  14. class="p-button-primary fc-button"
  15. label="Add regex" />
  16. <Button
  17. @click="onRouteChange('/searchers')"
  18. class="p-button-primary fc-button"
  19. label="Searchers" />
  20. </div>
  21. <ConfirmDialog :blockScroll="false"></ConfirmDialog>
  22. </div>
  23. </template>
  24. <script lang="ts">
  25. import { eventBus } from '@/app';
  26. import Vue from 'vue';
  27. import Component from 'vue-class-component';
  28. @Component
  29. export default class AppHeader extends Vue {
  30. /**
  31. * Called when we want to change the route
  32. *
  33. * @param {string} url The url to the new route
  34. */
  35. onRouteChange(url: string) {
  36. eventBus.$emit('changeRoute', url);
  37. }
  38. }
  39. </script>