useSetTitle.ts 405 B

123456789101112131415161718
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { ref } from 'vue'
  3. import useMetaTitle from '#shared/composables/useMetaTitle.ts'
  4. export const useSetTitle = () => {
  5. const { setViewTitle } = useMetaTitle()
  6. const title = ref('')
  7. const setTitle = (newTitle: string) => {
  8. title.value = newTitle
  9. setViewTitle(newTitle)
  10. }
  11. return { title, setTitle }
  12. }