@@ -47,13 +47,16 @@ class ReactWebView {
47
47
}
48
48
49
49
// prevents new panels from going ontop of coderoad panel
50
- vscode . window . onDidChangeActiveTextEditor ( param => {
51
- if ( ! param || param . viewColumn !== vscode . ViewColumn . Two ) {
50
+ vscode . window . onDidChangeActiveTextEditor ( ( textEditor ) => {
51
+ console . log ( 'onDidChangeActiveTextEditor' )
52
+ console . log ( textEditor )
53
+ if ( ! textEditor || textEditor . viewColumn !== vscode . ViewColumn . Two ) {
52
54
updateWindows ( )
53
55
}
54
56
} )
55
57
// // prevents moving coderoad panel on top of left panel
56
- vscode . window . onDidChangeVisibleTextEditors ( param => {
58
+ vscode . window . onDidChangeVisibleTextEditors ( ( textEditor ) => {
59
+ console . log ( 'onDidChangeVisibleTextEditors' )
57
60
updateWindows ( )
58
61
} )
59
62
@@ -144,29 +147,29 @@ class ReactWebView {
144
147
const [ n1 , n2 , n3 ] = [ 1 , 2 , 3 ] . map ( this . getNonce )
145
148
146
149
return `<!DOCTYPE html>
147
- <html lang="en" >
150
+ <html lang='en' >
148
151
<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" >
152
+ <meta charset=' utf-8' >
153
+ <meta name=' viewport' content=' width=device-width,initial-scale=1,shrink-to-fit=no' >
154
+ <meta name=' theme-color' content=' #000000' >
152
155
<title>React App</title>
153
- <link rel=" manifest" href=" ./manifest.json" />
156
+ <link rel=' manifest' href=' ./manifest.json' />
154
157
<!-- 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 ( {
158
+ <link rel=' stylesheet' href=' https://unpkg.com/@alifd/next/dist/next.css' />
159
+ <link rel=' stylesheet' type=' text/css' href=' ${ styleUri } ' >
160
+ <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:;">
161
+ <base href=' ${ vscode . Uri . file ( path . join ( this . extensionPath , 'build' ) ) . with ( {
159
162
scheme : 'vscode-resource' ,
160
- } ) } /" >
163
+ } ) } /' >
161
164
<style></style>
162
165
</head>
163
166
164
167
<body>
165
168
<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>
169
+ <div id=' root' >Loading...</div>
170
+ <script nonce=${ n1 } src=' ./webpackBuild.js' ></script>
171
+ <script nonce=${ n2 } src=' ${ chunkUri } ' ></script>
172
+ <script nonce=' ${ n3 } ' src=' ${ scriptUri } ' ></script>
170
173
</body>
171
174
</html>`
172
175
}
0 commit comments