update according to comments
This commit is contained in:
parent
38be0fc90c
commit
243bd4aed5
|
@ -2,11 +2,5 @@ import TravisRoute from 'travis/routes/basic';
|
|||
import config from 'travis/config/environment';
|
||||
|
||||
export default TravisRoute.extend({
|
||||
needsAuth: false,
|
||||
|
||||
activate: function() {
|
||||
if (config.enterprise) {
|
||||
return this.transitionTo('auth');
|
||||
}
|
||||
}
|
||||
needsAuth: false
|
||||
});
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
{{#if allHooks.isLoaded}}
|
||||
|
||||
<header>
|
||||
|
||||
{{#unless config.enterprise}}
|
||||
{{#if config.billingEndpoint}}
|
||||
<div class="cta-btn">
|
||||
{{#if subscribeButtonInfo.subscribed}}
|
||||
<a class="btn btn-activated" href={{billingUrl}}>Subscription active!</a>
|
||||
{{else}}
|
||||
{{#if subscribeButtonInfo.education}}
|
||||
<a class="btn btn-activated" href={{billingUrl}}>Educational account!</a>
|
||||
{{#if subscribeButtonInfo.subscribed}}
|
||||
<a class="btn btn-activated" href={{billingUrl}}>Subscription active!</a>
|
||||
{{else}}
|
||||
<a class="btn btn-activate" href={{billingUrl}}> Sign up this account!</a>
|
||||
{{#if subscribeButtonInfo.education}}
|
||||
<a class="btn btn-activated" href={{billingUrl}}>Educational account!</a>
|
||||
{{else}}
|
||||
<a class="btn btn-activate" href={{billingUrl}}> Sign up this account!</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
|
||||
<div class="profile-header">
|
||||
<h1>{{accountName}}</h1>
|
||||
|
|
|
@ -19,7 +19,7 @@ export default Ember.HistoryLocation.extend({
|
|||
getURL: function() {
|
||||
var url;
|
||||
url = this._super.apply(this, arguments);
|
||||
if (location.pathname === '/') {
|
||||
if (location.pathname === '/' && !config.enterprise) {
|
||||
if (this.get('auth.signedIn')) {
|
||||
return '/repositories';
|
||||
} else {
|
||||
|
@ -34,7 +34,7 @@ export default Ember.HistoryLocation.extend({
|
|||
},
|
||||
|
||||
formatURL: function(logicalPath) {
|
||||
if (logicalPath === '/repositories' || logicalPath === '/home' || logicalPath === '/home-pro') {
|
||||
if (!config.enterprise && (logicalPath === '/repositories' || logicalPath === '/home' || logicalPath === '/home-pro')) {
|
||||
return '/';
|
||||
} else {
|
||||
return this._super(...arguments);
|
||||
|
|
|
@ -37,7 +37,7 @@ module.exports = function(environment) {
|
|||
};
|
||||
|
||||
if (typeof process !== 'undefined') {
|
||||
if (process.env.TRAVIS_PRO) {
|
||||
if (process.env.TRAVIS_PRO && !process.env.TRAVIS_ENTERPRISE) {
|
||||
// set defaults for pro if it's used
|
||||
// TODO: we have the same defaults also in ruby process,
|
||||
// it would be nice to move it to one place. In theory
|
||||
|
|
Loading…
Reference in New Issue
Block a user