@openneuro/app 4.21.0-alpha.3 → 4.21.0-alpha.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 +5 -5
- package/src/scripts/components/agreement.tsx +14 -16
- package/src/scripts/dataset/__tests__/__snapshots__/snapshot-container.spec.tsx.snap +26 -2
- package/src/scripts/dataset/components/DatasetToolButton.tsx +17 -3
- package/src/scripts/dataset/components/DatasetTools.tsx +9 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openneuro/app",
|
|
3
|
-
"version": "4.21.0-alpha.
|
|
3
|
+
"version": "4.21.0-alpha.8",
|
|
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.11.1",
|
|
21
21
|
"@emotion/styled": "11.11.0",
|
|
22
22
|
"@niivue/niivue": "0.34.0",
|
|
23
|
-
"@openneuro/client": "^4.21.0-alpha.
|
|
24
|
-
"@openneuro/components": "^4.21.0-alpha.
|
|
23
|
+
"@openneuro/client": "^4.21.0-alpha.8",
|
|
24
|
+
"@openneuro/components": "^4.21.0-alpha.8",
|
|
25
25
|
"@tanstack/react-table": "^8.9.3",
|
|
26
26
|
"bids-validator": "1.13.0",
|
|
27
27
|
"bytes": "^3.0.0",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"sass": "^1.32.8",
|
|
65
65
|
"stream-browserify": "^3.0.0",
|
|
66
66
|
"typescript": "5.1.6",
|
|
67
|
-
"vite": "4.4.
|
|
67
|
+
"vite": "4.4.12",
|
|
68
68
|
"vitest": "0.34.4"
|
|
69
69
|
},
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "336a59858d951d9d44c093ef190d44af505cffbf"
|
|
74
74
|
}
|
|
@@ -8,7 +8,6 @@ const AgreementDiv = styled.div`
|
|
|
8
8
|
overflow: hidden;
|
|
9
9
|
position: fixed;
|
|
10
10
|
bottom: 0;
|
|
11
|
-
height: 96px;
|
|
12
11
|
width: 100%;
|
|
13
12
|
background: white;
|
|
14
13
|
z-index: 1005;
|
|
@@ -21,7 +20,8 @@ const AgreementDiv = styled.div`
|
|
|
21
20
|
const AgreementButton = styled.div`
|
|
22
21
|
position: relative;
|
|
23
22
|
top: 50%;
|
|
24
|
-
|
|
23
|
+
left: 50%;
|
|
24
|
+
transform: translate(-50%, -50%);
|
|
25
25
|
`
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -45,19 +45,17 @@ export const Agreement = () => {
|
|
|
45
45
|
<div className="container">
|
|
46
46
|
<div className="grid grid-between">
|
|
47
47
|
<div className="col col-lg col-11">
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Vivamus nunc lorem, ultricies vel tellus eget, molestie tristique
|
|
60
|
-
metus.
|
|
48
|
+
<p>
|
|
49
|
+
By clicking "I Agree", I affirm that I have the appropriate
|
|
50
|
+
institutional permissions to receive de-identified data for
|
|
51
|
+
secondary data analysis, and that neither I nor my collaborators
|
|
52
|
+
will attempt to reidentify individuals whose data are contained
|
|
53
|
+
in downloads from OpenNeuro. Further, if for any reason the
|
|
54
|
+
identity of participants contained in downloads from OpenNeuro
|
|
55
|
+
become known to me I will make no effort to recontact such
|
|
56
|
+
participants and will provide immediate notice to OpenNeuro
|
|
57
|
+
staff.
|
|
58
|
+
</p>
|
|
61
59
|
</div>
|
|
62
60
|
<div className="col col-lg col-1">
|
|
63
61
|
<AgreementButton
|
|
@@ -65,7 +63,7 @@ export const Agreement = () => {
|
|
|
65
63
|
onClick={() => setAgreed(true)}
|
|
66
64
|
role="button"
|
|
67
65
|
>
|
|
68
|
-
I
|
|
66
|
+
I Agree
|
|
69
67
|
</AgreementButton>
|
|
70
68
|
</div>
|
|
71
69
|
</div>
|
|
@@ -408,7 +408,7 @@ exports[`SnapshotContainer component > renders successfully 1`] = `
|
|
|
408
408
|
class="css-1dvuowd"
|
|
409
409
|
>
|
|
410
410
|
<span
|
|
411
|
-
class="css-
|
|
411
|
+
class="css-1mdlu11"
|
|
412
412
|
>
|
|
413
413
|
<span
|
|
414
414
|
class=" "
|
|
@@ -432,7 +432,31 @@ exports[`SnapshotContainer component > renders successfully 1`] = `
|
|
|
432
432
|
</span>
|
|
433
433
|
</span>
|
|
434
434
|
<span
|
|
435
|
-
class="css-
|
|
435
|
+
class="css-aokf2s"
|
|
436
|
+
>
|
|
437
|
+
<span
|
|
438
|
+
class=" "
|
|
439
|
+
data-flow="up"
|
|
440
|
+
data-tooltip="How to Download"
|
|
441
|
+
>
|
|
442
|
+
<a
|
|
443
|
+
href="/datasets/ds001032/versions/1.0.0/download"
|
|
444
|
+
>
|
|
445
|
+
<span
|
|
446
|
+
aria-label="Download"
|
|
447
|
+
class=" on-icon icon-text "
|
|
448
|
+
role="img"
|
|
449
|
+
>
|
|
450
|
+
<i
|
|
451
|
+
class="fa fa-download"
|
|
452
|
+
/>
|
|
453
|
+
Download
|
|
454
|
+
</span>
|
|
455
|
+
</a>
|
|
456
|
+
</span>
|
|
457
|
+
</span>
|
|
458
|
+
<span
|
|
459
|
+
class="css-1mdlu11"
|
|
436
460
|
>
|
|
437
461
|
<span
|
|
438
462
|
class=" "
|
|
@@ -7,6 +7,7 @@ import { useLocation } from "react-router-dom"
|
|
|
7
7
|
|
|
8
8
|
interface DatasetToolStyleProps {
|
|
9
9
|
active: boolean
|
|
10
|
+
disable: boolean
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export const DatasetToolStyle: StyledComponent<DatasetToolStyleProps> = styled
|
|
@@ -18,7 +19,10 @@ export const DatasetToolStyle: StyledComponent<DatasetToolStyleProps> = styled
|
|
|
18
19
|
padding: 0 15px;
|
|
19
20
|
justify-content: center;
|
|
20
21
|
a {
|
|
21
|
-
|
|
22
|
+
pointer-events: ${props.disable ? "none" : "auto"};
|
|
23
|
+
color: ${
|
|
24
|
+
props.disable ? "rgba(0, 0, 0, 0.5);" : "var(--current-theme-primary);"
|
|
25
|
+
}
|
|
22
26
|
font-size: 17px;
|
|
23
27
|
text-decoration: none;
|
|
24
28
|
font-weight: 400;
|
|
@@ -38,10 +42,20 @@ export const DatasetToolStyle: StyledComponent<DatasetToolStyleProps> = styled
|
|
|
38
42
|
`,
|
|
39
43
|
)
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
interface DatasetToolButtonProps {
|
|
46
|
+
path: string
|
|
47
|
+
label: string
|
|
48
|
+
tooltip: string
|
|
49
|
+
icon: string
|
|
50
|
+
disable?: boolean
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const DatasetToolButton = (
|
|
54
|
+
{ path, icon, tooltip, label, disable = false }: DatasetToolButtonProps,
|
|
55
|
+
) => {
|
|
42
56
|
const location = useLocation()
|
|
43
57
|
return (
|
|
44
|
-
<DatasetToolStyle active={location.pathname == path}>
|
|
58
|
+
<DatasetToolStyle active={location.pathname == path} disable={disable}>
|
|
45
59
|
<Tooltip tooltip={tooltip} flow="up">
|
|
46
60
|
<Link to={path}>
|
|
47
61
|
<Icon icon={`fa ${icon}`} label={label} />
|
|
@@ -98,16 +98,15 @@ export const DatasetTools = ({
|
|
|
98
98
|
label="Admin"
|
|
99
99
|
/>
|
|
100
100
|
)}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
)}
|
|
101
|
+
<DatasetToolButton
|
|
102
|
+
tooltip="How to Download"
|
|
103
|
+
path={snapshotId
|
|
104
|
+
? `/datasets/${datasetId}/versions/${snapshotId}/download`
|
|
105
|
+
: `/datasets/${datasetId}/download`}
|
|
106
|
+
icon="fa-download"
|
|
107
|
+
label="Download"
|
|
108
|
+
disable={!agree}
|
|
109
|
+
/>
|
|
111
110
|
{hasDerivatives && (
|
|
112
111
|
<DatasetToolButton
|
|
113
112
|
tooltip="Available Derivatives"
|