X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/f63f3a5360ae6381d4b332bf86ef52b4e22107fb..c48d10802d4ae95273f8b98e622e5df200cdc3a7:/src/store/snackbar/snackbar-actions.ts diff --git a/src/store/snackbar/snackbar-actions.ts b/src/store/snackbar/snackbar-actions.ts index 55d9f3a8..c0437154 100644 --- a/src/store/snackbar/snackbar-actions.ts +++ b/src/store/snackbar/snackbar-actions.ts @@ -2,11 +2,26 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { unionize, ofType, UnionOf } from "~/common/unionize"; +import { unionize, ofType, UnionOf } from "common/unionize"; + +export interface SnackbarMessage { + message: string; + hideDuration: number; + kind: SnackbarKind; + link?: string; +} + +export enum SnackbarKind { + SUCCESS = 1, + ERROR = 2, + INFO = 3, + WARNING = 4 +} export const snackbarActions = unionize({ - OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number}>(), - CLOSE_SNACKBAR: ofType<{}>() + OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number, kind?: SnackbarKind, link?: string}>(), + CLOSE_SNACKBAR: ofType<{}>(), + SHIFT_MESSAGES: ofType<{}>() }); export type SnackbarAction = UnionOf;