| 1 | import { onBeforeMount, onBeforeUnmount } from "vue" |
| 2 | import { useThemeStore } from "@/stores/theme" |
| 3 | |
| 4 | // :has() CSS relational pseudo-class not yet supported by Firefox |
| 5 | // (https://caniuse.com/css-has) |
| 6 | // at the moment this worker around permit to hide Layout Footer |
| 7 | |
| 8 | export function useHideLayoutFooter() { |
| 9 | const themeStore = useThemeStore() |
| 10 | |
| 11 | if (themeStore.isFooterShown) { |
| 12 | onBeforeMount(() => { |
| 13 | themeStore.setFooterShow(false) |
| 14 | }) |
| 15 | onBeforeUnmount(() => { |
| 16 | themeStore.setFooterShow(true) |
| 17 | }) |
| 18 | } |
| 19 | } |