@openneuro/app 4.4.8 → 4.5.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 +5 -5
- package/src/scripts/app.tsx +1 -1
- package/src/scripts/common/partials/papaya.jsx +1 -0
- package/src/scripts/index.tsx +1 -1
- package/src/scripts/{refactor_2021 → pages}/admin/admin.jsx +1 -1
- package/src/scripts/{refactor_2021 → pages}/admin/flagged-files.jsx +0 -0
- package/src/scripts/{refactor_2021 → pages}/admin/user-fragment.ts +0 -0
- package/src/scripts/{refactor_2021 → pages}/admin/user-tools.tsx +1 -1
- package/src/scripts/{refactor_2021 → pages}/admin/users.jsx +0 -0
- package/src/scripts/pages/citation-page.tsx +1 -1
- package/src/scripts/{front-page → pages/front-page}/front-page-content.ts +10 -10
- package/src/scripts/{refactor_2021/containers/front-page-container.tsx → pages/front-page/front-page.tsx} +53 -32
- package/src/scripts/pages/front-page-comp.tsx +57 -0
- package/src/scripts/{pet/redirect.tsx → pages/pet-redirect.tsx} +0 -0
- package/src/scripts/refactor_2021/dataset/draft-container.tsx +303 -318
- package/src/scripts/refactor_2021/dataset/files/file-viewer-type.jsx +2 -0
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/doi-link.spec.tsx +38 -8
- package/src/scripts/refactor_2021/dataset/fragments/doi-link.tsx +9 -6
- package/src/scripts/refactor_2021/dataset/mutations/dataset-relations.tsx +2 -3
- package/src/scripts/refactor_2021/dataset/snapshot-container.tsx +98 -112
- package/src/scripts/refactor_2021/uploader/upload-issues.jsx +1 -0
- package/src/scripts/{refactor_2021/routes.tsx → routes.tsx} +10 -10
- package/src/scripts/front-page/assets/get_data_browse.png +0 -0
- package/src/scripts/front-page/assets/get_data_download.png +0 -0
- package/src/scripts/front-page/assets/ljaf.png +0 -0
- package/src/scripts/front-page/assets/logo_app.png +0 -0
- package/src/scripts/front-page/assets/logo_cube.png +0 -0
- package/src/scripts/front-page/assets/logo_data.png +0 -0
- package/src/scripts/front-page/assets/logo_users.png +0 -0
- package/src/scripts/front-page/assets/nih.png +0 -0
- package/src/scripts/front-page/assets/nsf.png +0 -0
- package/src/scripts/front-page/assets/share_data_collaborate.png +0 -0
- package/src/scripts/front-page/assets/share_data_publish.png +0 -0
- package/src/scripts/front-page/assets/share_data_validate.png +0 -0
- package/src/scripts/front-page/assets/squishymedia.png +0 -0
- package/src/scripts/front-page/assets/stanford.png +0 -0
- package/src/scripts/front-page/assets/tab-get_data.png +0 -0
- package/src/scripts/front-page/assets/tab-share_data.png +0 -0
- package/src/scripts/front-page/assets/tab-use_data.png +0 -0
- package/src/scripts/front-page/assets/use_data_analyze.png +0 -0
- package/src/scripts/front-page/assets/use_data_snapshot.png +0 -0
- package/src/scripts/mobile/collapsible-wrapper.tsx +0 -93
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openneuro/app",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "React JS web frontend for the OpenNeuro platform.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "public/client.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"@elastic/apm-rum": "5.9.1",
|
|
20
20
|
"@emotion/react": "11.6.0",
|
|
21
21
|
"@emotion/styled": "11.6.0",
|
|
22
|
-
"@openneuro/client": "^4.
|
|
23
|
-
"@openneuro/components": "^4.
|
|
22
|
+
"@openneuro/client": "^4.5.0",
|
|
23
|
+
"@openneuro/components": "^4.5.0",
|
|
24
24
|
"babel-runtime": "^6.26.0",
|
|
25
|
-
"bids-validator": "1.
|
|
25
|
+
"bids-validator": "1.9.2",
|
|
26
26
|
"bytes": "^3.0.0",
|
|
27
27
|
"comlink": "^4.0.5",
|
|
28
28
|
"core-js": "^3.3.2",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"publishConfig": {
|
|
117
117
|
"access": "public"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "8771d59f40e642de9313468e8764f91fb0d811b2"
|
|
120
120
|
}
|
package/src/scripts/app.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, ReactNode } from 'react'
|
|
2
2
|
import Helmet from 'react-helmet'
|
|
3
|
-
import { frontPage } from './front-page/front-page-content'
|
|
3
|
+
import { frontPage } from './pages/front-page/front-page-content'
|
|
4
4
|
import { CookiesProvider, Cookies } from 'react-cookie'
|
|
5
5
|
import { ToastContainer } from 'react-toastify'
|
|
6
6
|
import { MediaContextProvider } from './styles/media'
|
package/src/scripts/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import Uploader from './refactor_2021/uploader/uploader.jsx'
|
|
3
|
-
import Routes from './
|
|
3
|
+
import Routes from './routes'
|
|
4
4
|
import HeaderContainer from './refactor_2021/containers/header'
|
|
5
5
|
import FooterContainer from './refactor_2021/containers/footer'
|
|
6
6
|
import { SearchParamsProvider } from './refactor_2021/search/search-params-ctx'
|
|
@@ -4,7 +4,7 @@ import React from 'react'
|
|
|
4
4
|
import { Redirect, Switch, Route, NavLink } from 'react-router-dom'
|
|
5
5
|
import Users from './users.jsx'
|
|
6
6
|
import FlaggedFiles from './flagged-files.jsx'
|
|
7
|
-
import AdminUser from '
|
|
7
|
+
import AdminUser from '../../refactor_2021/authentication/admin-user.jsx'
|
|
8
8
|
|
|
9
9
|
class Dashboard extends React.Component {
|
|
10
10
|
// life cycle events --------------------------------------------------
|
|
File without changes
|
|
File without changes
|
|
@@ -2,7 +2,7 @@ import React, { FC, ReactElement } from 'react'
|
|
|
2
2
|
import { gql } from '@apollo/client'
|
|
3
3
|
import { Mutation } from '@apollo/client/react/components'
|
|
4
4
|
import { WarnButton } from '@openneuro/components/warn-button'
|
|
5
|
-
import { getProfile } from '
|
|
5
|
+
import { getProfile } from '../../refactor_2021/authentication/profile.js'
|
|
6
6
|
import { useCookies } from 'react-cookie'
|
|
7
7
|
import { USER_FRAGMENT } from './user-fragment'
|
|
8
8
|
|
|
File without changes
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import ljaf from '
|
|
2
|
-
import nsf from '
|
|
3
|
-
import nih from '
|
|
4
|
-
import squishymedia from '
|
|
5
|
-
import stanford from '
|
|
6
|
-
import logo_app from '
|
|
7
|
-
import logo_cube from '
|
|
8
|
-
import logo_data from '
|
|
9
|
-
import logo_users from '
|
|
10
|
-
import brand_mark from '
|
|
1
|
+
import ljaf from '../../../assets/ljaf.png'
|
|
2
|
+
import nsf from '../../../assets/nsf.png'
|
|
3
|
+
import nih from '../../../assets/nih.png'
|
|
4
|
+
import squishymedia from '../../../assets/squishymedia.png'
|
|
5
|
+
import stanford from '../../../assets/stanford.png'
|
|
6
|
+
import logo_app from '../../../assets/logo_app.png'
|
|
7
|
+
import logo_cube from '../../../assets/logo_cube.png'
|
|
8
|
+
import logo_data from '../../../assets/logo_data.png'
|
|
9
|
+
import logo_users from '../../../assets/logo_users.png'
|
|
10
|
+
import brand_mark from '../../../assets/brand_mark.png'
|
|
11
11
|
|
|
12
12
|
export const frontPage = {
|
|
13
13
|
pageTitle: 'OpenNeuro',
|
|
@@ -2,9 +2,9 @@ import { apm } from '../../apm'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { gql, useQuery } from '@apollo/client'
|
|
4
4
|
import { Mutation } from '@apollo/client/react/components'
|
|
5
|
+
import styled from '@emotion/styled'
|
|
5
6
|
|
|
6
7
|
import {
|
|
7
|
-
FrontPage,
|
|
8
8
|
AffiliateBlock,
|
|
9
9
|
ActivityHeader,
|
|
10
10
|
Contributors,
|
|
@@ -154,37 +154,58 @@ export const FrontPageNewQuery = ({ query }) => {
|
|
|
154
154
|
)
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
157
|
+
|
|
158
|
+
const FrontPageSection = styled.section`
|
|
159
|
+
margin: 100px 0;
|
|
160
|
+
&:last-child {
|
|
161
|
+
margin-bottom: 0;
|
|
162
|
+
}
|
|
163
|
+
&.gray-bg {
|
|
164
|
+
margin: 0;
|
|
165
|
+
padding: 100px 0;
|
|
166
|
+
&:last-child {
|
|
167
|
+
padding-bottom: 0;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
`
|
|
171
|
+
|
|
172
|
+
const FrontPageContainer: React.FC = () => (
|
|
173
|
+
<div className="front-page page">
|
|
174
|
+
<FrontPageSection>
|
|
175
|
+
<AffiliateBlock />
|
|
176
|
+
</FrontPageSection>
|
|
177
|
+
<FrontPageSection>
|
|
178
|
+
<div className="container">
|
|
179
|
+
<Infographic />
|
|
180
|
+
</div>
|
|
181
|
+
</FrontPageSection>
|
|
182
|
+
<FrontPageSection className="front-page-activity">
|
|
183
|
+
<div className="activity-swoop">
|
|
184
|
+
<div></div>
|
|
185
|
+
</div>
|
|
186
|
+
<div className="swoop-content gray-bg">
|
|
187
|
+
<div className="container">
|
|
188
|
+
<ActivityHeader />
|
|
189
|
+
<FrontPageTopQuery query={TOP_VIEWED} />
|
|
190
|
+
<FrontPageNewQuery query={RECENTLY_PUBLISHED} />
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
</FrontPageSection>
|
|
194
|
+
<FrontPageSection className="gray-bg">
|
|
195
|
+
<Mutation mutation={SUBSCRIBE_TO_NEWSLETTER}>
|
|
196
|
+
{subscribeToNewsletter => (
|
|
197
|
+
<GetUpdates
|
|
198
|
+
subscribe={(email, cb) => {
|
|
199
|
+
subscribeToNewsletter({ variables: { email } }).then(cb).catch(cb)
|
|
200
|
+
}}
|
|
201
|
+
/>
|
|
183
202
|
)}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
203
|
+
</Mutation>
|
|
204
|
+
</FrontPageSection>
|
|
205
|
+
<FrontPageSection className="gray-bg">
|
|
206
|
+
<Contributors />
|
|
207
|
+
</FrontPageSection>
|
|
208
|
+
</div>
|
|
209
|
+
)
|
|
189
210
|
|
|
190
211
|
export default FrontPageContainer
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import styled from '@emotion/styled'
|
|
3
|
+
|
|
4
|
+
const FrontPageSection = styled.section`
|
|
5
|
+
margin: 100px 0;
|
|
6
|
+
&:last-child {
|
|
7
|
+
margin-bottom: 0;
|
|
8
|
+
}
|
|
9
|
+
&.gray-bg {
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 100px 0;
|
|
12
|
+
&:last-child {
|
|
13
|
+
padding-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`
|
|
17
|
+
|
|
18
|
+
export interface FrontPageProps {
|
|
19
|
+
renderAffiliateBlock: () => React.ReactNode
|
|
20
|
+
renderInfographic: () => React.ReactNode
|
|
21
|
+
renderActivitySliderFront: () => React.ReactNode
|
|
22
|
+
renderGetUpdates: () => React.ReactNode
|
|
23
|
+
renderContributors: () => React.ReactNode
|
|
24
|
+
className?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const FrontPage: React.FC<FrontPageProps> = ({
|
|
28
|
+
renderAffiliateBlock,
|
|
29
|
+
renderInfographic,
|
|
30
|
+
renderActivitySliderFront,
|
|
31
|
+
renderGetUpdates,
|
|
32
|
+
renderContributors,
|
|
33
|
+
className,
|
|
34
|
+
}) => (
|
|
35
|
+
<>
|
|
36
|
+
<div className={className + ' page'}>
|
|
37
|
+
<FrontPageSection>{renderAffiliateBlock()}</FrontPageSection>
|
|
38
|
+
<FrontPageSection>
|
|
39
|
+
<div className="container">{renderInfographic()}</div>
|
|
40
|
+
</FrontPageSection>
|
|
41
|
+
<FrontPageSection className="front-page-activity">
|
|
42
|
+
<div className="activity-swoop">
|
|
43
|
+
<div></div>
|
|
44
|
+
</div>
|
|
45
|
+
<div className="swoop-content gray-bg">
|
|
46
|
+
<div className="container">{renderActivitySliderFront()}</div>
|
|
47
|
+
</div>
|
|
48
|
+
</FrontPageSection>
|
|
49
|
+
<FrontPageSection className="gray-bg">
|
|
50
|
+
{renderGetUpdates()}
|
|
51
|
+
</FrontPageSection>
|
|
52
|
+
<FrontPageSection className="gray-bg">
|
|
53
|
+
{renderContributors()}
|
|
54
|
+
</FrontPageSection>
|
|
55
|
+
</div>
|
|
56
|
+
</>
|
|
57
|
+
)
|
|
File without changes
|