fix browse the contents of a Project in Trash and tooltips around button
[arvados-workbench2.git] / src / store / project-panel / project-panel-action.ts
index 6e639017dbd7de0bdd0289443efe1169694f8abe..e094cb1851b125bc9755212efbf76eb9578fefe7 100644 (file)
@@ -10,6 +10,7 @@ import { RootState } from '~/store/store';
 import { getProperty } from "~/store/properties/properties";
 export const PROJECT_PANEL_ID = "projectPanel";
 export const PROJECT_PANEL_CURRENT_UUID = "projectPanelCurrentUuid";
+export const IS_PROJECT_PANEL_TRASHED = 'isProjectPanelTrashed';
 export const projectPanelActions = bindDataExplorerActions(PROJECT_PANEL_ID);
 
 export const openProjectPanel = (projectUuid: string) =>
@@ -20,3 +21,7 @@ export const openProjectPanel = (projectUuid: string) =>
 
 export const getProjectPanelCurrentUuid = (state: RootState) => getProperty<string>(PROJECT_PANEL_CURRENT_UUID)(state.properties);
 
+export const setIsProjectPanelTrashed = (isTrashed: boolean) =>
+    (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+        dispatch(propertiesActions.SET_PROPERTY({ key: IS_PROJECT_PANEL_TRASHED, value: isTrashed }));
+    };