@openneuro/app 4.29.8 → 4.30.0-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/.scss-lint.yml +11 -11
- package/maintenance.html +26 -20
- package/package.json +3 -3
- package/src/@types/custom.d.ts +6 -0
- package/src/index.html +14 -10
- package/src/scripts/datalad/routes/dataset-redirect.tsx +2 -0
- package/src/scripts/dataset/mutations/__tests__/update-permissions.spec.jsx +2 -1
- package/src/scripts/dataset/mutations/update-permissions.tsx +1 -9
- package/src/scripts/routes.tsx +17 -0
- package/src/scripts/users/__tests__/user-account-view.spec.tsx +152 -0
- package/src/scripts/users/__tests__/user-card.spec.tsx +110 -0
- package/src/scripts/users/__tests__/user-query.spec.tsx +65 -0
- package/src/scripts/users/__tests__/user-routes.spec.tsx +102 -0
- package/src/scripts/users/__tests__/user-tabs.spec.tsx +84 -0
- package/src/scripts/users/components/close-button.tsx +20 -0
- package/src/scripts/users/components/edit-button.tsx +20 -0
- package/src/scripts/users/components/edit-list.tsx +103 -0
- package/src/scripts/users/components/edit-string.tsx +90 -0
- package/src/scripts/users/components/editable-content.tsx +98 -0
- package/src/scripts/users/scss/editable-content.scss +15 -0
- package/src/scripts/users/scss/user-meta-blocks.scss +14 -0
- package/src/scripts/users/scss/useraccountview.module.scss +20 -0
- package/src/scripts/users/scss/usercard.module.scss +24 -0
- package/src/scripts/users/scss/usercontainer.module.scss +38 -0
- package/src/scripts/users/scss/usertabs.module.scss +63 -0
- package/src/scripts/users/user-account-view.tsx +142 -0
- package/src/scripts/users/user-card.tsx +86 -0
- package/src/scripts/users/user-container.tsx +49 -0
- package/src/scripts/users/user-datasets-view.tsx +53 -0
- package/src/scripts/users/user-notifications-view.tsx +11 -0
- package/src/scripts/users/user-query.tsx +76 -0
- package/src/scripts/users/user-routes.tsx +52 -0
- package/src/scripts/users/user-tabs.tsx +74 -0
- package/src/scripts/utils/__tests__/markdown.spec.tsx +1 -2
- package/src/scripts/utils/validationUtils.ts +8 -0
- package/src/scripts/validation/validation.tsx +11 -8
|
@@ -31,12 +31,12 @@ const warningHeader = (count) => (
|
|
|
31
31
|
</div>
|
|
32
32
|
)
|
|
33
33
|
|
|
34
|
-
const errorHeader = (
|
|
34
|
+
const errorHeader = (errorCount) => (
|
|
35
35
|
<div>
|
|
36
36
|
<h3 className="metaheader">BIDS Validation</h3>
|
|
37
37
|
|
|
38
38
|
<span className="label text-warning pull-right">
|
|
39
|
-
{
|
|
39
|
+
{errorCount} {pluralize("Error", errorCount)}
|
|
40
40
|
</span>
|
|
41
41
|
<span className="dataset-status ds-danger">
|
|
42
42
|
<i className="fa fa-exclamation-circle" /> Invalid
|
|
@@ -53,10 +53,11 @@ const Valid = () => (
|
|
|
53
53
|
)
|
|
54
54
|
|
|
55
55
|
interface WarningsProps {
|
|
56
|
+
issues: DatasetIssues
|
|
56
57
|
warnings: DatasetIssues
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
const Warnings = ({ warnings }: WarningsProps) => (
|
|
60
|
+
const Warnings = ({ issues, warnings }: WarningsProps) => (
|
|
60
61
|
<ValidationPanel heading={warningHeader(warnings.size)}>
|
|
61
62
|
<div>
|
|
62
63
|
<span className="message error fade-in">
|
|
@@ -69,15 +70,17 @@ const Warnings = ({ warnings }: WarningsProps) => (
|
|
|
69
70
|
</span>
|
|
70
71
|
</div>
|
|
71
72
|
<br />
|
|
72
|
-
<Results issues={
|
|
73
|
+
<Results issues={issues} />
|
|
73
74
|
</ValidationPanel>
|
|
74
75
|
)
|
|
75
76
|
|
|
76
77
|
interface ErrorsProps {
|
|
78
|
+
issues: DatasetIssues
|
|
77
79
|
errors: DatasetIssues
|
|
80
|
+
warnings: DatasetIssues
|
|
78
81
|
}
|
|
79
82
|
|
|
80
|
-
const Errors = ({ errors }: ErrorsProps) => (
|
|
83
|
+
const Errors = ({ issues, errors }: ErrorsProps) => (
|
|
81
84
|
<ValidationPanel heading={errorHeader(errors.size)}>
|
|
82
85
|
<span className="message error fade-in">
|
|
83
86
|
Your dataset is no longer valid. You must fix the{" "}
|
|
@@ -86,7 +89,7 @@ const Errors = ({ errors }: ErrorsProps) => (
|
|
|
86
89
|
to use all of the site features.
|
|
87
90
|
</span>
|
|
88
91
|
<br />
|
|
89
|
-
<Results issues={
|
|
92
|
+
<Results issues={issues} />
|
|
90
93
|
</ValidationPanel>
|
|
91
94
|
)
|
|
92
95
|
|
|
@@ -100,9 +103,9 @@ export const Validation = ({ issues }: ValidationProps) => {
|
|
|
100
103
|
const warnings = grouped.get("warning")
|
|
101
104
|
const errors = grouped.get("error")
|
|
102
105
|
if (errors?.size) {
|
|
103
|
-
return <Errors
|
|
106
|
+
return <Errors issues={issues} errors={errors} warnings={warnings} />
|
|
104
107
|
} else if (warnings?.size) {
|
|
105
|
-
return <Warnings
|
|
108
|
+
return <Warnings issues={issues} warnings={warnings} />
|
|
106
109
|
} else {
|
|
107
110
|
return <Valid />
|
|
108
111
|
}
|