feat: Add White Labelling, Hanging Protocols, and tons of Extensions / Mode fixes

* modified

* new files in existing extensions/libraries/modes

* fixed bugs and tests

* Clean up

* fix: viewport display fixed

* Fixed configs for deployment

* Removed unnecessary files and functions

* Fixed default HP module

* Added white labelling

* Fixed hash routing

* Removed unnecessary routers

Co-authored-by: Alireza Sedghi <ar.sedghi@gmail.com>
This commit is contained in:
Erik ZieglerandAlireza Sedghi authored and GitHub committed 2021-05-28 14:32:48 -04:00
1 parent 0db81b30f3
commit 99b8dc4759
93 files changed
+3825 -1293

No files matched your search

+8 -3
View File
@@ -6,7 +6,7 @@ import classNames from 'classnames';
import { useHistory } from 'react-router-dom';
import { NavBar, Svg, Icon, IconButton, Dropdown } from '@ohif/ui';
function Header({ children, menuOptions, isReturnEnabled, isSticky }) {
function Header({ children, menuOptions, isReturnEnabled, isSticky, WhiteLabeling }) {
const { t } = useTranslation();
const history = useHistory();
@@ -18,6 +18,10 @@ function Header({ children, menuOptions, isReturnEnabled, isSticky }) {
}
};
const CustomLogo = (React) => {
return WhiteLabeling.createLogoComponentFn(React)
}
return (
<NavBar className='justify-between border-b-4 border-black' isSticky={isSticky}>
<div className="flex justify-between flex-1">
@@ -29,7 +33,7 @@ function Header({ children, menuOptions, isReturnEnabled, isSticky }) {
onClick={onReturnHandler}
>
{isReturnEnabled && <Icon name="chevron-left" className="w-8 text-primary-active" />}
<div className="ml-4"><Svg name="logo-ohif" /></div>
<div className="ml-4">{WhiteLabeling ? CustomLogo(React) : <Svg name="logo-ohif" />}</div>
</div>
</div>
<div className="flex items-center">{children}</div>
@@ -73,7 +77,8 @@ Header.propTypes = {
),
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
isReturnEnabled: PropTypes.bool,
isSticky: PropTypes.bool
isSticky: PropTypes.bool,
WhiteLabeling: PropTypes.element,
};
Header.defaultProps = {
@@ -143,7 +143,7 @@ const SidePanel = ({
</span>
</Button>
</div>
<childComponent.content/>
<childComponent.content />
</React.Fragment>
) : (
<React.Fragment>{getPanelButtons()}</React.Fragment>
@@ -14,6 +14,7 @@ const classes = {
const ViewportActionBar = ({
studyData,
showNavArrows,
showStatus,
showCine,
cineProps,
showPatientInfo: patientInfoVisibility,
@@ -255,7 +256,7 @@ const ViewportActionBar = ({
<div className="flex flex-1 flex-grow mt-2 min-w-48">
<div className="flex items-center">
<span className="mr-2 text-white text-large">{label}</span>
{renderIconStatus()}
{showStatus && renderIconStatus()}
</div>
<div className="flex flex-col justify-start ml-4">
<div className="flex">
@@ -352,6 +353,7 @@ ViewportActionBar.propTypes = {
ViewportActionBar.defaultProps = {
cineProps: {},
showCine: false,
showStatus: true,
showNavArrows: true,
showPatientInfo: false,
};