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 Controller from '@ember/controller';
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
import config from '../config/environment';
|
import config from '../config/environment';
|
||||||
|
import { computed } from '@ember/object';
|
||||||
|
|
||||||
export default class ApplicationController extends Controller {
|
export default class ApplicationController extends Controller {
|
||||||
// =services
|
// =services
|
||||||
@@ -10,4 +11,17 @@ export default class ApplicationController extends Controller {
|
|||||||
// =attributes
|
// =attributes
|
||||||
|
|
||||||
notifyTimeout = config.notifyTimeout;
|
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.
|
* Add OS config on controller.
|
||||||
* Display OS window actions (minimize, fullscreen, close) for
|
|
||||||
* Windows and Linux. Not enabled for MacOS.
|
|
||||||
*/
|
*/
|
||||||
async setupController(controller) {
|
async setupController(controller) {
|
||||||
controller.set('isMacOS', await this.ipc.invoke('isMacOS'));
|
controller.set('isMacOS', await this.ipc.invoke('isMacOS'));
|
||||||
controller.set('isWindowsOS', await this.ipc.invoke('isWindowsOS'));
|
controller.set('isWindowsOS', await this.ipc.invoke('isWindowsOS'));
|
||||||
controller.set('showWindowActions', !controller.isMacOS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// =actions
|
// =actions
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{{page-title (app-name)}}
|
{{page-title (app-name)}}
|
||||||
|
|
||||||
<Rose::Layout::Global
|
<Rose::Layout::Global
|
||||||
class='{{if this.isWindowsOS ' layout-scroll'}}'
|
class='{{if this.isFrameless ' layout-scroll'}}'
|
||||||
as |layout|
|
as |layout|
|
||||||
>
|
>
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<header.utilities as |utilities|>
|
<header.utilities as |utilities|>
|
||||||
{{#if this.showWindowActions}}
|
{{#if this.isFrameless}}
|
||||||
<Rose::Button
|
<Rose::Button
|
||||||
@iconOnly='flight-icons/x-16'
|
@iconOnly='flight-icons/x-16'
|
||||||
@style='warning'
|
@style='warning'
|
||||||
|
|||||||
Reference in new issue
Block a user