useForceDesktop.ts 449 B

12345678910111213141516171819202122
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { useLocalStorage } from '@vueuse/core'
  3. export const useForceDesktop = () => {
  4. const forceDesktopLocalStorage = useLocalStorage<boolean>(
  5. 'forceDesktopApp',
  6. false,
  7. {
  8. writeDefaults: false,
  9. },
  10. )
  11. const forceDesktop = () => {
  12. forceDesktopLocalStorage.value = true
  13. }
  14. return {
  15. forceDesktopLocalStorage,
  16. forceDesktop,
  17. }
  18. }