@openneuro/app 4.14.0-alpha.1 → 4.14.1-alpha.0

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.14.0-alpha.1",
3
+ "version": "4.14.1-alpha.0",
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.14.0-alpha.1",
24
- "@openneuro/components": "^4.14.0-alpha.1",
23
+ "@openneuro/client": "^4.14.1-alpha.0",
24
+ "@openneuro/components": "^4.14.1-alpha.0",
25
25
  "bids-validator": "1.9.9",
26
26
  "bytes": "^3.0.0",
27
27
  "comlink": "^4.0.5",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "e901db29ed49827d7bf5e0cf3138b0b88749d851"
84
+ "gitHead": "fb10062e42c683b9fd5e44beaf570fd26c9caedc"
85
85
  }
@@ -5,6 +5,12 @@ declare module '*.png' {
5
5
  export = value
6
6
  }
7
7
 
8
+ // Allow .svg imports
9
+ declare module '*.svg' {
10
+ const value: string
11
+ export = value
12
+ }
13
+
8
14
  // Allow .scss imports
9
15
  declare module '*.scss' {
10
16
  const value: string
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 256 256" style="enable-background:new 0 0 256 256;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#A6CE39;}
7
+ .st1{fill:#FFFFFF;}
8
+ </style>
9
+ <path class="st0" d="M256,128c0,70.7-57.3,128-128,128C57.3,256,0,198.7,0,128C0,57.3,57.3,0,128,0C198.7,0,256,57.3,256,128z"/>
10
+ <g>
11
+ <path class="st1" d="M86.3,186.2H70.9V79.1h15.4v48.4V186.2z"/>
12
+ <path class="st1" d="M108.9,79.1h41.6c39.6,0,57,28.3,57,53.6c0,27.5-21.5,53.6-56.8,53.6h-41.8V79.1z M124.3,172.4h24.5
13
+ c34.9,0,42.9-26.5,42.9-39.7c0-21.5-13.7-39.7-43.7-39.7h-23.7V172.4z"/>
14
+ <path class="st1" d="M88.7,56.8c0,5.5-4.5,10.1-10.1,10.1c-5.6,0-10.1-4.6-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1
15
+ C84.2,46.7,88.7,51.3,88.7,56.8z"/>
16
+ </g>
17
+ </svg>
@@ -1454,7 +1454,7 @@ OCI-1131441 (R. Poldrack, PI) in any publications.
1454
1454
  >
1455
1455
  Uploaded by
1456
1456
  </h2>
1457
- Test User on 2021-12-17 - 12 months ago
1457
+ Test User on 2021-12-17 - about 1 year ago
1458
1458
  </div>
1459
1459
  <div
1460
1460
  class="dataset-meta-block undefined"
@@ -1464,7 +1464,7 @@ OCI-1131441 (R. Poldrack, PI) in any publications.
1464
1464
  >
1465
1465
  Last Updated
1466
1466
  </h2>
1467
- 2021-12-17 - 12 months ago
1467
+ 2021-12-17 - about 1 year ago
1468
1468
  </div>
1469
1469
  <div
1470
1470
  class="dataset-meta-block undefined"
@@ -53,6 +53,7 @@ export const getDatasetPage = gql`
53
53
  id
54
54
  name
55
55
  email
56
+ orcid
56
57
  }
57
58
  analytics {
58
59
  downloads
@@ -108,6 +109,7 @@ export const getDraftPage = gql`
108
109
  id
109
110
  name
110
111
  email
112
+ orcid
111
113
  }
112
114
  analytics {
113
115
  downloads
@@ -28,6 +28,7 @@ import {
28
28
  VersionList,
29
29
  DatasetTools,
30
30
  } from '@openneuro/components/dataset'
31
+ import { Username } from '../users/username'
31
32
 
32
33
  import { FollowDataset } from './mutations/follow'
33
34
  import { StarDataset } from './mutations/star'
@@ -283,7 +284,7 @@ const DraftContainer: React.FC<DraftContainerProps> = ({ dataset }) => {
283
284
  heading="Uploaded by"
284
285
  item={
285
286
  <>
286
- {dataset.uploader.name} on {dateAdded} -{' '}
287
+ <Username user={dataset.uploader} /> on {dateAdded} -{' '}
287
288
  {dateAddedDifference} ago
288
289
  </>
289
290
  }
@@ -25,6 +25,7 @@ import {
25
25
  VersionList,
26
26
  DatasetTools,
27
27
  } from '@openneuro/components/dataset'
28
+ import { Username } from '../users/username'
28
29
  import { Loading } from '@openneuro/components/loading'
29
30
 
30
31
  import {
@@ -285,7 +286,7 @@ export const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
285
286
  heading="Uploaded by"
286
287
  item={
287
288
  <>
288
- {dataset.uploader.name} on {dateAdded} -{' '}
289
+ <Username user={dataset.uploader} /> on {dateAdded} -{' '}
289
290
  {dateAddedDifference} ago
290
291
  </>
291
292
  }
@@ -39,6 +39,7 @@ const searchQuery = gql`
39
39
  uploader {
40
40
  id
41
41
  name
42
+ orcid
42
43
  }
43
44
  public
44
45
  permissions {
@@ -0,0 +1,20 @@
1
+ import React from 'react'
2
+ import ORCIDiDLogo from '../../assets/ORCIDiD_iconvector.svg'
3
+
4
+ /**
5
+ * Display component for usernames showing ORCID linking if connected
6
+ */
7
+ export const Username = ({ user }) => {
8
+ if (user.orcid) {
9
+ return (
10
+ <>
11
+ {user.name}{' '}
12
+ <a href={`https://orcid.org/${user.orcid}`}>
13
+ <img src={ORCIDiDLogo} width="16" height="16" alt="ORCID logo" />
14
+ </a>
15
+ </>
16
+ )
17
+ } else {
18
+ return user.name
19
+ }
20
+ }