X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/229eaf53b39af3a7e9408ed5f7e49d74b318445a..56069f1f9fa111b9756e9bfa7a3b0c9dba2e9a7a:/src/routes/route-change-handlers.ts diff --git a/src/routes/route-change-handlers.ts b/src/routes/route-change-handlers.ts index 03e2a38a..50ba319e 100644 --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@ -18,10 +18,12 @@ export const addRouteChangeHandlers = (history: History, store: RootStore) => { }; const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { + const rootMatch = Routes.matchRootRoute(pathname); const projectMatch = Routes.matchProjectRoute(pathname); const collectionMatch = Routes.matchCollectionRoute(pathname); const favoriteMatch = Routes.matchFavoritesRoute(pathname); + const publicFavoritesMatch = Routes.matchPublicFavoritesRoute(pathname); const trashMatch = Routes.matchTrashRoute(pathname); const processMatch = Routes.matchProcessRoute(pathname); const processLogMatch = Routes.matchProcessLogRoute(pathname); @@ -34,6 +36,7 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { const workflowMatch = Routes.matchWorkflowRoute(pathname); const sshKeysUserMatch = Routes.matchSshKeysUserRoute(pathname); const sshKeysAdminMatch = Routes.matchSshKeysAdminRoute(pathname); + const siteManagerMatch = Routes.matchSiteManagerRoute(pathname); const keepServicesMatch = Routes.matchKeepServicesRoute(pathname); const computeNodesMatch = Routes.matchComputeNodesRoute(pathname); const apiClientAuthorizationsMatch = Routes.matchApiClientAuthorizationsRoute(pathname); @@ -42,6 +45,7 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { const groupsMatch = Routes.matchGroupsRoute(pathname); const groupDetailsMatch = Routes.matchGroupDetailsRoute(pathname); const linksMatch = Routes.matchLinksRoute(pathname); + const collectionsContentAddressMatch = Routes.matchCollectionsContentAddressRoute(pathname); store.dispatch(dialogActions.CLOSE_ALL_DIALOGS()); store.dispatch(contextMenuActions.CLOSE_CONTEXT_MENU()); @@ -53,6 +57,8 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { store.dispatch(WorkbenchActions.loadCollection(collectionMatch.params.id)); } else if (favoriteMatch) { store.dispatch(WorkbenchActions.loadFavorites()); + } else if (publicFavoritesMatch) { + store.dispatch(WorkbenchActions.loadPublicFavorites()); } else if (trashMatch) { store.dispatch(WorkbenchActions.loadTrash()); } else if (processMatch) { @@ -79,6 +85,8 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { store.dispatch(WorkbenchActions.loadSshKeys); } else if (sshKeysAdminMatch) { store.dispatch(WorkbenchActions.loadSshKeys); + } else if (siteManagerMatch) { + store.dispatch(WorkbenchActions.loadSiteManager); } else if (keepServicesMatch) { store.dispatch(WorkbenchActions.loadKeepServices); } else if (computeNodesMatch) { @@ -95,5 +103,7 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { store.dispatch(WorkbenchActions.loadGroupDetailsPanel(groupDetailsMatch.params.id)); } else if (linksMatch) { store.dispatch(WorkbenchActions.loadLinks); + } else if (collectionsContentAddressMatch) { + store.dispatch(WorkbenchActions.loadCollectionContentAddress); } -}; +}; \ No newline at end of file