[fix] [channel drop-down list] Show the stable channel in all cases.

This commit is contained in:
Karim Hamidou 2017-01-15 16:21:57 -08:00
parent 857ce6eb33
commit 6a3532efc7

View file

@ -40,26 +40,23 @@ class UpdateChannelSection extends React.Component {
// HACK: Temporarily do not allow users to move on to the Salesforce channel.
// In the future we could implement this server-side via a "public" flag.
const allowedNames = ["nylas-mail", "beta"]
const allowedNames = ["stable", "nylas-mail", "beta"]
if (NylasEnv.config.get("salesforce")) {
allowedNames.push("salesforce");
}
// Also a HACK: show the stable channel only for people who are on the stable
// channel.
if (current.name === "stable") {
allowedNames.push("stable");
}
const allowed = available.filter(c => {
return allowedNames.includes(c.name) || c.name === current.name
});
const displayNameForChannel = (channel) => {
if (channel.name === 'beta') {
return 'Beta (Unstable)'
return 'Beta (Unstable)';
} else if (channel.name === 'nylas-mail') {
return 'Nylas Mail (Stable)'
return 'Nylas Mail (Stable)';
} else if (channel.name === 'stable') {
return 'Nylas Pro (Stable)';
}
return channel.name[0].toUpperCase() + channel.name.substr(1)