Skip to content

Commit

Permalink
wf-details: add preview for PDF files
Browse files Browse the repository at this point in the history
Closes #78.
  • Loading branch information
giuseppe-steduto committed May 19, 2023
1 parent ddb62ed commit 48a9b53
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changes
Version 0.9.1 (UNRELEASED)
--------------------------

- Adds support for previewing PDF files in the workspace details page.
- Changes the interactive session notification by adding a message stating that the session will be closed after a specified number of days inactivity.
- Adds an extra button for login with custom third-party Keycloak SSO authentication services.
- Changes the workflow-details page to make it possible to scroll through the list of workflow steps in the job logs section.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ const PREVIEW_MIME_PREFIX_WHITELIST = {
serverPreviewable: false,
display: (content) => content,
},
"application/pdf": {
serverPreviewable: true,
display: (content) => {
return <object data={content} className={styles["pdf-object"]} />;
},
},
};

export default function WorkflowFiles({ id }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
align-items: center;
}

.pdf-object {
height: calc(80vh - 14em);
width: 100%;
}

:global(.ui.inline.loader.active).loader {
margin-top: 1em;
}

0 comments on commit 48a9b53

Please sign in to comment.