@openneuro/app 4.7.2 → 4.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openneuro/app",
3
- "version": "4.7.2",
3
+ "version": "4.8.2",
4
4
  "description": "React JS web frontend for the OpenNeuro platform.",
5
5
  "license": "MIT",
6
6
  "main": "public/client.js",
@@ -20,8 +20,8 @@
20
20
  "@emotion/react": "11.6.0",
21
21
  "@emotion/styled": "11.6.0",
22
22
  "@niivue/niivue": "0.23.1",
23
- "@openneuro/client": "^4.7.2",
24
- "@openneuro/components": "^4.7.2",
23
+ "@openneuro/client": "^4.8.2",
24
+ "@openneuro/components": "^4.8.2",
25
25
  "babel-runtime": "^6.26.0",
26
26
  "bids-validator": "1.9.3",
27
27
  "bytes": "^3.0.0",
@@ -120,5 +120,5 @@
120
120
  "publishConfig": {
121
121
  "access": "public"
122
122
  },
123
- "gitHead": "48801457dc6bd8c00f927f52a3f0b43e4629708b"
123
+ "gitHead": "621de75b85910e321fbe120f19131fde1103e62d"
124
124
  }
package/src/index.html CHANGED
@@ -21,7 +21,7 @@
21
21
  <body>
22
22
  <div id="main">${react}</div>
23
23
  <script src="/client.jsx" type="module"></script>
24
- <script>window.__APOLLO_STATE__=atob("${apolloState}");</script>
24
+ <script>window.__APOLLO_STATE__=decodeURIComponent(atob("${apolloState}"));</script>
25
25
  </body>
26
26
 
27
27
  </html>
@@ -23,9 +23,8 @@ Object {
23
23
  class="DraftEditor-editorContainer"
24
24
  >
25
25
  <div
26
- class="notranslate public-DraftEditor-content"
27
- contenteditable="true"
28
- role="textbox"
26
+ class="public-DraftEditor-content"
27
+ contenteditable="false"
29
28
  spellcheck="false"
30
29
  style="outline: none; user-select: text; white-space: pre-wrap; word-wrap: break-word;"
31
30
  >
@@ -85,9 +84,8 @@ Object {
85
84
  class="DraftEditor-editorContainer"
86
85
  >
87
86
  <div
88
- class="notranslate public-DraftEditor-content"
89
- contenteditable="true"
90
- role="textbox"
87
+ class="public-DraftEditor-content"
88
+ contenteditable="false"
91
89
  spellcheck="false"
92
90
  style="outline: none; user-select: text; white-space: pre-wrap; word-wrap: break-word;"
93
91
  >
@@ -37,6 +37,7 @@ const Comment = ({ datasetId, data, children }) => {
37
37
  <Editor
38
38
  editorKey={data.id}
39
39
  editorState={editorState}
40
+ readOnly={true}
40
41
  onChange={() => {
41
42
  /* Not editable, this shouldn't fire */
42
43
  }}
package/src/server.jsx CHANGED
@@ -57,9 +57,9 @@ export async function render(url, cookies) {
57
57
  const head = `${helmet.title.toString()}${helmet.meta.toString()}${helmet.style.toString()}`
58
58
 
59
59
  // Prevent <script> tags from strings
60
- const apolloState = Buffer.from(JSON.stringify(client.extract())).toString(
61
- 'base64',
62
- )
60
+ const apolloState = Buffer.from(
61
+ encodeURIComponent(JSON.stringify(client.extract())),
62
+ ).toString('base64')
63
63
 
64
64
  return { react, apolloState, head, css: redesignStyles }
65
65
  }