File tree 3 files changed +14
-12
lines changed
3 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 3
3
* SPDX-License-Identifier: AGPL-3.0-or-later
4
4
*/
5
5
6
- export * from './useIsFullscreen/index.js'
7
- export * from './useIsMobile/index.js'
8
6
export * from './useFormatDateTime.ts'
9
7
export * from './useHotKey/index.js'
10
8
export * 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 2
2
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
3
3
* SPDX-License-Identifier: AGPL-3.0-or-later
4
4
*/
5
-
5
+ import type { DeepReadonly , Ref } from 'vue'
6
6
import { readonly , ref } from 'vue'
7
7
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
-
12
8
const isFullscreen = ref ( checkIfIsFullscreen ( ) )
13
9
14
10
window . addEventListener ( 'resize' , ( ) => {
15
11
isFullscreen . value = checkIfIsFullscreen ( )
16
12
} )
17
13
18
14
/**
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.
22
24
*/
23
- export function useIsFullscreen ( ) {
25
+ export function useIsFullscreen ( ) : DeepReadonly < Ref < boolean > > {
24
26
return readonly ( isFullscreen )
25
27
}
26
28
Original file line number Diff line number Diff line change 3
3
* SPDX-License-Identifier: AGPL-3.0-or-later
4
4
*/
5
5
6
- import { isFullscreenState } from '../../composables/useIsFullscreen/index.js '
6
+ import { isFullscreenState } from '../../composables/useIsFullscreen/index.ts '
7
7
8
8
export default {
9
9
computed : {
You can’t perform that action at this time.
0 commit comments