Better menus

This commit is contained in:
Gregory Schier 2016-07-15 23:07:27 -07:00
parent 8688a9c920
commit 8f77b18b21
3 changed files with 86 additions and 67 deletions

View File

@ -70,8 +70,10 @@ app.on('ready', () => {
mainWindow = null; mainWindow = null;
}); });
var template = [{ var template = [
{
label: "Application", label: "Application",
role: "window",
submenu: [ submenu: [
{label: "About Application", selector: "orderFrontStandardAboutPanel:"}, {label: "About Application", selector: "orderFrontStandardAboutPanel:"},
{type: "separator"}, {type: "separator"},
@ -83,7 +85,8 @@ app.on('ready', () => {
} }
} }
] ]
}, { },
{
label: "Edit", label: "Edit",
submenu: [ submenu: [
{label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:"}, {label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:"},
@ -94,8 +97,10 @@ app.on('ready', () => {
{label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:"}, {label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:"},
{label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:"} {label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:"}
] ]
}, { },
{
label: "View", label: "View",
role: "window",
submenu: [ submenu: [
{ {
label: "Actual Size", label: "Actual Size",
@ -125,11 +130,31 @@ app.on('ready', () => {
} }
} }
] ]
}]; },
{
label: "Help",
role: "help",
submenu: [
{
label: "Report an Issue...",
click: () => {
electron.shell.openExternal('mailto:support@insomnia.rest');
}
},
{
label: "Insomnia Help",
accelerator: "CmdOrCtrl+?",
click: () => {
electron.shell.openExternal('http://insomnia.rest');
}
}
]
}
];
if (IS_DEV) { if (IS_DEV) {
template.push({ template.push({
label: 'View', label: 'Developer',
submenu: [{ submenu: [{
label: 'Reload', label: 'Reload',
accelerator: 'Command+R', accelerator: 'Command+R',

View File

@ -98,13 +98,13 @@ class Sidebar extends Component {
{this._renderChildren(children)} {this._renderChildren(children)}
</ul> </ul>
<footer className="sidebar__footer form-control form-control--underlined"> {/*<footer className="sidebar__footer form-control form-control--underlined">*/}
<Input {/*<Input*/}
type="text" {/*type="text"*/}
placeholder="Filter Requests" {/*placeholder="Filter Requests"*/}
value={filter} {/*value={filter}*/}
onChange={this._onFilterChange.bind(this)}/> {/*onChange={this._onFilterChange.bind(this)}/>*/}
</footer> {/*</footer>*/}
</aside> </aside>
) )
} }

View File

@ -124,12 +124,6 @@
padding-right: $padding-sm; padding-right: $padding-sm;
} }
// put border on folders
.sidebar__row:not(:first-child) .sidebar__item--big {
border-top: 1px solid $hl-sm;
}
// ~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~ //
// Sidebar Clickable // // Sidebar Clickable //
// ~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~ //