Skip to content

Commit

Permalink
Ui/dismiss status menu click (#7337) (#7342)
Browse files Browse the repository at this point in the history
* dismiss status menu on click instead of hover

* allow redirect on 204
  • Loading branch information
Noelle Daley authored Aug 20, 2019
1 parent d44e697 commit bf334e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ui/app/services/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export default Service.extend({
method: opts.method || 'GET',
headers: opts.headers || {},
}).then(response => {
if (response.status >= 200 && response.status < 300) {
if (response.status === 204) {
return resolve();
} else if (response.status >= 200 && response.status < 300) {
return resolve(response.json());
} else {
return reject();
Expand Down
4 changes: 2 additions & 2 deletions ui/app/templates/components/status-menu.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#basic-dropdown-hover horizontalPosition="auto-left" verticalPosition="below" renderInPlace=media.isMobile as |d|}}
{{#basic-dropdown horizontalPosition="auto-left" verticalPosition="below" renderInPlace=media.isMobile as |d|}}
{{#d.trigger tagName=(if (eq type "replication") "span" "button") class=(if (eq type "replication") "" "button is-transparent")}}
<Icon @glyph={{glyphName}} @size="l" aria-label={{ariaLabel}} />
<div class="status-menu-label">
Expand All @@ -9,4 +9,4 @@
{{#d.content class=(concat "status-menu-content status-menu-content-" type)}}
{{partial partialName}}
{{/d.content}}
{{/basic-dropdown-hover}}
{{/basic-dropdown}}

0 comments on commit bf334e3

Please sign in to comment.