From c7ddd9c2f36083c59c71c52c06ae54f5033df020 Mon Sep 17 00:00:00 2001 From: Sundaram Dubey <56407566+maze-runnar@users.noreply.github.com> Date: Sun, 22 Dec 2019 19:28:07 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20side=20menu=20icon=20should=20not=20be?= =?UTF-8?q?=20visible=20in=20mobile=20when=20there=E2=80=A6=20(#3665)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- app/controllers/public.js | 5 +++++ app/templates/public.hbs | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/controllers/public.js b/app/controllers/public.js index e0f4b9f9b62..5f5b7e183f6 100644 --- a/app/controllers/public.js +++ b/app/controllers/public.js @@ -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'); diff --git a/app/templates/public.hbs b/app/templates/public.hbs index d8e8166fd15..55cfa5fbb25 100644 --- a/app/templates/public.hbs +++ b/app/templates/public.hbs @@ -26,11 +26,13 @@
{{#if device.isMobile}} - - {{#if isMenuOpen}} - {{public/side-menu class='toggle menu' event=model}} + {{#if displaySideMenu}} + + {{#if isMenuOpen}} + {{public/side-menu class='toggle menu' event=model}} + {{/if}} {{/if}} {{else}} {{#ui-sticky context='#public-event-content' observeChanges=true}}