Merge pull request #808 from mattermost/fixing-redirect2
fixing more redirect places
Этот коммит содержится в:
@@ -4,6 +4,7 @@
|
|||||||
const Client = require('../utils/client.jsx');
|
const Client = require('../utils/client.jsx');
|
||||||
const AsyncClient = require('../utils/async_client.jsx');
|
const AsyncClient = require('../utils/async_client.jsx');
|
||||||
const ChannelStore = require('../stores/channel_store.jsx');
|
const ChannelStore = require('../stores/channel_store.jsx');
|
||||||
|
var TeamStore = require('../stores/team_store.jsx');
|
||||||
|
|
||||||
export default class DeleteChannelModal extends React.Component {
|
export default class DeleteChannelModal extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -24,7 +25,7 @@ export default class DeleteChannelModal extends React.Component {
|
|||||||
Client.deleteChannel(this.state.channelId,
|
Client.deleteChannel(this.state.channelId,
|
||||||
function handleDeleteSuccess() {
|
function handleDeleteSuccess() {
|
||||||
AsyncClient.getChannels(true);
|
AsyncClient.getChannels(true);
|
||||||
window.location.href = '/';
|
window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/town-square';
|
||||||
},
|
},
|
||||||
function handleDeleteError(err) {
|
function handleDeleteError(err) {
|
||||||
AsyncClient.dispatchError(err, 'handleDelete');
|
AsyncClient.dispatchError(err, 'handleDelete');
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ export default class Navbar extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div className='navbar-brand'>
|
<div className='navbar-brand'>
|
||||||
<a
|
<a
|
||||||
href='/'
|
href={TeamStore.getCurrentTeamUrl() + '/channels/town-square'}
|
||||||
className='heading'
|
className='heading'
|
||||||
>
|
>
|
||||||
{channelTitle}
|
{channelTitle}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default class SSOSignUpPage extends React.Component {
|
|||||||
if (data.follow_link) {
|
if (data.follow_link) {
|
||||||
window.location.href = data.follow_link;
|
window.location.href = data.follow_link;
|
||||||
} else {
|
} else {
|
||||||
window.location.href = '/';
|
window.location.href = '/' + team.name + '/channels/town-square';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
function fail(err) {
|
function fail(err) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
var AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
|
var AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
|
||||||
var ChannelStore = require('../stores/channel_store.jsx');
|
var ChannelStore = require('../stores/channel_store.jsx');
|
||||||
var UserStore = require('../stores/user_store.jsx');
|
var UserStore = require('../stores/user_store.jsx');
|
||||||
|
var TeamStore = require('../stores/team_store.jsx');
|
||||||
var Constants = require('../utils/constants.jsx');
|
var Constants = require('../utils/constants.jsx');
|
||||||
var ActionTypes = Constants.ActionTypes;
|
var ActionTypes = Constants.ActionTypes;
|
||||||
var AsyncClient = require('./async_client.jsx');
|
var AsyncClient = require('./async_client.jsx');
|
||||||
@@ -113,7 +114,7 @@ export function notifyMe(title, body, channel) {
|
|||||||
if (channel) {
|
if (channel) {
|
||||||
switchChannel(channel);
|
switchChannel(channel);
|
||||||
} else {
|
} else {
|
||||||
window.location.href = '/';
|
window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/town-square';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
setTimeout(function closeNotificationOnTimeout() {
|
setTimeout(function closeNotificationOnTimeout() {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user