@openneuro/app 4.5.0 → 4.6.0-alpha.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/{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/datalad/dataset/dataset-query-fragments.js +2 -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/dataset/dataset-routes.jsx +39 -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/{refactor_2021/dataset → dataset}/draft-container.tsx +15 -53
- 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 +0 -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 +0 -0
- 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/dataset/fragments/dataset-history.jsx +99 -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 +0 -0
- 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/dataset/mutations/admin-exports.jsx +70 -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 -3
- package/src/scripts/{refactor_2021/dataset → dataset}/mutations/dataset-relations.tsx +4 -15
- 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 +1 -1
- 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 -1
- 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 +17 -3
- 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 +21 -25
- package/src/scripts/dataset/routes/admin-datalad.jsx +40 -0
- package/src/scripts/dataset/routes/dataset-default.tsx +54 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/delete-page.tsx +5 -9
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/deprecate-snapshot-page.tsx +6 -7
- package/src/scripts/dataset/routes/download-dataset.tsx +53 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-anonymous-reviewers.tsx +9 -3
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/manage-permissions.jsx +7 -10
- package/src/scripts/{refactor_2021/dataset → dataset}/routes/publish.jsx +10 -12
- package/src/scripts/dataset/routes/snapshot-default.tsx +44 -0
- package/src/scripts/dataset/routes/snapshot.jsx +148 -0
- package/src/scripts/dataset/routes/styles/dataset-page-border.tsx +8 -0
- package/src/scripts/dataset/routes/styles/dataset-page-tab-container.tsx +8 -0
- package/src/scripts/dataset/routes/styles/draft-background.tsx +7 -0
- package/src/scripts/dataset/routes/styles/header-row.tsx +12 -0
- package/src/scripts/dataset/routes/tab-routes-draft.tsx +88 -0
- package/src/scripts/dataset/routes/tab-routes-snapshot.tsx +57 -0
- package/src/scripts/{refactor_2021/dataset → dataset}/snapshot-container.tsx +9 -42
- package/src/scripts/{refactor_2021 → errors}/freshdesk-widget.jsx +1 -1
- package/src/scripts/errors/freshdeskInterface.jsx +1 -1
- package/src/scripts/index.tsx +5 -5
- package/src/scripts/pages/admin/admin.jsx +1 -1
- package/src/scripts/pages/admin/user-tools.tsx +1 -1
- package/src/scripts/{refactor_2021/user → pages}/api.jsx +2 -2
- 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/pages/import-dataset.tsx +5 -5
- package/src/scripts/routes.tsx +3 -3
- 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 +1 -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 +1 -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/refactor_2021/common/partials/toast-content.jsx +0 -18
- package/src/scripts/refactor_2021/dataset/dataset-routes.jsx +0 -163
- package/src/scripts/refactor_2021/dataset/fragments/dataset-history.jsx +0 -103
- package/src/scripts/refactor_2021/dataset/routes/admin-datalad.jsx +0 -47
- package/src/scripts/refactor_2021/dataset/routes/admin-exports.jsx +0 -132
- package/src/scripts/refactor_2021/dataset/routes/download-dataset.tsx +0 -76
- package/src/scripts/refactor_2021/dataset/routes/snapshot.jsx +0 -139
- package/src/scripts/refactor_2021/utils/datalad.js +0 -13
- package/src/scripts/refactor_2021/utils/gtag.js +0 -22
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { gql, useMutation } from '@apollo/client'
|
|
4
4
|
import { useHistory } from 'react-router-dom'
|
|
5
|
-
import ErrorBoundary from '
|
|
5
|
+
import ErrorBoundary from '../../errors/errorBoundary.jsx'
|
|
6
6
|
import { Button } from '@openneuro/components/button'
|
|
7
7
|
|
|
8
8
|
const CREATE_SNAPSHOT = gql`
|
|
@@ -18,12 +18,14 @@ interface CreateSnapshotMutationProps {
|
|
|
18
18
|
datasetId: string
|
|
19
19
|
tag: string
|
|
20
20
|
changes: Array<string>
|
|
21
|
+
disabled: boolean
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
const CreateSnapshotMutation = ({
|
|
24
25
|
datasetId,
|
|
25
26
|
tag,
|
|
26
27
|
changes,
|
|
28
|
+
disabled,
|
|
27
29
|
}: CreateSnapshotMutationProps) => {
|
|
28
30
|
const history = useHistory()
|
|
29
31
|
const [snapshotDataset, { loading, error }] = useMutation(CREATE_SNAPSHOT)
|
|
@@ -42,6 +44,7 @@ const CreateSnapshotMutation = ({
|
|
|
42
44
|
variables: { datasetId, tag, changes },
|
|
43
45
|
}).then(() => history.push(`/datasets/${datasetId}/versions/${tag}`))
|
|
44
46
|
}}
|
|
47
|
+
disabled={disabled}
|
|
45
48
|
label="Create Version"
|
|
46
49
|
/>
|
|
47
50
|
)
|
|
@@ -52,11 +55,22 @@ interface SnapshotDatasetProps {
|
|
|
52
55
|
datasetId: string
|
|
53
56
|
tag: string
|
|
54
57
|
changes: Array<string>
|
|
58
|
+
disabled: boolean
|
|
55
59
|
}
|
|
56
60
|
|
|
57
|
-
const SnapshotDataset = ({
|
|
61
|
+
const SnapshotDataset = ({
|
|
62
|
+
datasetId,
|
|
63
|
+
tag,
|
|
64
|
+
changes,
|
|
65
|
+
disabled,
|
|
66
|
+
}: SnapshotDatasetProps) => (
|
|
58
67
|
<ErrorBoundary subject="error creating version">
|
|
59
|
-
<CreateSnapshotMutation
|
|
68
|
+
<CreateSnapshotMutation
|
|
69
|
+
datasetId={datasetId}
|
|
70
|
+
tag={tag}
|
|
71
|
+
changes={changes}
|
|
72
|
+
disabled={disabled}
|
|
73
|
+
/>
|
|
60
74
|
</ErrorBoundary>
|
|
61
75
|
)
|
|
62
76
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { FC, useContext } from 'react'
|
|
2
2
|
import { gql } from '@apollo/client'
|
|
3
3
|
import { Mutation } from '@apollo/client/react/components'
|
|
4
|
-
import { datasetCacheId } from '
|
|
4
|
+
import { datasetCacheId } from '../../datalad/mutations/cache-id.js'
|
|
5
5
|
import { CountToggle } from '@openneuro/components/count-toggle'
|
|
6
|
-
import { UserModalOpenCtx } from '../../user-login-modal-ctx'
|
|
6
|
+
import { UserModalOpenCtx } from '../../utils/user-login-modal-ctx'
|
|
7
7
|
|
|
8
8
|
const STAR_DATASET = gql`
|
|
9
9
|
mutation starDataset($datasetId: ID!) {
|
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import { gql } from '@apollo/client'
|
|
4
4
|
import { Mutation } from '@apollo/client/react/components'
|
|
5
|
-
import { DATASET_METADATA } from '
|
|
5
|
+
import { DATASET_METADATA } from '../../datalad/dataset/dataset-query-fragments'
|
|
6
6
|
import { datasetCacheId } from './cache-id.js'
|
|
7
7
|
import { Button } from '@openneuro/components/button'
|
|
8
8
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
-
import {
|
|
3
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
4
4
|
import { useCookies } from 'react-cookie'
|
|
5
5
|
import MetadataForm from '../mutations/metadata-form.jsx'
|
|
6
6
|
import { DatasetRelations } from '../mutations/dataset-relations'
|
|
7
7
|
import SubmitMetadata from '../mutations/submit-metadata.jsx'
|
|
8
8
|
import LoggedIn from '../../authentication/logged-in.jsx'
|
|
9
9
|
import { hasEditPermissions, getProfile } from '../../authentication/profile.js'
|
|
10
|
-
import { getDatasetUrl } from '
|
|
10
|
+
import { getDatasetUrl } from '../../utils/dataset-url'
|
|
11
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
12
|
+
import { HeaderRow3, HeaderRow4 } from './styles/header-row'
|
|
11
13
|
|
|
12
14
|
export const compileMetadata = dataset => {
|
|
13
15
|
const getFromMetadata = key => dataset.metadata && dataset.metadata[key]
|
|
@@ -119,25 +121,15 @@ const AddMetadata = ({ dataset }) => {
|
|
|
119
121
|
hasEditPermissions(dataset.permissions, user && user.sub)
|
|
120
122
|
|
|
121
123
|
return (
|
|
122
|
-
<
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
hideDisabled={false}
|
|
132
|
-
hasEdit={hasEdit}
|
|
133
|
-
validationErrors={validationErrors}
|
|
134
|
-
/>
|
|
135
|
-
{hasEdit && (
|
|
136
|
-
<div className="col col-6">
|
|
137
|
-
<DatasetRelations datasetId={dataset.id} hasEdit={hasEdit} />
|
|
138
|
-
</div>
|
|
139
|
-
)}
|
|
140
|
-
</div>
|
|
124
|
+
<DatasetPageBorder className="metadata-form">
|
|
125
|
+
<HeaderRow3>{hasEdit && 'Add '}Metadata</HeaderRow3>
|
|
126
|
+
<MetadataForm
|
|
127
|
+
values={values}
|
|
128
|
+
onChange={handleInputChange}
|
|
129
|
+
hideDisabled={false}
|
|
130
|
+
hasEdit={hasEdit}
|
|
131
|
+
validationErrors={validationErrors}
|
|
132
|
+
/>
|
|
141
133
|
<div className="dataset-form-controls ">
|
|
142
134
|
{hasEdit && (
|
|
143
135
|
<LoggedIn>
|
|
@@ -149,11 +141,15 @@ const AddMetadata = ({ dataset }) => {
|
|
|
149
141
|
/>
|
|
150
142
|
</LoggedIn>
|
|
151
143
|
)}
|
|
152
|
-
<Link className="return-link " to={`/datasets/${dataset.id}`}>
|
|
153
|
-
Return to Dataset
|
|
154
|
-
</Link>
|
|
155
144
|
</div>
|
|
156
|
-
|
|
145
|
+
<hr />
|
|
146
|
+
{hasEdit && (
|
|
147
|
+
<>
|
|
148
|
+
<HeaderRow4>Relations</HeaderRow4>
|
|
149
|
+
<DatasetRelations datasetId={dataset.id} hasEdit={hasEdit} />
|
|
150
|
+
</>
|
|
151
|
+
)}
|
|
152
|
+
</DatasetPageBorder>
|
|
157
153
|
)
|
|
158
154
|
}
|
|
159
155
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import DatasetHistory from '../fragments/dataset-history.jsx'
|
|
4
|
+
import CacheClear from '../mutations/cache-clear.jsx'
|
|
5
|
+
import AdminExports from '../mutations/admin-exports'
|
|
6
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
7
|
+
import { HeaderRow3, HeaderRow4 } from './styles/header-row'
|
|
8
|
+
|
|
9
|
+
const AdminDataset = ({ dataset }) => (
|
|
10
|
+
<DatasetPageBorder className="datalad-dataset-form">
|
|
11
|
+
<HeaderRow3>Site Admin Tools</HeaderRow3>
|
|
12
|
+
<p>
|
|
13
|
+
Delete dataset cache drops this dataset's caches (snapshot index,
|
|
14
|
+
draft/snapshot file listings, current dataset description) and the cache
|
|
15
|
+
is repopulated on the next API call.
|
|
16
|
+
</p>
|
|
17
|
+
<div className="dataset-form-controls">
|
|
18
|
+
<CacheClear datasetId={dataset.id} />
|
|
19
|
+
</div>
|
|
20
|
+
<hr />
|
|
21
|
+
<HeaderRow4>Rerun Exports</HeaderRow4>
|
|
22
|
+
<p>
|
|
23
|
+
Correct most temporary issues with a dataset export by reattempting to
|
|
24
|
+
push to S3 and GitHub.
|
|
25
|
+
</p>
|
|
26
|
+
<div className="dataset-form-controls">
|
|
27
|
+
<AdminExports />
|
|
28
|
+
</div>
|
|
29
|
+
<hr />
|
|
30
|
+
<HeaderRow4>Draft Head</HeaderRow4>
|
|
31
|
+
{dataset.draft.head}
|
|
32
|
+
<DatasetHistory datasetId={dataset.id} />
|
|
33
|
+
</DatasetPageBorder>
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
AdminDataset.propTypes = {
|
|
37
|
+
dataset: PropTypes.object,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default AdminDataset
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Markdown from 'markdown-to-jsx'
|
|
3
|
+
import { ReadMore } from '@openneuro/components/read-more'
|
|
4
|
+
import { MetaDataBlock } from '@openneuro/components/dataset'
|
|
5
|
+
import Files from '../files/files'
|
|
6
|
+
import Comments from '../comments/comments'
|
|
7
|
+
import EditDescriptionField from '../fragments/edit-description-field'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Default tab for dataset draft pages
|
|
11
|
+
*/
|
|
12
|
+
export const DatasetDefault = ({ dataset, hasEdit }) => (
|
|
13
|
+
<>
|
|
14
|
+
<ReadMore
|
|
15
|
+
fileTree={true}
|
|
16
|
+
id="collapse-tree"
|
|
17
|
+
expandLabel="Expand File Tree"
|
|
18
|
+
collapseLabel="Collapse File Tree">
|
|
19
|
+
<Files
|
|
20
|
+
datasetId={dataset.id}
|
|
21
|
+
snapshotTag={null}
|
|
22
|
+
datasetName={dataset.draft.description.Name}
|
|
23
|
+
files={dataset.draft.files}
|
|
24
|
+
editMode={hasEdit}
|
|
25
|
+
datasetPermissions={dataset.permissions}
|
|
26
|
+
/>
|
|
27
|
+
</ReadMore>
|
|
28
|
+
<MetaDataBlock
|
|
29
|
+
heading="README"
|
|
30
|
+
className="dataset-readme markdown-body"
|
|
31
|
+
item={dataset.draft.readme}
|
|
32
|
+
renderEditor={() => (
|
|
33
|
+
<EditDescriptionField
|
|
34
|
+
datasetId={dataset.id}
|
|
35
|
+
field="readme"
|
|
36
|
+
rows={12}
|
|
37
|
+
description={dataset.draft.readme}
|
|
38
|
+
editMode={hasEdit}>
|
|
39
|
+
<ReadMore
|
|
40
|
+
id="readme"
|
|
41
|
+
expandLabel="Read More"
|
|
42
|
+
collapseLabel="Collapse">
|
|
43
|
+
<Markdown>{dataset.draft.readme || 'N/A'}</Markdown>
|
|
44
|
+
</ReadMore>
|
|
45
|
+
</EditDescriptionField>
|
|
46
|
+
)}
|
|
47
|
+
/>
|
|
48
|
+
<Comments
|
|
49
|
+
datasetId={dataset.id}
|
|
50
|
+
uploader={dataset.uploader}
|
|
51
|
+
comments={dataset.comments}
|
|
52
|
+
/>
|
|
53
|
+
</>
|
|
54
|
+
)
|
|
@@ -6,8 +6,8 @@ import DeleteDatasetForm from '../mutations/delete-dataset-form.jsx'
|
|
|
6
6
|
import DeleteDataset from '../mutations/delete.jsx'
|
|
7
7
|
import LoggedIn from '../../authentication/logged-in.jsx'
|
|
8
8
|
import { hasEditPermissions, getProfile } from '../../authentication/profile.js'
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
9
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
10
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
11
11
|
|
|
12
12
|
interface DeletePageProps extends RouteComponentProps {
|
|
13
13
|
dataset: {
|
|
@@ -35,9 +35,8 @@ const DeletePage = ({ dataset }: DeletePageProps): React.ReactElement => {
|
|
|
35
35
|
hasEditPermissions(dataset.permissions, user && user.sub)
|
|
36
36
|
const datasetId = dataset.id
|
|
37
37
|
return (
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
<hr />
|
|
38
|
+
<DatasetPageBorder>
|
|
39
|
+
<HeaderRow3>Delete Dataset</HeaderRow3>
|
|
41
40
|
<DeleteDatasetForm
|
|
42
41
|
values={values}
|
|
43
42
|
onChange={handleInputChange}
|
|
@@ -54,11 +53,8 @@ const DeletePage = ({ dataset }: DeletePageProps): React.ReactElement => {
|
|
|
54
53
|
<LoggedIn>
|
|
55
54
|
<DeleteDataset datasetId={datasetId} metadata={values} />
|
|
56
55
|
</LoggedIn>
|
|
57
|
-
<Link className="return-link" to={`/datasets/${datasetId}`}>
|
|
58
|
-
Return to Dataset
|
|
59
|
-
</Link>
|
|
60
56
|
</div>
|
|
61
|
-
</
|
|
57
|
+
</DatasetPageBorder>
|
|
62
58
|
)
|
|
63
59
|
}
|
|
64
60
|
|
|
@@ -3,6 +3,8 @@ import { Link, useRouteMatch } from 'react-router-dom'
|
|
|
3
3
|
import { DeprecateVersion } from '../mutations/deprecate-version'
|
|
4
4
|
import { Input } from '@openneuro/components/input'
|
|
5
5
|
import LoggedIn from '../../authentication/logged-in.jsx'
|
|
6
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
7
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
6
8
|
|
|
7
9
|
interface DeprecateSnapshotRouteParams {
|
|
8
10
|
datasetId: string
|
|
@@ -16,8 +18,8 @@ export const DeprecateSnapshotPage = (): React.ReactElement => {
|
|
|
16
18
|
const [reason, setReason] = useState('')
|
|
17
19
|
|
|
18
20
|
return (
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
+
<DatasetPageBorder>
|
|
22
|
+
<HeaderRow3>Deprecate Version</HeaderRow3>
|
|
21
23
|
<p>
|
|
22
24
|
{`Deprecate ${datasetId} version ${snapshotTag} to let other users know about an issue with this version. The reason provided will be displayed for users visiting the version.`}
|
|
23
25
|
</p>
|
|
@@ -28,7 +30,7 @@ export const DeprecateSnapshotPage = (): React.ReactElement => {
|
|
|
28
30
|
labelStyle="default"
|
|
29
31
|
setValue={setReason}
|
|
30
32
|
/>
|
|
31
|
-
<
|
|
33
|
+
<br />
|
|
32
34
|
<div className="dataset-form-controls">
|
|
33
35
|
<LoggedIn>
|
|
34
36
|
<DeprecateVersion
|
|
@@ -37,10 +39,7 @@ export const DeprecateSnapshotPage = (): React.ReactElement => {
|
|
|
37
39
|
reason={reason}
|
|
38
40
|
/>
|
|
39
41
|
</LoggedIn>
|
|
40
|
-
<Link className="return-link" to={`/datasets/${datasetId}`}>
|
|
41
|
-
Return to Dataset
|
|
42
|
-
</Link>
|
|
43
42
|
</div>
|
|
44
|
-
</
|
|
43
|
+
</DatasetPageBorder>
|
|
45
44
|
)
|
|
46
45
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* global globalThis */
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import PropTypes from 'prop-types'
|
|
4
|
+
import { useRouteMatch } from 'react-router-dom'
|
|
5
|
+
import DownloadLink from '../download/download-link.jsx'
|
|
6
|
+
import DownloadS3 from '../download/download-s3.jsx'
|
|
7
|
+
import DownloadCommandLine from '../download/download-command-line.jsx'
|
|
8
|
+
import DownloadDatalad from '../download/download-datalad.jsx'
|
|
9
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
10
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
11
|
+
|
|
12
|
+
interface SnapshotRouteParams {
|
|
13
|
+
datasetId?: string
|
|
14
|
+
snapshotId?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const DownloadDataset = ({ worker, datasetPermissions }) => {
|
|
18
|
+
const {
|
|
19
|
+
params: { datasetId, snapshotId: snapshotTag },
|
|
20
|
+
} = useRouteMatch<SnapshotRouteParams>()
|
|
21
|
+
const workerId = worker?.split('-').pop()
|
|
22
|
+
return (
|
|
23
|
+
<DatasetPageBorder>
|
|
24
|
+
<HeaderRow3>How to Download</HeaderRow3>
|
|
25
|
+
<div className="grid grid-between">
|
|
26
|
+
{'showDirectoryPicker' in globalThis ? (
|
|
27
|
+
<DownloadLink datasetId={datasetId} snapshotTag={snapshotTag} />
|
|
28
|
+
) : (
|
|
29
|
+
<DownloadCommandLine
|
|
30
|
+
datasetId={datasetId}
|
|
31
|
+
snapshotTag={snapshotTag}
|
|
32
|
+
/>
|
|
33
|
+
)}
|
|
34
|
+
<DownloadS3 datasetId={datasetId} />
|
|
35
|
+
</div>
|
|
36
|
+
{'showDirectoryPicker' in globalThis && (
|
|
37
|
+
<DownloadCommandLine datasetId={datasetId} snapshotTag={snapshotTag} />
|
|
38
|
+
)}
|
|
39
|
+
<DownloadDatalad
|
|
40
|
+
datasetId={datasetId}
|
|
41
|
+
workerId={workerId}
|
|
42
|
+
datasetPermissions={datasetPermissions}
|
|
43
|
+
/>
|
|
44
|
+
</DatasetPageBorder>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
DownloadDataset.propTypes = {
|
|
49
|
+
worker: PropTypes.string,
|
|
50
|
+
datasetPermissions: PropTypes.object,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default DownloadDataset
|
|
@@ -2,6 +2,8 @@ import React, { FC } from 'react'
|
|
|
2
2
|
|
|
3
3
|
import { DeleteReviewerLink } from '../mutations/delete-anonymous-reviewer'
|
|
4
4
|
import { CreateReviewLink } from '../mutations/create-anonymous-reviewer'
|
|
5
|
+
import { HeaderRow4 } from './styles/header-row'
|
|
6
|
+
|
|
5
7
|
const formatDate = dateObject =>
|
|
6
8
|
new Date(dateObject).toISOString().split('T')[0]
|
|
7
9
|
|
|
@@ -18,12 +20,16 @@ export const AnonymousReviewer: FC<AnonymousReviewerProps> = ({
|
|
|
18
20
|
reviewers,
|
|
19
21
|
}) => {
|
|
20
22
|
return (
|
|
21
|
-
<div className="dataset-anonymous-form
|
|
23
|
+
<div className="dataset-anonymous-form">
|
|
22
24
|
<div className="dataset-form-header">
|
|
23
25
|
<div className="form-group">
|
|
24
|
-
<
|
|
26
|
+
<HeaderRow4>Create Anonymous Reviewer Link</HeaderRow4>
|
|
27
|
+
<p>
|
|
28
|
+
Create an anonymous review link to share this dataset for anonymous
|
|
29
|
+
access. A review user has read only access and tokens are valid for
|
|
30
|
+
one year or until they are removed.
|
|
31
|
+
</p>
|
|
25
32
|
</div>
|
|
26
|
-
<hr />
|
|
27
33
|
<CreateReviewLink datasetId={datasetId} />
|
|
28
34
|
{reviewers.length ? (
|
|
29
35
|
<div className="dataset-form-body">
|
|
@@ -6,6 +6,8 @@ import { Button } from '@openneuro/components/button'
|
|
|
6
6
|
import { RemovePermissions } from '../mutations/remove-permissions'
|
|
7
7
|
import { UpdateDatasetPermissions } from '../mutations/update-permissions'
|
|
8
8
|
import { AnonymousReviewer } from './manage-anonymous-reviewers'
|
|
9
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
10
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
9
11
|
|
|
10
12
|
const description = {
|
|
11
13
|
admin: 'Edit dataset and edit permissions',
|
|
@@ -71,15 +73,13 @@ const Share = ({ datasetId, permissions, reviewers }) => {
|
|
|
71
73
|
const adminActive = access === 'admin' && 'active'
|
|
72
74
|
|
|
73
75
|
return (
|
|
74
|
-
|
|
75
|
-
<div className="dataset-share-form
|
|
76
|
+
<DatasetPageBorder>
|
|
77
|
+
<div className="dataset-share-form">
|
|
76
78
|
<div className="dataset-form-header">
|
|
77
79
|
<div className="form-group">
|
|
78
|
-
<
|
|
80
|
+
<HeaderRow3>Share Dataset</HeaderRow3>
|
|
79
81
|
</div>
|
|
80
|
-
<hr />
|
|
81
82
|
<div className="dataset-form-body">
|
|
82
|
-
<h3>Dataset shared with:</h3>
|
|
83
83
|
<ShareTable datasetId={datasetId} permissions={permissions} />
|
|
84
84
|
<p>
|
|
85
85
|
Enter a user's email address and select access level to share
|
|
@@ -123,15 +123,12 @@ const Share = ({ datasetId, permissions, reviewers }) => {
|
|
|
123
123
|
metadata={access}
|
|
124
124
|
done={() => setUserEmail('')}
|
|
125
125
|
/>
|
|
126
|
-
<Link className="return-link" to={`/datasets/${datasetId}`}>
|
|
127
|
-
Return to Dataset
|
|
128
|
-
</Link>
|
|
129
126
|
</div>
|
|
130
127
|
</div>
|
|
131
128
|
</div>
|
|
132
|
-
<
|
|
129
|
+
<hr />
|
|
133
130
|
<AnonymousReviewer datasetId={datasetId} reviewers={reviewers} />
|
|
134
|
-
|
|
131
|
+
</DatasetPageBorder>
|
|
135
132
|
)
|
|
136
133
|
}
|
|
137
134
|
|
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
-
import {
|
|
3
|
+
import { Redirect } from 'react-router-dom'
|
|
4
4
|
import PublishDataset from '../mutations/publish.jsx'
|
|
5
|
-
import {
|
|
5
|
+
import { DatasetPageBorder } from './styles/dataset-page-border'
|
|
6
|
+
import { HeaderRow3 } from './styles/header-row'
|
|
7
|
+
|
|
6
8
|
const hasExpectedMetadata = metadata =>
|
|
7
9
|
typeof metadata === 'object' && metadata !== null
|
|
8
10
|
|
|
9
11
|
const Publish = ({ datasetId, metadata }) =>
|
|
10
12
|
hasExpectedMetadata(metadata) ? (
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
<div className="col-xs-12 dataset-form-body">
|
|
13
|
+
<DatasetPageBorder className="dataset-form">
|
|
14
|
+
<HeaderRow3>Publish</HeaderRow3>
|
|
15
|
+
<div className="dataset-form-body">
|
|
15
16
|
<p className="text-danger">
|
|
16
17
|
All existing and future snapshots of this dataset will be released
|
|
17
18
|
publicly under a{' '}
|
|
18
19
|
<a href="https://wiki.creativecommons.org/wiki/CC0">CC0 license</a>.
|
|
19
20
|
</p>
|
|
20
21
|
</div>
|
|
21
|
-
<div className="
|
|
22
|
-
<div className="
|
|
22
|
+
<div className="dataset-form-controls">
|
|
23
|
+
<div className="modal-actions">
|
|
23
24
|
<PublishDataset datasetId={datasetId} />
|
|
24
|
-
<Link to={`/datasets/${datasetId}`}>
|
|
25
|
-
<Button nobg={true} label="Return to Dataset" />
|
|
26
|
-
</Link>
|
|
27
25
|
</div>
|
|
28
26
|
</div>
|
|
29
|
-
</
|
|
27
|
+
</DatasetPageBorder>
|
|
30
28
|
) : (
|
|
31
29
|
<Redirect
|
|
32
30
|
to={{
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Markdown from 'markdown-to-jsx'
|
|
3
|
+
import { ReadMore } from '@openneuro/components/read-more'
|
|
4
|
+
import { MetaDataBlock } from '@openneuro/components/dataset'
|
|
5
|
+
import Files from '../files/files'
|
|
6
|
+
import Comments from '../comments/comments'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Default tab for snapshot pages
|
|
10
|
+
*/
|
|
11
|
+
export const SnapshotDefault = ({ dataset, snapshot }) => (
|
|
12
|
+
<>
|
|
13
|
+
<ReadMore
|
|
14
|
+
fileTree={true}
|
|
15
|
+
id="collapse-tree"
|
|
16
|
+
expandLabel="Read More"
|
|
17
|
+
collapseLabel="Collapse">
|
|
18
|
+
<Files
|
|
19
|
+
datasetId={dataset.id}
|
|
20
|
+
snapshotTag={snapshot.tag}
|
|
21
|
+
datasetName={snapshot.description.Name}
|
|
22
|
+
files={snapshot.files}
|
|
23
|
+
editMode={false}
|
|
24
|
+
datasetPermissions={dataset.permissions}
|
|
25
|
+
/>
|
|
26
|
+
</ReadMore>
|
|
27
|
+
<MetaDataBlock
|
|
28
|
+
heading="README"
|
|
29
|
+
item={
|
|
30
|
+
<ReadMore id="readme" expandLabel="Read More" collapseLabel="Collapse">
|
|
31
|
+
<Markdown>
|
|
32
|
+
{snapshot.readme == null ? 'N/A' : snapshot.readme}
|
|
33
|
+
</Markdown>
|
|
34
|
+
</ReadMore>
|
|
35
|
+
}
|
|
36
|
+
className="dataset-readme markdown-body"
|
|
37
|
+
/>
|
|
38
|
+
<Comments
|
|
39
|
+
datasetId={dataset.id}
|
|
40
|
+
uploader={dataset.uploader}
|
|
41
|
+
comments={dataset.comments}
|
|
42
|
+
/>
|
|
43
|
+
</>
|
|
44
|
+
)
|