fix kashkool

This commit is contained in:
2026-06-29 22:43:28 +03:30
parent be17631109
commit 8b855e5ee4
150 changed files with 11974 additions and 4445 deletions
+26
View File
@@ -0,0 +1,26 @@
import { useMediaQuery } from '@vueuse/core'
import { onUnmounted, watch } from 'vue'
import { DESKTOP_LAYOUT_MIN_WIDTH } from '../constants'
const DESKTOP_LAYOUT_CLASS = 'app-layout--desktop'
export function useDesktopBreakpoint() {
return useMediaQuery(`(min-width: ${DESKTOP_LAYOUT_MIN_WIDTH}px)`)
}
export function useApplyDesktopLayoutClass() {
const isDesktopLayout = useDesktopBreakpoint()
const stop = watch(
isDesktopLayout,
(desktop) => {
document.documentElement.classList.toggle(DESKTOP_LAYOUT_CLASS, desktop)
},
{ immediate: true }
)
onUnmounted(() => {
stop()
document.documentElement.classList.remove(DESKTOP_LAYOUT_CLASS)
})
}