Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a2c087

Browse files
authored
Merge pull requestcoderoad#18 from ShMcK/fix/issues
Fix/issues
2 parents854ced0 +8f16421 commit3a2c087

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

‎src/editor/ReactWebView.ts

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,19 @@ class ReactWebView {
4343
orientation:0,
4444
groups:[{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){
5253
updateWindows()
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')
5759
updateWindows()
5860
})
5961

@@ -144,29 +146,29 @@ class ReactWebView {
144146
const[n1,n2,n3]=[1,2,3].map(this.getNonce)
145147

146148
return`<!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({
159161
scheme:'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
}

‎web-app/src/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ const App = () => {
1717
// update state based on response from editor
1818
consthandleEvent=(event:ReceivedEvent):void=>{
1919
constmessage=event.data
20-
console.log('RECEIVED')
21-
console.log(message)
2220
// messages from core
2321
if(message.type==='SET_STATE'){
2422
setState(message.payload.state)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp