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

Commit0bfc65a

Browse files
committed
temp fix issue with local storage not working in vscode
1 parent4e94b71 commit0bfc65a

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

‎src/editor/ReactWebView.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,13 @@ class ReactWebView {
156156
<meta charset='utf-8'>
157157
<meta name='viewport' content='width=device-width,initial-scale=1,shrink-to-fit=no'>
158158
<meta name='theme-color' content='#000000'>
159+
<meta http-equiv='Content-Security-Policy' content="font-src vscode-resource://*; img-src vscode-resource: https:; script-src${scripts.map(script=>`'nonce-${script.nonce}'`).join(' ')}; style-src vscode-resource: 'unsafe-inline' http: https: data:;">
159160
<title>React App</title>
160-
<link rel='manifest' href='./manifest.json' />
161161
162+
<link rel='manifest' href='./manifest.json' />
162163
<link rel='stylesheet' href='https://unpkg.com/@alifd/next/dist/next.css' />
163164
${styles.map(styleUri=>`<link rel='stylesheet' type='text/css' href='${styleUri}'>`).join('\n')}
164-
<meta http-equiv='Content-Security-Policy' content="font-src *; img-src vscode-resource: https:; script-src${scripts.map(script=>`'nonce-${script.nonce}'`).join(' ')}; style-src vscode-resource: 'unsafe-inline' http: https: data:;">
165+
165166
<base href='${buildUri}/'>
166167
</head>
167168

‎web-app/src/services/state/storage.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ import * as G from 'typings/graphql'
55

66
classStorage<T>{
77
privatekey:string
8-
privatestorage=localStorage
8+
// TODO: replace somehow with localStorage
9+
// window.localStorage not working inside of vscode
10+
privatestorage={
11+
getItem(key:string){
12+
returnnull
13+
},
14+
setItem(key:string,value:string){
15+
return
16+
}
17+
}
918
constructor(key:string){
1019
this.key=key
1120
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp