32 lines
541 B
TypeScript
32 lines
541 B
TypeScript
import { Menu } from './menu/menu';
|
|
import { MenuType } from './menu/interface';
|
|
|
|
const menu = new Menu([
|
|
{
|
|
display: "df -h",
|
|
type: MenuType.ExecCommand,
|
|
command: ["df", "-h"],
|
|
},
|
|
{
|
|
display: "Games",
|
|
type: MenuType.SubMenu,
|
|
subMenu: [
|
|
{
|
|
display: "Chess",
|
|
type: MenuType.ExecCommand,
|
|
command: ["df", "-h"],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
display: "Reboot",
|
|
type: MenuType.Reboot,
|
|
},
|
|
{
|
|
display: "Shutdown",
|
|
type: MenuType.Shutdown,
|
|
},
|
|
], true);
|
|
|
|
menu.getSelection();
|