@@ -43,17 +43,19 @@ class ReactWebView {
4343orientation :0 ,
4444groups :[ { groups :[ { } ] , size :0.6 } , { groups :[ { } ] , size :0.4 } ] ,
4545} )
46- this . panel . reveal ( vscode . ViewColumn . Two )
4746}
4847
4948// prevents new panels from going ontop of coderoad panel
50- vscode . window . onDidChangeActiveTextEditor ( param => {
51- if ( ! param || param . viewColumn !== vscode . ViewColumn . Two ) {
49+ vscode . window . onDidChangeActiveTextEditor ( ( textEditor ) => {
50+ console . log ( 'onDidChangeActiveTextEditor' )
51+ console . log ( textEditor )
52+ if ( ! textEditor || textEditor . viewColumn !== vscode . ViewColumn . Two ) {
5253updateWindows ( )
5354}
5455} )
5556// // prevents moving coderoad panel on top of left panel
56- vscode . window . onDidChangeVisibleTextEditors ( param => {
57+ vscode . window . onDidChangeVisibleTextEditors ( ( textEditor ) => {
58+ console . log ( 'onDidChangeVisibleTextEditors' )
5759updateWindows ( )
5860} )
5961
@@ -144,29 +146,29 @@ class ReactWebView {
144146const [ n1 , n2 , n3 ] = [ 1 , 2 , 3 ] . map ( this . getNonce )
145147
146148return `<!DOCTYPE html>
147- <html lang="en" >
149+ <html lang='en' >
148150 <head>
149- <meta charset=" utf-8" >
150- <meta name=" viewport" content=" width=device-width,initial-scale=1,shrink-to-fit=no" >
151- <meta name=" theme-color" content=" #000000" >
151+ <meta charset=' utf-8' >
152+ <meta name=' viewport' content=' width=device-width,initial-scale=1,shrink-to-fit=no' >
153+ <meta name=' theme-color' content=' #000000' >
152154 <title>React App</title>
153- <link rel=" manifest" href=" ./manifest.json" />
155+ <link rel=' manifest' href=' ./manifest.json' />
154156 <!-- TODO: load styles through package -->
155- <link rel=" stylesheet" href=" https://unpkg.com/@alifd/next/dist/next.css" />
156- <link rel=" stylesheet" type=" text/css" href=" ${ styleUri } " >
157- <meta http-equiv=" Content-Security-Policy" content="default -src'none' ; img-src vscode-resource: https:; script-src 'nonce-${ n1 } ' 'nonce-${ n2 } ' 'nonce-${ n3 } '; style-src vscode-resource: 'unsafe-inline' http: https: data:;">
158- <base href=" ${ vscode . Uri . file ( path . join ( this . extensionPath , 'build' ) ) . with ( {
157+ <link rel=' stylesheet' href=' https://unpkg.com/@alifd/next/dist/next.css' />
158+ <link rel=' stylesheet' type=' text/css' href=' ${ styleUri } ' >
159+ <meta http-equiv=' Content-Security-Policy' content="font -src* ; img-src vscode-resource: https:; script-src 'nonce-${ n1 } ' 'nonce-${ n2 } ' 'nonce-${ n3 } '; style-src vscode-resource: 'unsafe-inline' http: https: data:;">
160+ <base href=' ${ vscode . Uri . file ( path . join ( this . extensionPath , 'build' ) ) . with ( {
159161scheme :'vscode-resource' ,
160- } ) } /" >
162+ } ) } /' >
161163 <style></style>
162164 </head>
163165
164166 <body>
165167 <noscript>You need to enable JavaScript to run this app.</noscript>
166- <div id=" root" >Loading...</div>
167- <script nonce=${ n1 } src=" ./webpackBuild.js" ></script>
168- <script nonce=${ n2 } src=" ${ chunkUri } " ></script>
169- <script nonce=" ${ n3 } " src=" ${ scriptUri } " ></script>
168+ <div id=' root' >Loading...</div>
169+ <script nonce=${ n1 } src=' ./webpackBuild.js' ></script>
170+ <script nonce=${ n2 } src=' ${ chunkUri } ' ></script>
171+ <script nonce=' ${ n3 } ' src=' ${ scriptUri } ' ></script>
170172 </body>
171173 </html>`
172174}