11import { getAllWindows } from "@tauri-apps/api/window" ;
2- import { Show , Suspense } from "solid-js" ;
2+ import { Show } from "solid-js" ;
33import { createCurrentRecordingQuery } from "~/utils/queries" ;
44
55export default function ( ) {
@@ -24,57 +24,48 @@ export default function () {
2424 } ;
2525
2626 return (
27- < Suspense >
28- < Show when = { bounds ( ) } >
29- { ( bounds ) => {
30- getAllWindows ( ) . then ( ( w ) =>
31- w . forEach ( ( w ) => {
32- if ( w . label === "camera" || w . label === "in-progress-recording" )
33- w . setFocus ( ) ;
34- } ) ,
35- ) ;
27+ < Show when = { bounds ( ) } >
28+ { ( bounds ) => {
29+ getAllWindows ( ) . then ( ( w ) =>
30+ w . forEach ( ( w ) => {
31+ if ( w . label === "camera" || w . label === "in-progress-recording" )
32+ w . setFocus ( ) ;
33+ } ) ,
34+ ) ;
3635
37- return (
38- < div class = "size-full absolute inset-0 *:absolute *:bg-black/50 *:pointer-events-none" >
39- { ( ( ) => {
40- const { size, position } = bounds ( ) ;
41- return (
42- < >
43- { /* Top blind */ }
44- < div
45- class = "top-0 left-0 w-full"
46- style = { { height : `${ position . y } px` } }
47- />
48- { /* Bottom blind */ }
49- < div
50- class = "left-0 bottom-0 w-full"
51- style = { { top : `${ position . y + size . height } px` } }
52- />
53- { /* Left blind */ }
54- < div
55- class = "left-0"
56- style = { {
57- top : `${ position . y } px` ,
58- width : `${ position . x } px` ,
59- height : `${ size . height } px` ,
60- } }
61- />
62- { /* Right blind */ }
63- < div
64- class = "right-0"
65- style = { {
66- top : `${ position . y } px` ,
67- left : `${ position . x + size . width } px` ,
68- height : `${ size . height } px` ,
69- } }
70- />
71- </ >
72- ) ;
73- } ) ( ) }
74- </ div >
75- ) ;
76- } }
77- </ Show >
78- </ Suspense >
36+ return (
37+ < div class = "size-full absolute inset-0 *:absolute *:bg-black/50 *:pointer-events-none" >
38+ { ( ( ) => {
39+ const { size, position } = bounds ( ) ;
40+ return (
41+ < >
42+ < div class = "top-0 left-0 w-full" style = { { height : `${ position . y } px` } } />
43+ < div
44+ class = "left-0 bottom-0 w-full"
45+ style = { { top : `${ position . y + size . height } px` } }
46+ />
47+ < div
48+ class = "left-0"
49+ style = { {
50+ top : `${ position . y } px` ,
51+ width : `${ position . x } px` ,
52+ height : `${ size . height } px` ,
53+ } }
54+ />
55+ < div
56+ class = "right-0"
57+ style = { {
58+ top : `${ position . y } px` ,
59+ left : `${ position . x + size . width } px` ,
60+ height : `${ size . height } px` ,
61+ } }
62+ />
63+ </ >
64+ ) ;
65+ } ) ( ) }
66+ </ div >
67+ ) ;
68+ } }
69+ </ Show >
7970 ) ;
8071}
0 commit comments