File tree Expand file tree Collapse file tree 3 files changed +14
-12
lines changed Expand file tree Collapse file tree 3 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 33 * SPDX-License-Identifier: AGPL-3.0-or-later
44 */
55
6- export * from './useIsFullscreen/index.js'
7- export * from './useIsMobile/index.js'
86export * from './useFormatDateTime.ts'
97export * from './useHotKey/index.js'
108export * from './useIsDarkTheme/index.ts'
9+ export * from './useIsFullscreen/index.ts'
10+ export * from './useIsMobile/index.js'
Original file line number Diff line number Diff line change 22 * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
33 * SPDX-License-Identifier: AGPL-3.0-or-later
44 */
5-
5+ import type { DeepReadonly , Ref } from 'vue'
66import { readonly , ref } from 'vue'
77
8- // if the window height is equal to the screen height,
9- // we're in full screen mode
10- const checkIfIsFullscreen = ( ) => window . outerHeight === screen . height
11-
128const isFullscreen = ref ( checkIfIsFullscreen ( ) )
139
1410window . addEventListener ( 'resize' , ( ) => {
1511 isFullscreen . value = checkIfIsFullscreen ( )
1612} )
1713
1814/**
19- * Use global isFullscreen state, based on the screen height check
20- *
21- * @return {import('vue').DeepReadonly<import('vue').Ref<boolean>> }
15+ * If the window height is equal to the screen height,
16+ * we are in full screen mode.
17+ */
18+ function checkIfIsFullscreen ( ) : boolean {
19+ return window . outerHeight === window . screen . height
20+ }
21+
22+ /**
23+ * Use global `isFullscreen` state, based on the screen height check.
2224 */
23- export function useIsFullscreen ( ) {
25+ export function useIsFullscreen ( ) : DeepReadonly < Ref < boolean > > {
2426 return readonly ( isFullscreen )
2527}
2628
Original file line number Diff line number Diff line change 33 * SPDX-License-Identifier: AGPL-3.0-or-later
44 */
55
6- import { isFullscreenState } from '../../composables/useIsFullscreen/index.js '
6+ import { isFullscreenState } from '../../composables/useIsFullscreen/index.ts '
77
88export default {
99 computed : {
You can’t perform that action at this time.
0 commit comments