feat(CustomizationService):Add a customization service (#2984)
* feat(customization):Add a customization service Update UICustomizationService to v3-stable. Also, adds an example customization for tab colors * moved the customization service to ui category
This commit is contained in:
1 parent
32bb7e4c1e
commit
daa56a8449
33 files changed
+1031
-67
No files matched your search
@@ -26,8 +26,10 @@ const StudyBrowser = ({
|
||||
onDoubleClickThumbnail,
|
||||
onClickUntrack,
|
||||
activeDisplaySetInstanceUIDs,
|
||||
servicesManager,
|
||||
}) => {
|
||||
const { t } = useTranslation('StudyBrowser');
|
||||
const { customizationService } = servicesManager?.services || {};
|
||||
|
||||
const getTabContent = () => {
|
||||
const tabData = tabs.find(tab => tab.name === activeTabName);
|
||||
@@ -82,8 +84,13 @@ const StudyBrowser = ({
|
||||
const isActive = activeTabName === name;
|
||||
const isDisabled = !studies.length;
|
||||
// Apply the contrasting color for brighter button color visibility
|
||||
// const color = isActive ? 'black' : 'default';
|
||||
const color = 'default';
|
||||
const classStudyBrowser = customizationService?.getModeCustomization(
|
||||
'class:StudyBrowser'
|
||||
) || {
|
||||
true: 'default',
|
||||
false: 'default',
|
||||
};
|
||||
const color = classStudyBrowser[`${isActive}`];
|
||||
return (
|
||||
<Button
|
||||
key={name}
|
||||
|
||||
@@ -302,6 +302,7 @@ export function ViewportGridProvider({ children, service }) {
|
||||
setDisplaySetsForViewports,
|
||||
setLayout,
|
||||
reset,
|
||||
onModeExit: reset,
|
||||
setCachedLayout,
|
||||
restoreCachedLayout,
|
||||
set,
|
||||
|
||||
Reference in new issue
Block a user