diff --git a/app/components/hooks-list-item.coffee b/app/components/hooks-list-item.coffee index 1a7b3d72..5298c717 100644 --- a/app/components/hooks-list-item.coffee +++ b/app/components/hooks-list-item.coffee @@ -1,14 +1,18 @@ `import Ember from 'ember'` +`import config from 'travis/config/environment'` HooksListItemComponent = Ember.Component.extend tagName: 'li' classNames: ['row'] classNameBindings: ['hook.active:active'] + + githubOrgsOauthAccessSettingsUrl: config.githubOrgsOauthAccessSettingsUrl + actions: handleToggleError: -> - @set("errorMessage", "There was an error") + @set("showError", true) close: -> - @set("errorMessage", null) + @set("showError", false) `export default HooksListItemComponent` diff --git a/app/styles/app/layouts/profile.sass b/app/styles/app/layouts/profile.sass index 83ebceee..50669d75 100644 --- a/app/styles/app/layouts/profile.sass +++ b/app/styles/app/layouts/profile.sass @@ -201,7 +201,7 @@ p.profile-user-last padding: 0 $column-gutter/2; p position: relative - padding: $column-gutter/2; + padding: $column-gutter/2 $column-gutter*2 $column-gutter/2 $column-gutter/2; color: #de4248 background-color: #f1b6ad &:after diff --git a/app/templates/components/hooks-list-item.hbs b/app/templates/components/hooks-list-item.hbs index b8cd6234..50dde162 100644 --- a/app/templates/components/hooks-list-item.hbs +++ b/app/templates/components/hooks-list-item.hbs @@ -11,10 +11,18 @@ {{hook.slug}} {{hook.description}} -{{#if errorMessage}} +{{#if showError}}

- {{errorMessage}} -

+ An error happened when we tried to alter settings on GitHub. + {{#if githubOrgsOauthAccessSettingsUrl}} + It may be caused by API restrictions, please + + review and add + your authorized Orgs. + {{/if}} + +

{{/if}}