open-nomad/ui/app/components/task-context-sidebar.js
2023-01-10 16:35:53 -05:00

24 lines
508 B
JavaScript

// @ts-check
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
export default class TaskContextSidebarComponent extends Component {
get isSideBarOpen() {
return !!this.args.task;
}
keyCommands = [
{
label: 'Close Task Logs Sidebar',
pattern: ['Escape'],
action: () => this.args.fns.closeSidebar(),
},
];
@tracked wide = false;
@action toggleWide() {
this.wide = !this.wide;
}
}