sforkowany z mirror/soapbox
Merge branch 'reset-pass-query' into 'develop'
Preserve password reset URL query See merge request soapbox-pub/soapbox-fe!1506chats-fixes
commit
b85ac4c50a
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { defineMessages, useIntl } from 'react-intl';
|
import { defineMessages, useIntl } from 'react-intl';
|
||||||
import { Link, Redirect, Route, Switch, useHistory } from 'react-router-dom';
|
import { Link, Redirect, Route, Switch, useHistory, useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
import LandingGradient from 'soapbox/components/landing-gradient';
|
import LandingGradient from 'soapbox/components/landing-gradient';
|
||||||
import SiteLogo from 'soapbox/components/site-logo';
|
import SiteLogo from 'soapbox/components/site-logo';
|
||||||
|
@ -23,6 +23,7 @@ const messages = defineMessages({
|
||||||
const AuthLayout = () => {
|
const AuthLayout = () => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
const { search } = useLocation();
|
||||||
|
|
||||||
const siteTitle = useAppSelector(state => state.instance.title);
|
const siteTitle = useAppSelector(state => state.instance.title);
|
||||||
const soapboxConfig = useSoapboxConfig();
|
const soapboxConfig = useSoapboxConfig();
|
||||||
|
@ -76,7 +77,7 @@ const AuthLayout = () => {
|
||||||
<Route path='/invite/:token' component={RegisterInvite} />
|
<Route path='/invite/:token' component={RegisterInvite} />
|
||||||
|
|
||||||
<Redirect from='/auth/password/new' to='/reset-password' />
|
<Redirect from='/auth/password/new' to='/reset-password' />
|
||||||
<Redirect from='/auth/password/edit' to='/edit-password' />
|
<Redirect from='/auth/password/edit' to={`/edit-password${search}`} />
|
||||||
</Switch>
|
</Switch>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import React, { useState, useEffect, useRef, useCallback } from 'react';
|
||||||
import { HotKeys } from 'react-hotkeys';
|
import { HotKeys } from 'react-hotkeys';
|
||||||
import { defineMessages, useIntl } from 'react-intl';
|
import { defineMessages, useIntl } from 'react-intl';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { Switch, useHistory, matchPath, Redirect } from 'react-router-dom';
|
import { Switch, useHistory, useLocation, matchPath, Redirect } from 'react-router-dom';
|
||||||
|
|
||||||
import { fetchFollowRequests } from 'soapbox/actions/accounts';
|
import { fetchFollowRequests } from 'soapbox/actions/accounts';
|
||||||
import { fetchReports, fetchUsers, fetchConfig } from 'soapbox/actions/admin';
|
import { fetchReports, fetchUsers, fetchConfig } from 'soapbox/actions/admin';
|
||||||
|
@ -156,8 +156,8 @@ const keyMap = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const SwitchingColumnsArea: React.FC = ({ children }) => {
|
const SwitchingColumnsArea: React.FC = ({ children }) => {
|
||||||
const history = useHistory();
|
|
||||||
const features = useFeatures();
|
const features = useFeatures();
|
||||||
|
const { search } = useLocation();
|
||||||
|
|
||||||
const { authenticatedProfile, cryptoAddresses } = useSoapboxConfig();
|
const { authenticatedProfile, cryptoAddresses } = useSoapboxConfig();
|
||||||
const hasCrypto = cryptoAddresses.size > 0;
|
const hasCrypto = cryptoAddresses.size > 0;
|
||||||
|
@ -232,7 +232,7 @@ const SwitchingColumnsArea: React.FC = ({ children }) => {
|
||||||
<Redirect from='/settings/otp_authentication' to='/settings/mfa' />
|
<Redirect from='/settings/otp_authentication' to='/settings/mfa' />
|
||||||
<Redirect from='/settings/applications' to='/developers' />
|
<Redirect from='/settings/applications' to='/developers' />
|
||||||
<Redirect from='/auth/edit' to='/settings' />
|
<Redirect from='/auth/edit' to='/settings' />
|
||||||
<Redirect from='/auth/confirmation' to={`/email-confirmation${history.location.search}`} />
|
<Redirect from='/auth/confirmation' to={`/email-confirmation${search}`} />
|
||||||
<Redirect from='/auth/reset_password' to='/reset-password' />
|
<Redirect from='/auth/reset_password' to='/reset-password' />
|
||||||
<Redirect from='/auth/edit_password' to='/edit-password' />
|
<Redirect from='/auth/edit_password' to='/edit-password' />
|
||||||
<Redirect from='/auth/sign_in' to='/login' />
|
<Redirect from='/auth/sign_in' to='/login' />
|
||||||
|
@ -247,7 +247,7 @@ const SwitchingColumnsArea: React.FC = ({ children }) => {
|
||||||
<Redirect from='/auth/external' to='/login/external' />
|
<Redirect from='/auth/external' to='/login/external' />
|
||||||
<Redirect from='/auth/mfa' to='/settings/mfa' />
|
<Redirect from='/auth/mfa' to='/settings/mfa' />
|
||||||
<Redirect from='/auth/password/new' to='/reset-password' />
|
<Redirect from='/auth/password/new' to='/reset-password' />
|
||||||
<Redirect from='/auth/password/edit' to='/edit-password' />
|
<Redirect from='/auth/password/edit' to={`/edit-password${search}`} />
|
||||||
|
|
||||||
<WrappedRoute path='/tags/:id' publicRoute page={DefaultPage} component={HashtagTimeline} content={children} />
|
<WrappedRoute path='/tags/:id' publicRoute page={DefaultPage} component={HashtagTimeline} content={children} />
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue