menu for win32

This commit is contained in:
crusader 2018-08-17 15:27:22 +09:00
parent 7c915f6d5f
commit 162a5992eb
4 changed files with 88 additions and 8 deletions

View File

@ -0,0 +1,6 @@
<p-menubar [model]="items" [autoDisplay]="false">
<div>
<input type="text" pInputText placeholder="Search">
<button pButton label="Logout" icon="fa fa-sign-out" style="margin-left:.25em"></button>
</div>
</p-menubar>

View File

@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { MenuItem } from 'primeng/primeng';
@Component({
selector: 'app-menu-bar',
@ -6,15 +7,88 @@ import { Component, OnInit } from '@angular/core';
})
export class MenuBarComponent implements OnInit {
private style: string;
private titleBarClass: string;
private showTopResize: boolean;
private showLeftResize: boolean;
private items: MenuItem[];
constructor(
) { }
ngOnInit() {
this.items = [
{
label: 'File',
icon: 'pi pi-fw pi-file',
items: [{
label: 'New',
icon: 'pi pi-fw pi-plus',
items: [
{ label: 'Project' },
{ label: 'Other' },
]
},
{ label: 'Open' },
{ separator: true },
{ label: 'Quit' }
]
},
{
label: 'Edit',
icon: 'pi pi-fw pi-pencil',
items: [
{ label: 'Delete', icon: 'pi pi-fw pi-trash' },
{ label: 'Refresh', icon: 'pi pi-fw pi-refresh' }
]
},
{
label: 'Help',
icon: 'pi pi-fw pi-question',
items: [
{
label: 'Contents'
},
{
label: 'Search',
icon: 'pi pi-fw pi-search',
items: [
{
label: 'Text',
items: [
{
label: 'Workspace'
}
]
},
{
label: 'File'
}
]
}
]
},
{
label: 'Actions',
icon: 'pi pi-fw pi-cog',
items: [
{
label: 'Edit',
icon: 'pi pi-fw pi-pencil',
items: [
{ label: 'Save', icon: 'pi pi-fw pi-save' },
{ label: 'Update', icon: 'pi pi-fw pi-save' },
]
},
{
label: 'Other',
icon: 'pi pi-fw pi-tags',
items: [
{ label: 'Delete', icon: 'pi pi-fw pi-minus' }
]
}
]
},
{
label: 'Quit', icon: 'pi pi-fw pi-times'
}
];
}
onTitlebarDoubleClick() {

View File

@ -66,7 +66,7 @@
"karma-jasmine": "~1.1.1",
"ngrx-store-freeze": "^0.2.4",
"npm-run-all": "^4.1.3",
"primeng": "^6.0.0",
"primeng": "^6.1.0",
"primer-support": "^4.0.0",
"protractor": "~5.3.0",
"source-map-support": "^0.5.8",

View File

@ -5384,9 +5384,9 @@ pretty-error@^2.0.2:
renderkid "^2.0.1"
utila "~0.4"
primeng@^6.0.0:
version "6.1.0"
resolved "https://nexus.loafle.net/repository/npm-all/primeng/-/primeng-6.1.0.tgz#3bf003ccd76d1c034df0a0b7ea68a8856e858d27"
primeng@^6.1.0:
version "6.1.2"
resolved "https://nexus.loafle.net/repository/npm-all/primeng/-/primeng-6.1.2.tgz#b13e6f27ab36482dc4f3657d20aa29f48428a9cb"
primer-support@^4.0.0:
version "4.6.0"