X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cdc8a73914399a401642ca553e9d3d8b2d42db5c..2a7fd99c212c33a1ec9911f8529fa5afc59a7bb2:/src/store/snackbar/snackbar-actions.ts diff --git a/src/store/snackbar/snackbar-actions.ts b/src/store/snackbar/snackbar-actions.ts index 55d9f3a865..7b6f2efd15 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<{}|null>(), + SHIFT_MESSAGES: ofType<{}>() }); export type SnackbarAction = UnionOf;