X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/3b5edb7ae1de4709acef5d2c58ce12ecf5eb9fcf..4b961d16b8f8ef8afbd13697a79fe4684acd0416:/src/store/keep-services/keep-services-actions.ts diff --git a/src/store/keep-services/keep-services-actions.ts b/src/store/keep-services/keep-services-actions.ts index 54a7c3fe..4eb5fc95 100644 --- a/src/store/keep-services/keep-services-actions.ts +++ b/src/store/keep-services/keep-services-actions.ts @@ -9,7 +9,7 @@ import { setBreadcrumbs } from '~/store/breadcrumbs/breadcrumbs-actions'; import { ServiceRepository } from "~/services/services"; import { KeepServiceResource } from '~/models/keep-services'; import { dialogActions } from '~/store/dialog/dialog-actions'; -import { snackbarActions } from '~/store/snackbar/snackbar-actions'; +import {snackbarActions, SnackbarKind} from '~/store/snackbar/snackbar-actions'; import { navigateToRootProject } from '~/store/navigation/navigation-action'; export const keepServicesActions = unionize({ @@ -35,7 +35,7 @@ export const loadKeepServicesPanel = () => } } else { dispatch(navigateToRootProject); - dispatch(snackbarActions.OPEN_SNACKBAR({ message: "You don't have permissions to view this page", hideDuration: 2000 })); + dispatch(snackbarActions.OPEN_SNACKBAR({ message: "You don't have permissions to view this page", hideDuration: 2000, kind: SnackbarKind.ERROR })); } }; @@ -60,11 +60,11 @@ export const openKeepServiceRemoveDialog = (uuid: string) => export const removeKeepService = (uuid: string) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { - dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removing ...' })); + dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removing ...', kind: SnackbarKind.INFO })); try { await services.keepService.delete(uuid); dispatch(keepServicesActions.REMOVE_KEEP_SERVICE(uuid)); - dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Keep service has been successfully removed.', hideDuration: 2000 })); + dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Keep service has been successfully removed.', hideDuration: 2000, kind: SnackbarKind.SUCCESS })); } catch (e) { return; }