@openneuro/app 4.40.7 → 4.40.8
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.40.
|
|
3
|
+
"version": "4.40.8",
|
|
4
4
|
"description": "React JS web frontend for the OpenNeuro platform.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "public/client.js",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "4d41cf4ab46aaddfa7bac11aa1813263d929a10a"
|
|
82
82
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
|
+
import Helmet from "react-helmet"
|
|
2
3
|
import * as Sentry from "@sentry/react"
|
|
3
4
|
import { useMutation } from "@apollo/client"
|
|
4
5
|
import { EditableContent } from "./components/editable-content"
|
|
@@ -8,6 +9,7 @@ import { GitHubAuthButton } from "./github-auth-button"
|
|
|
8
9
|
import type { UserAccountViewProps } from "../types/user-types"
|
|
9
10
|
import { OrcidConsentForm } from "./components/orcid-consent-form"
|
|
10
11
|
import { validateHttpHttpsUrl } from "../utils/validationUtils"
|
|
12
|
+
import { pageTitle } from "../resources/strings.js"
|
|
11
13
|
|
|
12
14
|
export const UserAccountView: React.FC<UserAccountViewProps> = ({
|
|
13
15
|
orcidUser,
|
|
@@ -84,66 +86,73 @@ export const UserAccountView: React.FC<UserAccountViewProps> = ({
|
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
return (
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
89
|
+
<>
|
|
90
|
+
<Helmet>
|
|
91
|
+
<title>
|
|
92
|
+
{orcidUser.name || "User"} profile - {pageTitle}
|
|
93
|
+
</title>
|
|
94
|
+
</Helmet>
|
|
95
|
+
<div data-testid="user-account-view" className={styles.useraccountview}>
|
|
96
|
+
<h3>Account</h3>
|
|
97
|
+
<ul className={styles.accountDetail}>
|
|
98
|
+
<li>
|
|
99
|
+
<span>Name:</span>
|
|
100
|
+
{orcidUser.name}
|
|
101
|
+
</li>
|
|
102
|
+
<li>
|
|
103
|
+
<span>Email:</span>
|
|
104
|
+
{orcidUser.email}
|
|
105
|
+
</li>
|
|
106
|
+
<li>
|
|
107
|
+
<span>ORCID:</span>
|
|
108
|
+
{orcidUser.orcid}
|
|
109
|
+
</li>
|
|
110
|
+
{orcidUser?.github &&
|
|
111
|
+
(
|
|
112
|
+
<li>
|
|
113
|
+
<span>GitHub:</span>
|
|
114
|
+
{orcidUser.github}
|
|
115
|
+
</li>
|
|
116
|
+
)}
|
|
117
|
+
<li>
|
|
118
|
+
<GitHubAuthButton sync={orcidUser.githubSynced} />
|
|
119
|
+
</li>
|
|
120
|
+
</ul>
|
|
113
121
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
<EditableContent
|
|
123
|
+
editableContent={userLinks}
|
|
124
|
+
setRows={handleLinksChange}
|
|
125
|
+
heading="Links"
|
|
126
|
+
validation={validateHttpHttpsUrl}
|
|
127
|
+
validationMessage="Invalid URL format. Please start with http:// or https://"
|
|
128
|
+
data-testid="links-section"
|
|
129
|
+
/>
|
|
122
130
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
{orcidUser?.id && orcidUser?.orcid !== undefined && (
|
|
132
|
+
<div className={styles.umbOrcidConsent}>
|
|
133
|
+
<div className={styles.umbOrcidHeading}>
|
|
134
|
+
<h4>ORCID Integration</h4>
|
|
135
|
+
</div>
|
|
136
|
+
<OrcidConsentForm
|
|
137
|
+
userId={orcidUser.id}
|
|
138
|
+
initialOrcidConsent={orcidUser.orcidConsent}
|
|
139
|
+
/>
|
|
127
140
|
</div>
|
|
128
|
-
|
|
129
|
-
userId={orcidUser.id}
|
|
130
|
-
initialOrcidConsent={orcidUser.orcidConsent}
|
|
131
|
-
/>
|
|
132
|
-
</div>
|
|
133
|
-
)}
|
|
141
|
+
)}
|
|
134
142
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
<EditableContent
|
|
144
|
+
editableContent={userLocation}
|
|
145
|
+
setRows={handleLocationChange}
|
|
146
|
+
heading="Location"
|
|
147
|
+
data-testid="location-section"
|
|
148
|
+
/>
|
|
149
|
+
<EditableContent
|
|
150
|
+
editableContent={userInstitution}
|
|
151
|
+
setRows={handleInstitutionChange}
|
|
152
|
+
heading="Institution"
|
|
153
|
+
data-testid="institution-section"
|
|
154
|
+
/>
|
|
155
|
+
</div>
|
|
156
|
+
</>
|
|
148
157
|
)
|
|
149
158
|
}
|