1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

#23 added superpowers ui tab

This commit is contained in:
Fedor Katurov 2021-03-19 17:00:26 +07:00
parent c939dcbce8
commit b1f019ebae
15 changed files with 162 additions and 42 deletions

View file

@ -10,13 +10,23 @@ function* onPathChange({
},
}: LocationChangeAction) {
if (pathname.match(/^\/~([\wа-яА-Я]+)/)) {
const [, username] = pathname.match(/^\/~([\wа-яА-Я]+)/);
return yield put(authOpenProfile(username));
const match = pathname.match(/^\/~([\wа-яА-Я]+)/);
if (!match || !match.length || !match[1]) {
return;
}
return yield put(authOpenProfile(match[1]));
}
if (pathname.match(/^\/restore\/([\w\-]+)/)) {
const [, code] = pathname.match(/^\/restore\/([\w\-]+)/);
return yield put(authShowRestoreModal(code));
const match = pathname.match(/^\/restore\/([\w\-]+)/);
if (!match || !match.length || !match[1]) {
return;
}
return yield put(authShowRestoreModal(match[1]));
}
}