LeftSidebarHeader.vue 967 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!-- Copyright (C) 2012-2025 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import OnlineNotification from '#desktop/components/layout/LayoutSidebar/LeftSidebar/LeftSidebarHeader/OnlineNotification.vue'
  4. import QuickSearchInput from '#desktop/components/QuickSearch/QuickSearchInput/QuickSearchInput.vue'
  5. interface Props {
  6. collapsed?: boolean
  7. }
  8. const searchValue = defineModel<string>('search', {
  9. required: true,
  10. })
  11. const isSearchActive = defineModel<boolean>('search-active', {
  12. default: false,
  13. })
  14. defineProps<Props>()
  15. </script>
  16. <template>
  17. <header
  18. class="flex gap-2 rounded-t-lg"
  19. :class="{ 'justify-center': collapsed }"
  20. >
  21. <QuickSearchInput
  22. v-if="!collapsed"
  23. v-model="searchValue"
  24. v-model:search-active="isSearchActive"
  25. class="grow"
  26. />
  27. <OnlineNotification
  28. v-show="!isSearchActive"
  29. :class="{ 'ltr:ml-auto rtl:mr-auto': !collapsed }"
  30. />
  31. </header>
  32. </template>