Skip to content

Commit

Permalink
fix primary viewer icon wrt plugin availability
Browse files Browse the repository at this point in the history
  • Loading branch information
amazy committed Sep 20, 2024
1 parent 38b3450 commit 4439e89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WebApplication/src/components/StudyItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default {
}
},
hasPrimaryViewerIcon() {
return this.studiesSourceType == SourceType.LOCAL_ORTHANC;
return this.studiesSourceType == SourceType.LOCAL_ORTHANC && this.primaryViewerUrl;
},
primaryViewerUrl() {
return resourceHelpers.getPrimaryViewerUrl("study", this.study.ID, this.study.MainDicomTags.StudyInstanceUID);
Expand Down
9 changes: 8 additions & 1 deletion WebApplication/src/helpers/resource-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ export default {

getPrimaryViewerUrl(level, orthancId, dicomId) {
if (store.state.configuration.uiOptions.ViewersOrdering.length > 0) {
return this.getViewerUrl(level, orthancId, dicomId, store.state.configuration.uiOptions.ViewersOrdering[0]);
for (let viewer of store.state.configuration.uiOptions.ViewersOrdering) {
if ((["osimis-web-viewer", "stone-webviewer", "volview", "wsi"].indexOf(viewer) != -1 && viewer in store.state.configuration.installedPlugins) ||
(viewer.startsWith("ohif") && viewer in store.state.configuration.installedPlugins) ||
(viewer == "meddream" && store.state.configuration.uiOptions.EnableOpenInMedDreamViewer))
{
return this.getViewerUrl(level, orthancId, dicomId, viewer);
}
}
}
return null;
},
Expand Down

0 comments on commit 4439e89

Please sign in to comment.