Changing the way we mattermost handles URLs. team.domain.com becomes domain.com/team.

Renaming team.Name to team.DisplayName and team.Domain to team.Name.
So: team.Name -> url safe name. team.DisplayName -> nice name for users
Этот коммит содержится в:
Christopher Speller
2015-07-08 11:50:10 -04:00
родитель a1876cf6cc
Коммит c6fb95912b
86 изменённых файлов: 891 добавлений и 1214 удалений

Просмотреть файл

@@ -61,17 +61,17 @@ global.window.setup_channel_page = function(team_name, team_type, team_id, chann
);
React.render(
<Navbar teamName={team_name} />,
<Navbar teamDisplayName={team_name} />,
document.getElementById('navbar')
);
React.render(
<Sidebar teamName={team_name} teamType={team_type} />,
<Sidebar teamDisplayName={team_name} teamType={team_type} />,
document.getElementById('sidebar-left')
);
React.render(
<RenameTeamModal teamName={team_name} />,
<RenameTeamModal teamDisplayName={team_name} />,
document.getElementById('rename_team_modal')
);
@@ -91,7 +91,7 @@ global.window.setup_channel_page = function(team_name, team_type, team_id, chann
);
React.render(
<TeamMembersModal teamName={team_name} />,
<TeamMembersModal teamDisplayName={team_name} />,
document.getElementById('team_members_modal')
);
@@ -186,7 +186,7 @@ global.window.setup_channel_page = function(team_name, team_type, team_id, chann
);
React.render(
<SidebarRightMenu teamName={team_name} teamType={team_type} />,
<SidebarRightMenu teamDisplayName={team_name} teamType={team_type} />,
document.getElementById('sidebar-menu')
);

Просмотреть файл

@@ -2,13 +2,14 @@
// See License.txt for license information.
var ChannelStore = require('../stores/channel_store.jsx');
var TeamStore = require('../stores/team_store.jsx');
var Constants = require('../utils/constants.jsx');
global.window.setup_home_page = function() {
global.window.setup_home_page = function(teamURL) {
var last = ChannelStore.getLastVisitedName();
if (last == null || last.length === 0) {
window.location.replace("/channels/" + Constants.DEFAULT_CHANNEL);
window.location = teamURL + "/channels/" + Constants.DEFAULT_CHANNEL;
} else {
window.location.replace("/channels/" + last);
window.location = teamURL + "/channels/" + last;
}
}

Просмотреть файл

@@ -3,9 +3,9 @@
var Login = require('../components/login.jsx');
global.window.setup_login_page = function() {
global.window.setup_login_page = function(teamDisplayName, teamName) {
React.render(
<Login />,
<Login teamDisplayName={teamDisplayName} teamName={teamName}/>,
document.getElementById('login')
);
};

Просмотреть файл

@@ -3,13 +3,13 @@
var PasswordReset = require('../components/password_reset.jsx');
global.window.setup_password_reset_page = function(is_reset, team_name, domain, hash, data) {
global.window.setup_password_reset_page = function(is_reset, team_display_name, team_name, hash, data) {
React.render(
<PasswordReset
isReset={is_reset}
teamDisplayName={team_display_name}
teamName={team_name}
domain={domain}
hash={hash}
data={data}
/>,

Просмотреть файл

@@ -5,7 +5,7 @@ var SignupTeamComplete =require('../components/signup_team_complete.jsx');
global.window.setup_signup_team_complete_page = function(email, name, data, hash) {
React.render(
<SignupTeamComplete name={name} email={email} hash={hash} data={data} />,
<SignupTeamComplete name={name} email={email} hash={hash} data={data}/>,
document.getElementById('signup-team-complete')
);
};
};