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