Skip to content

Commit

Permalink
fix: side menu icon should not be visible in mobile when there… (#3665)
Browse files Browse the repository at this point in the history
* side menu icon should not be visible

* adding displaySideMenu computed property

* using displaySideMenu computed property in public.hbs

* removing es5 getter

Co-authored-by: Kush Trivedi <kushthedude@gmail.com>
  • Loading branch information
2 people authored and iamareebjamal committed Dec 22, 2019
1 parent a256185 commit c7ddd9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions app/controllers/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export default Controller.extend({
displayEndDate: computed('model.startsAtDate', 'model.endsAtDate', function() {
return !moment(this.model.startsAtDate).isSame(this.model.endsAtDate, 'minute');
}),
displaySideMenu: computed('session.currentRouteName', function() {
if (this.session.currentRouteName) {
return this.session.currentRouteName !== 'public.cfs.new-session' && this.session.currentRouteName !== 'public.cfs.new-speaker' && this.session.currentRouteName !== 'public.cfs.edit-speaker' && this.session.currentRouteName !== 'public.cfs.edit-session';
}
}),
actions: {
toggleMenu() {
this.toggleProperty('isMenuOpen');
Expand Down
12 changes: 7 additions & 5 deletions app/templates/public.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
<div class="ui stackable grid">
<div class="three wide column" id="public-event-content">
{{#if device.isMobile}}
<button {{action 'toggleMenu'}} class="ui basic icon button mobile only">
<i class="content icon"></i>
</button>
{{#if isMenuOpen}}
{{public/side-menu class='toggle menu' event=model}}
{{#if displaySideMenu}}
<button {{action 'toggleMenu'}} class="ui basic icon button mobile only">
<i class="content icon"></i>
</button>
{{#if isMenuOpen}}
{{public/side-menu class='toggle menu' event=model}}
{{/if}}
{{/if}}
{{else}}
{{#ui-sticky context='#public-event-content' observeChanges=true}}
Expand Down

0 comments on commit c7ddd9c

Please sign in to comment.