Commit c71fc0da authored by akiraohgaki's avatar akiraohgaki

Add menu

parent d9e4f6a8
......@@ -137,6 +137,7 @@ export default class ToolbarComponent extends BaseComponent {
<app-iconbutton data-action="menu_open"
data-title="Other Operations..." data-icon="more_vert"></app-iconbutton><br>
<app-menu data-width="250px" data-offset-x="-220px">
<a slot="menuitem" href="#" data-action="webview_appBugsPage">Report a Bug</a>
<a slot="menuitem" href="#" data-action="general_about">About This App</a>
</app-menu>
</li>
......@@ -180,6 +181,10 @@ export default class ToolbarComponent extends BaseComponent {
case 'menu_open':
this.contentRoot.querySelector('app-menu').open();
break;
case 'webview_appBugsPage':
this.dispatch('webview_appBugsPage', {});
this.contentRoot.querySelector('app-menu').close();
break;
case 'general_about':
this.dispatch('general_about', {});
this.contentRoot.querySelector('app-menu').close();
......
......@@ -4,6 +4,8 @@ export default class WebviewHandler {
this._stateManager = stateManager;
this._ipcRenderer = ipcRenderer;
this._appPackage = this._ipcRenderer.sendSync('app', 'package');
this._partition = 'persist:opendesktop';
this._preload = './scripts/renderers/webview.js';
this._startPage = this._ipcRenderer.sendSync('store', 'startPage');
......@@ -67,6 +69,10 @@ export default class WebviewHandler {
.add('webview_stop', () => {
this._webviewComponent.stop();
return false;
})
.add('webview_appBugsPage', () => {
this._webviewComponent.loadUrl(this._appPackage.bugs);
return false;
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment