projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '13540-add-possibility-to-open-files-in-third-party-apps'
[arvados-workbench2.git]
/
src
/
routes
/
route-change-handlers.ts
diff --git
a/src/routes/route-change-handlers.ts
b/src/routes/route-change-handlers.ts
index 655c806f3a3b0337cc1a89eccae6b7a29ddaa832..03e2a38aee5deb3de1a0e0663bae503d2bfe64aa 100644
(file)
--- a/
src/routes/route-change-handlers.ts
+++ b/
src/routes/route-change-handlers.ts
@@
-8,6
+8,8
@@
import * as Routes from '~/routes/routes';
import * as WorkbenchActions from '~/store/workbench/workbench-actions';
import { navigateToRootProject } from '~/store/navigation/navigation-action';
import { dialogActions } from '~/store/dialog/dialog-actions';
import * as WorkbenchActions from '~/store/workbench/workbench-actions';
import { navigateToRootProject } from '~/store/navigation/navigation-action';
import { dialogActions } from '~/store/dialog/dialog-actions';
+import { contextMenuActions } from '~/store/context-menu/context-menu-actions';
+import { searchBarActions } from '~/store/search-bar/search-bar-actions';
export const addRouteChangeHandlers = (history: History, store: RootStore) => {
const handler = handleLocationChange(store);
export const addRouteChangeHandlers = (history: History, store: RootStore) => {
const handler = handleLocationChange(store);
@@
-37,9
+39,13
@@
const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
const apiClientAuthorizationsMatch = Routes.matchApiClientAuthorizationsRoute(pathname);
const myAccountMatch = Routes.matchMyAccountRoute(pathname);
const userMatch = Routes.matchUsersRoute(pathname);
const apiClientAuthorizationsMatch = Routes.matchApiClientAuthorizationsRoute(pathname);
const myAccountMatch = Routes.matchMyAccountRoute(pathname);
const userMatch = Routes.matchUsersRoute(pathname);
+ const groupsMatch = Routes.matchGroupsRoute(pathname);
+ const groupDetailsMatch = Routes.matchGroupDetailsRoute(pathname);
const linksMatch = Routes.matchLinksRoute(pathname);
store.dispatch(dialogActions.CLOSE_ALL_DIALOGS());
const linksMatch = Routes.matchLinksRoute(pathname);
store.dispatch(dialogActions.CLOSE_ALL_DIALOGS());
+ store.dispatch(contextMenuActions.CLOSE_CONTEXT_MENU());
+ store.dispatch(searchBarActions.CLOSE_SEARCH_VIEW());
if (projectMatch) {
store.dispatch(WorkbenchActions.loadProject(projectMatch.params.id));
if (projectMatch) {
store.dispatch(WorkbenchActions.loadProject(projectMatch.params.id));
@@
-83,6
+89,10
@@
const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => {
store.dispatch(WorkbenchActions.loadMyAccount);
} else if (userMatch) {
store.dispatch(WorkbenchActions.loadUsers);
store.dispatch(WorkbenchActions.loadMyAccount);
} else if (userMatch) {
store.dispatch(WorkbenchActions.loadUsers);
+ } else if (groupsMatch) {
+ store.dispatch(WorkbenchActions.loadGroupsPanel);
+ } else if (groupDetailsMatch) {
+ store.dispatch(WorkbenchActions.loadGroupDetailsPanel(groupDetailsMatch.params.id));
} else if (linksMatch) {
store.dispatch(WorkbenchActions.loadLinks);
}
} else if (linksMatch) {
store.dispatch(WorkbenchActions.loadLinks);
}