import { contextMenuActions } from 'store/context-menu/context-menu-actions';
import { searchBarActions } from 'store/search-bar/search-bar-actions';
import { pluginConfig } from 'plugins';
+import { openProjectPanel } from 'store/project-panel/project-panel-action';
export const addRouteChangeHandlers = (history: History, store: RootStore) => {
const handler = handleLocationChange(store);
const linksMatch = Routes.matchLinksRoute(pathname);
const collectionsContentAddressMatch = Routes.matchCollectionsContentAddressRoute(pathname);
const allProcessesMatch = Routes.matchAllProcessesRoute(pathname);
+ const registeredWorkflowMatch = Routes.matchRegisteredWorkflowRoute(pathname);
store.dispatch(dialogActions.CLOSE_ALL_DIALOGS());
store.dispatch(contextMenuActions.CLOSE_CONTEXT_MENU());
}
}
+ document.title = `Arvados (${store.getState().auth.config.uuidPrefix}) - ${pathname.slice(1)}`;
+
if (projectMatch) {
- store.dispatch(WorkbenchActions.loadProject(projectMatch.params.id));
+ store.dispatch(openProjectPanel(projectMatch.params.id));
} else if (collectionMatch) {
store.dispatch(WorkbenchActions.loadCollection(collectionMatch.params.id));
} else if (favoriteMatch) {
store.dispatch(WorkbenchActions.loadCollectionContentAddress);
} else if (allProcessesMatch) {
store.dispatch(WorkbenchActions.loadAllProcesses());
+ } else if (registeredWorkflowMatch) {
+ store.dispatch(WorkbenchActions.loadRegisteredWorkflow(registeredWorkflowMatch.params.id));
}
};