mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Add support for changing account password
This commit is contained in:
@@ -6,8 +6,8 @@ const flashes: FlashState = {
|
||||
addFlash: action((state, payload) => {
|
||||
state.items.push(payload);
|
||||
}),
|
||||
clearFlashes: action(state => {
|
||||
state.items = [];
|
||||
clearFlashes: action((state, payload) => {
|
||||
state.items = payload ? state.items.filter(flashes => flashes.key !== payload) : [];
|
||||
}),
|
||||
};
|
||||
|
||||
|
||||
3
resources/scripts/state/types.d.ts
vendored
3
resources/scripts/state/types.d.ts
vendored
@@ -9,7 +9,7 @@ export interface ApplicationState {
|
||||
export interface FlashState {
|
||||
items: FlashMessage[];
|
||||
addFlash: Action<FlashState, FlashMessage>;
|
||||
clearFlashes: Action<FlashState>;
|
||||
clearFlashes: Action<FlashState, string | void>;
|
||||
}
|
||||
|
||||
export interface UserState {
|
||||
@@ -30,6 +30,7 @@ export interface UserData {
|
||||
|
||||
export interface FlashMessage {
|
||||
id?: string;
|
||||
key?: string;
|
||||
type: FlashMessageType;
|
||||
title?: string;
|
||||
message: string;
|
||||
|
||||
Reference in New Issue
Block a user