mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
password restore dialog
This commit is contained in:
parent
0cfc6357b9
commit
078c531e93
14 changed files with 270 additions and 33 deletions
|
@ -1,14 +1,4 @@
|
|||
import { ValueOf } from '~/redux/types';
|
||||
import { LoginDialog } from '~/containers/dialogs/LoginDialog';
|
||||
import { LoadingDialog } from '~/containers/dialogs/LoadingDialog';
|
||||
import { EditorDialogImage } from '~/containers/editors/EditorDialogImage';
|
||||
import { EditorDialogText } from '~/containers/editors/EditorDialogText';
|
||||
import { EditorDialogVideo } from '~/containers/editors/EditorDialogVideo';
|
||||
import { EditorDialogAudio } from '~/containers/editors/EditorDialogAudio';
|
||||
import { NODE_TYPES } from '../node/constants';
|
||||
import { TestDialog } from '~/containers/dialogs/TestDialog';
|
||||
import { ProfileDialog } from '~/containers/dialogs/ProfileDialog';
|
||||
import { RestoreRequestDialog } from '~/containers/dialogs/RestoreRequestDialog';
|
||||
|
||||
export const DIALOGS = {
|
||||
EDITOR_IMAGE: 'EDITOR_IMAGE',
|
||||
|
@ -19,6 +9,7 @@ export const DIALOGS = {
|
|||
LOADING: 'LOADING',
|
||||
PROFILE: 'PROFILE',
|
||||
RESTORE_REQUEST: 'RESTORE_REQUEST',
|
||||
RESTORE_PASSWORD: 'RESTORE_PASSWORD',
|
||||
TEST: 'TEST',
|
||||
};
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ export interface IModalState {
|
|||
}
|
||||
|
||||
const INITIAL_STATE: IModalState = {
|
||||
is_shown: true,
|
||||
dialog: DIALOGS.RESTORE_REQUEST,
|
||||
is_shown: false,
|
||||
dialog: null,
|
||||
};
|
||||
|
||||
export default createReducer(INITIAL_STATE, MODAL_HANDLERS);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { takeEvery, put } from 'redux-saga/effects';
|
||||
import { LocationChangeAction, LOCATION_CHANGE } from 'connected-react-router';
|
||||
import { authOpenProfile, authRestorePassword } from '../auth/actions';
|
||||
import { authOpenProfile, authShowRestoreModal } from '../auth/actions';
|
||||
|
||||
function* onPathChange({
|
||||
payload: {
|
||||
|
@ -14,7 +14,7 @@ function* onPathChange({
|
|||
|
||||
if (pathname.match(/^\/restore\/([\w\-]+)/)) {
|
||||
const [, code] = pathname.match(/^\/restore\/([\w\-]+)/);
|
||||
return yield put(authRestorePassword(code));
|
||||
return yield put(authShowRestoreModal(code));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue