chore: Add overlow scroll class for linux and windows frame
This commit is contained in:
3 files changed
+16
-5
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{page-title (app-name)}}
|
||||
|
||||
<Rose::Layout::Global
|
||||
class='{{if this.isWindowsOS ' layout-scroll'}}'
|
||||
class='{{if this.isFrameless ' layout-scroll'}}'
|
||||
as |layout|
|
||||
>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{{/if}}
|
||||
|
||||
<header.utilities as |utilities|>
|
||||
{{#if this.showWindowActions}}
|
||||
{{#if this.isFrameless}}
|
||||
<Rose::Button
|
||||
@iconOnly='flight-icons/x-16'
|
||||
@style='warning'
|
||||
|
||||
Reference in new issue
Block a user