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

Commit13a4499

Browse files
committed
clear up CSP issue with GQL
1 parent6f8bee2 commit13a4499

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

‎src/channel/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ class Channel implements Channel {
3333

3434
// receive from webview
3535
publicreceive=async(action:CR.Action)=>{
36+
// action may be an object.type or plain string
3637
constactionType:string=typeofaction==='string' ?action :action.type
37-
console.log('RECEIVED:',actionType)
38+
39+
console.log('EDITOR RECEIVED:',actionType)
3840
switch(actionType){
3941
// continue from tutorial from local storage
4042
case'EDITOR_TUTORIAL_LOAD':
@@ -49,10 +51,6 @@ class Channel implements Channel {
4951
// set tutorial
5052
constprogress:CR.Progress=awaitthis.context.progress.setTutorial(this.workspaceState,tutorial)
5153

52-
console.log('looking at stored')
53-
console.log(JSON.stringify(tutorial))
54-
console.log(JSON.stringify(progress))
55-
5654
if(progress.complete){
5755
// tutorial is already complete
5856
this.send({type:'NEW_TUTORIAL'})
@@ -73,7 +71,6 @@ class Channel implements Channel {
7371
// configure test runner, language, git
7472
case'EDITOR_TUTORIAL_CONFIG':
7573
consttutorialData=action.payload.tutorial
76-
console.log('tutorialConfig',JSON.stringify(tutorialData))
7774
this.context.setTutorial(this.workspaceState,tutorialData)
7875
tutorialConfig(tutorialData)
7976
return

‎src/editor/ReactWebView.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ class ReactWebView {
168168
constcspMeta:HTMLMetaElement=document.createElement('meta')
169169
cspMeta.httpEquiv='Content-Security-Policy'
170170
cspMeta.content=[
171-
`default-src 'none';`,
172171
'font-src vscode-resource://*;',
173172
'img-src vscode-resource: https:;',
174173
`script-src${nonces.map(nonce=>`'nonce-${nonce}'`).join(' ')};`,

‎src/services/storage/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ class Storage<T> {
1717
}
1818
publicget=async():Promise<T>=>{
1919
constvalue:string|undefined=awaitthis.storage.get(this.key)
20-
console.log(`STORAGE.get${this.key} :${value}`)
20+
//console.log(`STORAGE.get ${this.key} : ${value}`)
2121
if(value){
2222
returnJSON.parse(value)
2323
}
2424
returnthis.defaultValue
2525
}
2626
publicset=(value:T):void=>{
2727
conststringValue=JSON.stringify(value)
28-
console.log(`STORAGE.set${this.key}${JSON.stringify(value)}`)
28+
//console.log(`STORAGE.set ${this.key} ${JSON.stringify(value)}`)
2929
this.storage.update(this.key,stringValue)
3030
}
3131
publicupdate=async(value:T):Promise<void>=>{
@@ -34,7 +34,7 @@ class Storage<T> {
3434
...current,
3535
...value,
3636
})
37-
console.log(`STORAGE.update${this.key}${next}`)
37+
//console.log(`STORAGE.update ${this.key} ${next}`)
3838
this.storage.update(this.key,next)
3939
}
4040
publicreset=()=>{

‎web-app/src/services/state/actions/editor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import channel from '../../channel'
55

66
exportdefault{
77
loadStoredTutorial(){
8+
// send message to editor to see if there is existing tutorial progress
9+
// in local storage on the editor
810
channel.editorSend({
911
type:'EDITOR_TUTORIAL_LOAD',
1012
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp