From c7c54daaadaec2a4e859581f68c6b6565dcfb71f Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Tue, 7 Sep 2021 14:59:09 -0400 Subject: [PATCH] chore: Add overlow scroll class for linux and windows frame --- ui/desktop/app/controllers/application.js | 14 ++++++++++++++ ui/desktop/app/routes/application.js | 3 --- ui/desktop/app/templates/application.hbs | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ui/desktop/app/controllers/application.js b/ui/desktop/app/controllers/application.js index 0eb5226e0..10cf5fcc7 100644 --- a/ui/desktop/app/controllers/application.js +++ b/ui/desktop/app/controllers/application.js @@ -1,6 +1,7 @@ import Controller from '@ember/controller'; import { inject as service } from '@ember/service'; import config from '../config/environment'; +import { computed } from '@ember/object'; export default class ApplicationController extends Controller { // =services @@ -10,4 +11,17 @@ export default class ApplicationController extends Controller { // =attributes notifyTimeout = config.notifyTimeout; + + // =attributes + + /** + * Display OS window actions (minimize, fullscreen, close) for + * Windows and Linux as OS frame/shell is disable. + * Does not apply to MacOS. + * @type {boolean} + */ + @computed('isMacOS') + get isFrameless() { + return !this.isMacOS; + } } diff --git a/ui/desktop/app/routes/application.js b/ui/desktop/app/routes/application.js index 1ea18ec04..5a115152a 100644 --- a/ui/desktop/app/routes/application.js +++ b/ui/desktop/app/routes/application.js @@ -32,13 +32,10 @@ export default class ApplicationRoute extends Route { /** * Add OS config on controller. - * Display OS window actions (minimize, fullscreen, close) for - * Windows and Linux. Not enabled for MacOS. */ async setupController(controller) { controller.set('isMacOS', await this.ipc.invoke('isMacOS')); controller.set('isWindowsOS', await this.ipc.invoke('isWindowsOS')); - controller.set('showWindowActions', !controller.isMacOS); } // =actions diff --git a/ui/desktop/app/templates/application.hbs b/ui/desktop/app/templates/application.hbs index 24293ed6d..501eb1db1 100644 --- a/ui/desktop/app/templates/application.hbs +++ b/ui/desktop/app/templates/application.hbs @@ -1,7 +1,7 @@ {{page-title (app-name)}} @@ -19,7 +19,7 @@ {{/if}} - {{#if this.showWindowActions}} + {{#if this.isFrameless}}