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

Commit8f91f70

Browse files
committed
refactor csp
1 parentbb4c347 commit8f91f70

File tree

6 files changed

+3
-12
lines changed

6 files changed

+3
-12
lines changed

‎src/actions/utils/runCommands.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const runCommands = async (commands: string[], send: (action: T.Action) => void)
1919
send({type:'COMMAND_FAIL',payload:{process:{ ...process,status:'FAIL'}}})
2020
return
2121
}
22-
console.log(result.stdout)
2322
send({type:'COMMAND_SUCCESS',payload:{process:{ ...process,status:'SUCCESS'}}})
2423
}
2524
}

‎src/channel/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class Channel implements Channel {
3939
constactionType:string=typeofaction==='string' ?action :action.type
4040
constonError=(error:T.ErrorMessage)=>this.send({type:'ERROR',payload:{ error}})
4141

42-
// console.log('EDITOR RECEIVED:', actionType)
4342
switch(actionType){
4443
case'ENV_GET':
4544
this.send({
@@ -139,7 +138,6 @@ class Channel implements Channel {
139138
}
140139
// send to webview
141140
publicsend=async(action:T.Action)=>{
142-
console.log(`EDITOR SEND${action.type}`)
143141
// action may be an object.type or plain string
144142
constactionType:string=typeofaction==='string' ?action :action.type
145143
switch(actionType){

‎src/webview/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ const createReactWebView = ({ extensionPath, workspaceState, workspaceRoot }: Re
4040
workspaceState,
4141
workspaceRoot,
4242
postMessage:(action:Action):Thenable<boolean>=>{
43-
// console.log(`postMessage ${JSON.stringify(action)}`)
4443
returnpanel.webview.postMessage(action)
4544
},
4645
})

‎src/webview/render.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,16 @@ async function render(panel: vscode.WebviewPanel, rootPath: string) {
6565
constcspMeta:HTMLMetaElement=document.createElement('meta')
6666
cspMeta.httpEquiv='Content-Security-Policy'
6767
cspMeta.content=[
68-
'font-srcvscode-resource://*;',
69-
'img-srcvscode-resource: https:;',
68+
`font-src${panel.webview.cspSource} http: https: data:;`,
69+
`img-src${panel.webview.cspSource} https:;`,
7070
`script-src${nonces.map(nonce=>`'nonce-${nonce}'`).join(' ')};`,
71-
`style-srcvscode-resource: http:https: data:;`,
71+
`style-src${panel.webview.cspSource}https:;`,
7272
].join(' ')
7373
document.head.appendChild(cspMeta)
7474

7575
// stringify dom
7676
consthtml=dom.serialize()
7777

78-
console.log(html)
79-
8078
// set view
8179
panel.webview.html=html
8280
}

‎web-app/src/components/Message/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import*asReactfrom'react'
2-
import*asTfrom'typings'
32
import{MessageasAlifdMessage}from'@alifd/next'
43

54
interfaceProps{

‎web-app/src/services/channel/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ class Channel {
4040
return
4141
}
4242

43-
console.log(`CLIENT RECEIVE:${action.type}`,action)
44-
4543
// messages from core
4644
switch(action.type){
4745
case'ENV_LOAD':

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp