mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Misc CSS and transition fixes
This commit is contained in:
@@ -4,6 +4,7 @@ import { FlashMessageType } from '@/components/MessageBox';
|
||||
export interface FlashStore {
|
||||
items: FlashMessage[];
|
||||
addFlash: Action<FlashStore, FlashMessage>;
|
||||
addError: Action<FlashStore, { message: string; key?: string }>;
|
||||
clearFlashes: Action<FlashStore, string | void>;
|
||||
}
|
||||
|
||||
@@ -20,6 +21,9 @@ const flashes: FlashStore = {
|
||||
addFlash: action((state, payload) => {
|
||||
state.items.push(payload);
|
||||
}),
|
||||
addError: action((state, payload) => {
|
||||
state.items.push({ type: 'error', title: 'Error', ...payload });
|
||||
}),
|
||||
clearFlashes: action((state, payload) => {
|
||||
state.items = payload ? state.items.filter(flashes => flashes.key !== payload) : [];
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user