@openneuro/app 4.4.9 → 4.5.1
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/{refactor_2021/authentication → authentication}/__tests__/profile.spec.js +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/admin-user.jsx +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/logged-in.jsx +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/logged-out.jsx +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/loginCheck.js +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/loginUrls.ts +1 -1
- package/src/scripts/{refactor_2021/authentication → authentication}/profile.js +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/signOut.ts +0 -0
- package/src/scripts/{refactor_2021/authentication → authentication}/withProfile.jsx +0 -0
- package/src/scripts/{refactor_2021/common → common}/block-navigation.jsx +0 -0
- package/src/scripts/{refactor_2021 → common}/containers/footer.tsx +0 -0
- package/src/scripts/{refactor_2021 → common}/containers/header.tsx +17 -15
- package/src/scripts/{datalad/fragments → common/partials}/freshdesk-widget.jsx +1 -1
- package/src/scripts/common/partials/papaya.jsx +1 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/__snapshots__/comment.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/__snapshots__/comments.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/comment.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/__tests__/comments.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/block-style-controls.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/comment-editor.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/comment.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/comments.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/inline-style-controls.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/comments/style-button.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/dataset-query-context.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/dataset-query.jsx +15 -15
- package/src/scripts/{refactor_2021/dataset → dataset}/dataset-routes.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/__snapshots__/download-command-line.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/__snapshots__/download-link.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/__snapshots__/shell-example.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-command-line.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-link.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/download-native.spec.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/__tests__/shell-example.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-command-line.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-datalad.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-link.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-native.js +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-query.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/download-s3.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/download/native-file-toast.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/shell-example.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/download/track-download.js +0 -0
- package/src/scripts/dataset/draft-container.tsx +420 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/draft-snapshot-routes.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/__snapshots__/file-tree.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/__snapshots__/file.spec.jsx.snap +2 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree-loading.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree-unloaded-directory.spec.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-tree.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file-viewer-type.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/file.spec.jsx +11 -4
- package/src/scripts/{refactor_2021/dataset → dataset}/files/__tests__/flat-to-tree.spec.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-display.jsx +2 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree-loading.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree-unloaded-directory.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-tree.jsx +3 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-view.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/file-viewer-type.jsx +2 -0
- package/src/scripts/{refactor_2021/dataset/files/file.jsx → dataset/files/file.tsx} +30 -13
- package/src/scripts/{refactor_2021/dataset → dataset}/files/files.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/flat-to-tree.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/index.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/__tests__/__snapshots__/file-viewer-json.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/__tests__/file-viewer-json.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/__tests__/parse-tabular.spec.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-csv.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-html.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-json.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-nifti.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-table.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-text.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/file-viewer-tsv.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/files/viewers/parse-tabular.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/cancel-button.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/edit-button.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/edit-list.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/save-button.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/__snapshots__/select-input.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/cancel-button.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/dataset-alert-draft.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/dataset-citation.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/doi-link.spec.tsx +38 -8
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/edit-button.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/edit-list.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/save-button.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/__tests__/select-input.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/cancel-button.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/comments-fragments.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/copyable-tooltip.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-alert-draft.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-alert-version.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-citation.jsx +2 -4
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-history.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/dataset-reviewers.ts +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/doi-link.tsx +9 -6
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-button.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-description-field.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-description-list.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/edit-list.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/number-input.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/save-button.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/select-input.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/text-array-input.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/fragments/text-input.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/delete.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/deprecate-snapshot.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/deprecate-version.spec.tsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/description.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/__snapshots__/update-permissions.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/cache-id.spec.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/delete.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/deprecate-snapshot.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/deprecate-version.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/description.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/remove-permissions.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/__tests__/update-permissions.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/cache-clear.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/cache-id.js +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/comment.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/create-anonymous-reviewer.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/dataset-relations.tsx +2 -3
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-anonymous-reviewer.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-comment.jsx +2 -4
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-dataset-form.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-dir.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete-file.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/delete.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/deprecate-version.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/description.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/flag-annex-object.jsx +1 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/follow.tsx +2 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/import-dataset.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/metadata-form.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/publish.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/readme.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/remove-annex-object.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/remove-permissions.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/revalidate.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/snapshot.tsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/star.tsx +2 -2
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/submit-metadata.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/undo-deprecate-version.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/update-file.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/update-permissions.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/update-ref.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/__tests__/__snapshots__/publish.spec.jsx.snap +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/__tests__/publish.spec.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/add-metadata.jsx +1 -1
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/admin-datalad.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/admin-exports.jsx +3 -5
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/delete-page.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/deprecate-snapshot-page.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/download-dataset.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-anonymous-reviewers.tsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-permissions.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/publish.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/snapshot.jsx +0 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/snapshot-container.tsx +101 -115
- package/src/scripts/{refactor_2021 → errors}/freshdesk-widget.jsx +1 -1
- package/src/scripts/errors/freshdeskInterface.jsx +1 -1
- package/src/scripts/index.tsx +6 -6
- 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/{refactor_2021/user → pages}/api.jsx +2 -2
- package/src/scripts/pages/citation-page.tsx +1 -1
- package/src/scripts/{faq → pages/faq}/__tests__/__snapshots__/faq.spec.jsx.snap +1 -1
- package/src/scripts/{faq → pages/faq}/__tests__/faq.spec.jsx +0 -0
- package/src/scripts/{faq → pages/faq}/faq-content.js +3 -5
- package/src/scripts/{faq → pages/faq}/faq.jsx +1 -1
- package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/aggregate-counts-container.tsx +0 -0
- package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/use-participant-count.ts +0 -0
- package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/use-publicDatasets-count.ts +0 -0
- 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/pages/import-dataset.tsx +5 -5
- package/src/scripts/{pet/redirect.tsx → pages/pet-redirect.tsx} +0 -0
- package/src/scripts/{refactor_2021/routes.tsx → routes.tsx} +8 -8
- package/src/scripts/{refactor_2021/search → search}/__tests__/search-container.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/__tests__/search-params-ctx.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/es-query-builders.ts +0 -0
- package/src/scripts/{refactor_2021/search → search}/filters-block-container.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/initial-search-params.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/__tests__/sort-by-select.spec.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/admin-allDatasets-toggle.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/age-range-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/author-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/date-radios.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/diagnosis-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/index.ts +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/keyword-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/modality-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/bodyParts_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/scannerManufacturersModelNames_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/scannerManufacturers_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/tracerNames_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/pet/tracerRadionuclides_input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/section-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/sex-radios.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/show-datasets-radios.tsx +2 -4
- package/src/scripts/{refactor_2021/search → search}/inputs/sort-by-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/species-select.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/study-domain-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/subject-count-range-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/inputs/task-input.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/search-container.tsx +1 -1
- package/src/scripts/{refactor_2021/search → search}/search-params-ctx.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/search-routes.tsx +0 -0
- package/src/scripts/{refactor_2021/search → search}/use-search-results.tsx +0 -0
- package/src/scripts/test-utils.js +1 -1
- package/src/scripts/{refactor_2021/uploader → uploader}/add-path-to-files.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/file-select.tsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/file-upload.js +1 -1
- package/src/scripts/{refactor_2021/uploader → uploader}/input.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-button.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-disclaimer-input.tsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-disclaimer.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-file-status.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-issues.jsx +2 -1
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-metadata.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-mutation.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-progress-button.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-progress-class.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-progress.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-rename.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-resume.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-select.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-status.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/upload-step.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-context.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-location.js +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-modal.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-setup-routes.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-status-routes.jsx +0 -0
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader-view.jsx +1 -1
- package/src/scripts/{refactor_2021/uploader → uploader}/uploader.jsx +1 -1
- package/src/scripts/{refactor_2021/utils → utils}/cookies.js +0 -0
- package/src/scripts/{refactor_2021 → utils}/user-login-modal-ctx.tsx +1 -2
- package/src/scripts/{refactor_2021/validation → validation}/validation-panel.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation-results.issues.issue.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation-results.issues.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation-results.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation-status.jsx +0 -0
- package/src/scripts/{refactor_2021/validation → validation}/validation.jsx +1 -1
- 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/src/scripts/refactor_2021/common/partials/toast-content.jsx +0 -18
- package/src/scripts/refactor_2021/dataset/draft-container.tsx +0 -435
- package/src/scripts/refactor_2021/utils/datalad.js +0 -13
- package/src/scripts/refactor_2021/utils/gtag.js +0 -22
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { gql, useQuery } from '@apollo/client'
|
|
3
|
-
import DatasetQueryContext from '
|
|
3
|
+
import DatasetQueryContext from '../datalad/dataset/dataset-query-context.js'
|
|
4
4
|
import Markdown from 'markdown-to-jsx'
|
|
5
5
|
import { Link, useLocation } from 'react-router-dom'
|
|
6
6
|
import pluralize from 'pluralize'
|
|
@@ -9,7 +9,7 @@ import parseISO from 'date-fns/parseISO'
|
|
|
9
9
|
|
|
10
10
|
import Files from './files'
|
|
11
11
|
import Validation from '../validation/validation.jsx'
|
|
12
|
-
import { config } from '
|
|
12
|
+
import { config } from '../config'
|
|
13
13
|
import Comments from './comments/comments.jsx'
|
|
14
14
|
import DatasetCitation from './fragments/dataset-citation.jsx'
|
|
15
15
|
import { DatasetAlertVersion } from './fragments/dataset-alert-version'
|
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
CloneDropdown,
|
|
23
23
|
DatasetHeader,
|
|
24
24
|
DatasetHeaderMeta,
|
|
25
|
-
DatasetPage,
|
|
26
25
|
DatasetGitAccess,
|
|
27
26
|
VersionList,
|
|
28
27
|
DatasetTools,
|
|
@@ -41,7 +40,7 @@ import { ReadMore } from '@openneuro/components/read-more'
|
|
|
41
40
|
import { FollowDataset } from './mutations/follow'
|
|
42
41
|
import { StarDataset } from './mutations/star'
|
|
43
42
|
|
|
44
|
-
import { SNAPSHOT_FIELDS } from '
|
|
43
|
+
import { SNAPSHOT_FIELDS } from '../datalad/dataset/dataset-query-fragments.js'
|
|
45
44
|
import { DOILink } from './fragments/doi-link'
|
|
46
45
|
|
|
47
46
|
const formatDate = dateObject =>
|
|
@@ -88,35 +87,28 @@ const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
|
|
|
88
87
|
hasEditPermissions(dataset.permissions, profile?.sub) || isAdmin
|
|
89
88
|
const isDatasetAdmin =
|
|
90
89
|
hasDatasetAdminPermissions(dataset.permissions, profile?.sub) || isAdmin
|
|
90
|
+
const modality: string = summary?.modalities[0] || ''
|
|
91
91
|
|
|
92
92
|
return (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
reason={snapshot.deprecated.reason}
|
|
113
|
-
hasEdit={hasEdit}
|
|
114
|
-
/>
|
|
115
|
-
)}
|
|
116
|
-
</>
|
|
117
|
-
)}
|
|
118
|
-
renderHeaderMeta={() => (
|
|
119
|
-
<>
|
|
93
|
+
<div
|
|
94
|
+
className={`dataset dataset-draft dataset-page dataset-page-${modality?.toLowerCase()}`}>
|
|
95
|
+
{summary && (
|
|
96
|
+
<DatasetHeader
|
|
97
|
+
pageHeading={description.Name}
|
|
98
|
+
modality={summary?.modalities[0]}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
101
|
+
{snapshot?.deprecated && (
|
|
102
|
+
<DatasetAlertVersion
|
|
103
|
+
datasetId={dataset.id}
|
|
104
|
+
tag={snapshot.tag}
|
|
105
|
+
reason={snapshot.deprecated.reason}
|
|
106
|
+
hasEdit={hasEdit}
|
|
107
|
+
/>
|
|
108
|
+
)}
|
|
109
|
+
<div className="container">
|
|
110
|
+
<div className="grid grid-between dataset-header-meta">
|
|
111
|
+
<div className="col col-8 col-lg">
|
|
120
112
|
{summary && (
|
|
121
113
|
<DatasetHeaderMeta
|
|
122
114
|
size={summary.size}
|
|
@@ -124,10 +116,8 @@ const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
|
|
|
124
116
|
datasetId={datasetId}
|
|
125
117
|
/>
|
|
126
118
|
)}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
renderFollowBookmark={() => (
|
|
130
|
-
<>
|
|
119
|
+
</div>
|
|
120
|
+
<div className="col follow-bookmark">
|
|
131
121
|
<FollowDataset
|
|
132
122
|
profile={profile}
|
|
133
123
|
datasetId={dataset.id}
|
|
@@ -140,78 +130,79 @@ const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
|
|
|
140
130
|
starred={dataset.starred}
|
|
141
131
|
stars={dataset.stars.length}
|
|
142
132
|
/>
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
<div className="container">
|
|
137
|
+
<div className="grid grid-between">
|
|
138
|
+
<div className="col col-lg col-8">
|
|
139
|
+
<div className="dataset-validation">
|
|
140
|
+
<ValidationBlock>
|
|
141
|
+
<Validation datasetId={dataset.id} issues={snapshot.issues} />
|
|
142
|
+
</ValidationBlock>
|
|
143
|
+
<BrainLifeButton
|
|
144
|
+
datasetId={datasetId}
|
|
145
|
+
onBrainlife={snapshot.onBrainlife}
|
|
146
|
+
snapshotVersion={snapshot.tag}
|
|
147
|
+
/>
|
|
148
|
+
<CloneDropdown
|
|
149
|
+
gitAccess={
|
|
150
|
+
<DatasetGitAccess
|
|
151
|
+
hasEdit={hasEdit}
|
|
152
|
+
configGithub={config.github}
|
|
153
|
+
configUrl={config.url}
|
|
154
|
+
worker={dataset.worker}
|
|
155
|
+
datasetId={datasetId}
|
|
156
|
+
gitHash={snapshot.hexsha}
|
|
157
|
+
/>
|
|
158
|
+
}
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
<div className="dataset-tool-buttons">
|
|
162
|
+
<DatasetTools
|
|
161
163
|
hasEdit={hasEdit}
|
|
162
|
-
|
|
163
|
-
configUrl={config.url}
|
|
164
|
-
worker={dataset.worker}
|
|
164
|
+
isPublic={dataset.public}
|
|
165
165
|
datasetId={datasetId}
|
|
166
|
-
|
|
166
|
+
snapshotId={snapshot.tag}
|
|
167
|
+
isAdmin={isAdmin}
|
|
168
|
+
isDatasetAdmin={isDatasetAdmin}
|
|
167
169
|
/>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
170
|
+
</div>
|
|
171
|
+
<ReadMore
|
|
172
|
+
fileTree={true}
|
|
173
|
+
id="collapse-tree"
|
|
174
|
+
expandLabel="Read More"
|
|
175
|
+
collapseLabel="Collapse">
|
|
176
|
+
<Files
|
|
177
|
+
datasetId={datasetId}
|
|
178
|
+
snapshotTag={snapshot.tag}
|
|
179
|
+
datasetName={description.Name}
|
|
180
|
+
files={snapshot.files}
|
|
181
|
+
editMode={false}
|
|
182
|
+
datasetPermissions={dataset.permissions}
|
|
183
|
+
/>
|
|
184
|
+
</ReadMore>
|
|
185
|
+
<MetaDataBlock
|
|
186
|
+
heading="README"
|
|
187
|
+
item={
|
|
188
|
+
<ReadMore
|
|
189
|
+
id="readme"
|
|
190
|
+
expandLabel="Read More"
|
|
191
|
+
collapseLabel="Collapse">
|
|
192
|
+
<Markdown>
|
|
193
|
+
{snapshot.readme == null ? 'N/A' : snapshot.readme}
|
|
194
|
+
</Markdown>
|
|
195
|
+
</ReadMore>
|
|
196
|
+
}
|
|
197
|
+
className="dataset-readme markdown-body"
|
|
198
|
+
/>
|
|
199
|
+
<Comments
|
|
200
|
+
datasetId={dataset.id}
|
|
201
|
+
uploader={dataset.uploader}
|
|
202
|
+
comments={dataset.comments}
|
|
194
203
|
/>
|
|
195
|
-
</
|
|
196
|
-
|
|
197
|
-
renderReadMe={() => (
|
|
198
|
-
<MetaDataBlock
|
|
199
|
-
heading="README"
|
|
200
|
-
item={
|
|
201
|
-
<ReadMore
|
|
202
|
-
id="readme"
|
|
203
|
-
expandLabel="Read More"
|
|
204
|
-
collapseLabel="Collapse">
|
|
205
|
-
<Markdown>
|
|
206
|
-
{snapshot.readme == null ? 'N/A' : snapshot.readme}
|
|
207
|
-
</Markdown>
|
|
208
|
-
</ReadMore>
|
|
209
|
-
}
|
|
210
|
-
className="dataset-readme markdown-body"
|
|
211
|
-
/>
|
|
212
|
-
)}
|
|
213
|
-
renderSidebar={() => (
|
|
214
|
-
<>
|
|
204
|
+
</div>
|
|
205
|
+
<div className="col sidebar">
|
|
215
206
|
<MetaDataBlock
|
|
216
207
|
heading="Authors"
|
|
217
208
|
item={
|
|
@@ -337,7 +328,9 @@ const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
|
|
|
337
328
|
|
|
338
329
|
<MetaDataBlock
|
|
339
330
|
heading="Dataset DOI"
|
|
340
|
-
item={
|
|
331
|
+
item={
|
|
332
|
+
<DOILink DOI={description.DatasetDOI} datasetId={datasetId} />
|
|
333
|
+
}
|
|
341
334
|
/>
|
|
342
335
|
<MetaDataBlock heading="License" item={description.License} />
|
|
343
336
|
|
|
@@ -378,17 +371,10 @@ const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
|
|
|
378
371
|
item={description.EthicsApprovals}
|
|
379
372
|
className="dmb-list"
|
|
380
373
|
/>
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
datasetId={dataset.id}
|
|
386
|
-
uploader={dataset.uploader}
|
|
387
|
-
comments={dataset.comments}
|
|
388
|
-
/>
|
|
389
|
-
)}
|
|
390
|
-
/>
|
|
391
|
-
</>
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
</div>
|
|
392
378
|
)
|
|
393
379
|
}
|
|
394
380
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { useCookies } from 'react-cookie'
|
|
4
|
-
import { getProfile } from '
|
|
4
|
+
import { getProfile } from '../authentication/profile'
|
|
5
5
|
import { config } from '../config'
|
|
6
6
|
|
|
7
7
|
const buildCustomQuery = (customText, prepopulatedFields) => {
|
package/src/scripts/index.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import Uploader from './
|
|
3
|
-
import Routes from './
|
|
4
|
-
import HeaderContainer from './
|
|
5
|
-
import FooterContainer from './
|
|
6
|
-
import { SearchParamsProvider } from './
|
|
7
|
-
import { UserModalOpenProvider } from './
|
|
2
|
+
import Uploader from './uploader/uploader.jsx'
|
|
3
|
+
import Routes from './routes'
|
|
4
|
+
import HeaderContainer from './common/containers/header'
|
|
5
|
+
import FooterContainer from './common/containers/footer'
|
|
6
|
+
import { SearchParamsProvider } from './search/search-params-ctx'
|
|
7
|
+
import { UserModalOpenProvider } from './utils/user-login-modal-ctx'
|
|
8
8
|
|
|
9
9
|
import '../assets/email-header.png'
|
|
10
10
|
|
|
@@ -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 '../../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 '../../authentication/profile.js'
|
|
6
6
|
import { useCookies } from 'react-cookie'
|
|
7
7
|
import { USER_FRAGMENT } from './user-fragment'
|
|
8
8
|
|
|
File without changes
|
|
@@ -2,9 +2,9 @@ import React from 'react'
|
|
|
2
2
|
import { Loading } from '@openneuro/components/loading'
|
|
3
3
|
import { CopyToClipboard } from 'react-copy-to-clipboard'
|
|
4
4
|
import Helmet from 'react-helmet'
|
|
5
|
-
import { pageTitle } from '
|
|
5
|
+
import { pageTitle } from '../resources/strings.js'
|
|
6
6
|
import { Button } from '@openneuro/components/button'
|
|
7
|
-
import { config } from '
|
|
7
|
+
import { config } from '../config'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Create API Key
|
|
@@ -221,7 +221,7 @@ exports[`faq/faq/Faq renders successfully 1`] = `
|
|
|
221
221
|
<span>
|
|
222
222
|
We offer two options for uploading data onto OpenNeuro. The first is to upload via the web interface. The second is to upload via our
|
|
223
223
|
<a
|
|
224
|
-
href="https://docs.openneuro.org/packages-openneuro-cli-readme"
|
|
224
|
+
href="https://docs.openneuro.org/openneuro-packages-openneuro-cli-readme"
|
|
225
225
|
>
|
|
226
226
|
command-line utility tool
|
|
227
227
|
</a>
|
|
File without changes
|
|
@@ -48,8 +48,7 @@ export const faq = [
|
|
|
48
48
|
'[Ultimate consent form GDPR edition](https://open-brain-consent.readthedocs.io/en/stable/gdpr/ultimate_gdpr.html).',
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
faq:
|
|
52
|
-
'Do I need to format my data in some special way before uploading it to OpenNeuro?',
|
|
51
|
+
faq: 'Do I need to format my data in some special way before uploading it to OpenNeuro?',
|
|
53
52
|
answer:
|
|
54
53
|
'Yes! OpenNeuro only accepts data in the Brain Imaging Data Structure ' +
|
|
55
54
|
'(BIDS) format. You can read about it more at ' +
|
|
@@ -58,8 +57,7 @@ export const faq = [
|
|
|
58
57
|
'post them at [neurostars.org](https://neurostars.org/tags/bids).',
|
|
59
58
|
},
|
|
60
59
|
{
|
|
61
|
-
faq:
|
|
62
|
-
'Do I need to remove facial features from structural images before uploading the data?',
|
|
60
|
+
faq: 'Do I need to remove facial features from structural images before uploading the data?',
|
|
63
61
|
answer:
|
|
64
62
|
'OpenNeuro does not accept datasets that have not been defaced for ' +
|
|
65
63
|
'privacy considerations. Datasets found to not have been defaced will ' +
|
|
@@ -80,7 +78,7 @@ export const faq = [
|
|
|
80
78
|
answer:
|
|
81
79
|
'We offer two options for uploading data onto OpenNeuro. ' +
|
|
82
80
|
'The first is to upload via the web interface. ' +
|
|
83
|
-
'The second is to upload via our [command-line utility tool](https://docs.openneuro.org/packages-openneuro-cli-readme)',
|
|
81
|
+
'The second is to upload via our [command-line utility tool](https://docs.openneuro.org/openneuro-packages-openneuro-cli-readme)',
|
|
84
82
|
},
|
|
85
83
|
{
|
|
86
84
|
faq: 'Why can I not use CC-BY (or other CC license)?',
|
|
@@ -4,7 +4,7 @@ import React from 'react'
|
|
|
4
4
|
import Markdown from 'markdown-to-jsx'
|
|
5
5
|
import { faq } from './faq-content'
|
|
6
6
|
import Helmet from 'react-helmet'
|
|
7
|
-
import { pageTitle } from '
|
|
7
|
+
import { pageTitle } from '../../resources/strings.js'
|
|
8
8
|
|
|
9
9
|
class Faq extends React.Component {
|
|
10
10
|
render() {
|
|
File without changes
|
package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/use-participant-count.ts
RENAMED
|
File without changes
|
package/src/scripts/{refactor_2021 → pages/front-page}/aggregate-queries/use-publicDatasets-count.ts
RENAMED
|
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
|
+
)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import styled from '@emotion/styled'
|
|
3
|
-
import { ImportDatasetMutation } from '../
|
|
3
|
+
import { ImportDatasetMutation } from '../dataset/mutations/import-dataset'
|
|
4
4
|
import { useLocation } from 'react-router-dom'
|
|
5
|
-
import LoggedIn from '../
|
|
6
|
-
import LoggedOut from '../
|
|
7
|
-
import { testAffirmed } from '../
|
|
8
|
-
import { UploadDisclaimerInput } from '../
|
|
5
|
+
import LoggedIn from '../authentication/logged-in'
|
|
6
|
+
import LoggedOut from '../authentication/logged-out'
|
|
7
|
+
import { testAffirmed } from '../uploader/upload-disclaimer'
|
|
8
|
+
import { UploadDisclaimerInput } from '../uploader/upload-disclaimer-input'
|
|
9
9
|
|
|
10
10
|
function useQuery() {
|
|
11
11
|
const { search } = useLocation()
|
|
File without changes
|