Merge branch 'master' into 15088-merge-account
[arvados-workbench2.git] / src / store / workbench / workbench-actions.ts
index 2363b5795a8b9c2c0d0743524fb8e82f460f0caf..27ac76f335198e75bc37bcbc30df330d39226cbd 100644 (file)
@@ -59,6 +59,7 @@ import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog';
 import { loadWorkflowPanel, workflowPanelActions } from '~/store/workflow-panel/workflow-panel-actions';
 import { loadSshKeysPanel } from '~/store/auth/auth-action-ssh';
 import { loadMyAccountPanel } from '~/store/my-account/my-account-panel-actions';
+import { loadLinkAccountPanel, linkAccountPanelActions } from '~/store/link-account-panel/link-account-panel-actions';
 import { loadSiteManagerPanel } from '~/store/auth/auth-action-session';
 import { workflowPanelColumns } from '~/views/workflow-panel/workflow-panel-view';
 import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions';
@@ -93,6 +94,7 @@ import { groupDetailsPanelColumns } from '~/views/group-details-panel/group-deta
 import { DataTableFetchMode } from "~/components/data-table/data-table";
 import { loadPublicFavoritePanel, publicFavoritePanelActions } from '~/store/public-favorites-panel/public-favorites-action';
 import { publicFavoritePanelColumns } from '~/views/public-favorites-panel/public-favorites-panel';
+import { USER_LINK_ACCOUNT_KEY } from '~/services/link-account-service/link-account-service';
 import { loadCollectionsContentAddressPanel, collectionsContentAddressActions } from '~/store/collections-content-address-panel/collections-content-address-panel-actions';
 import { collectionContentAddressPanelColumns } from '~/views/collection-content-address-panel/collection-content-address-panel';
 
@@ -136,6 +138,10 @@ export const loadWorkbench = () =>
             dispatch(apiClientAuthorizationsActions.SET_COLUMNS({ columns: apiClientAuthorizationPanelColumns }));
             dispatch(collectionsContentAddressActions.SET_COLUMNS({ columns: collectionContentAddressPanelColumns }));
 
+            if (sessionStorage.getItem(USER_LINK_ACCOUNT_KEY)) {
+                dispatch(linkAccountPanelActions.HAS_SESSION_DATA());
+            }
+
             dispatch<any>(initSidePanelTree());
             if (router.location) {
                 const match = matchRootRoute(router.location.pathname);
@@ -492,6 +498,11 @@ export const loadMyAccount = handleFirstTimeLoad(
         dispatch(loadMyAccountPanel());
     });
 
+export const loadLinkAccount = handleFirstTimeLoad(
+    (dispatch: Dispatch<any>) => {
+        dispatch(loadLinkAccountPanel());
+    });
+
 export const loadKeepServices = handleFirstTimeLoad(
     async (dispatch: Dispatch<any>) => {
         await dispatch(loadKeepServicesPanel());