integration ngx-contextmenu
This commit is contained in:
parent
5d9bdccdf9
commit
7d4e4e90c6
27
package-lock.json
generated
27
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sengi",
|
"name": "sengi",
|
||||||
"version": "0.9.1",
|
"version": "0.11.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -214,6 +214,23 @@
|
|||||||
"tslib": "^1.9.0"
|
"tslib": "^1.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@angular/cdk": {
|
||||||
|
"version": "7.3.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.3.7.tgz",
|
||||||
|
"integrity": "sha512-xbXxhHHKGkVuW6K7pzPmvpJXIwpl0ykBnvA2g+/7Sgy5Pd35wCC+UtHD9RYczDM/mkygNxMQtagyCErwFnDtQA==",
|
||||||
|
"requires": {
|
||||||
|
"parse5": "^5.0.0",
|
||||||
|
"tslib": "^1.7.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"parse5": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==",
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@angular/cli": {
|
"@angular/cli": {
|
||||||
"version": "7.3.4",
|
"version": "7.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-7.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-7.3.4.tgz",
|
||||||
@ -8160,6 +8177,14 @@
|
|||||||
"integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==",
|
"integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"ngx-contextmenu": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ngx-contextmenu/-/ngx-contextmenu-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-S8W7YUJJ+McWCfHv04gWURK7doJBl+1YZUynyP8QQMMwGd02OiggBp38HrEHAdMr4TdvKyo4Td5Ud63x28tpLg==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nice-try": {
|
"nice-try": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^7.2.7",
|
"@angular/animations": "^7.2.7",
|
||||||
|
"@angular/cdk": "^7.2.7",
|
||||||
"@angular/common": "^7.2.7",
|
"@angular/common": "^7.2.7",
|
||||||
"@angular/compiler": "^7.2.7",
|
"@angular/compiler": "^7.2.7",
|
||||||
"@angular/core": "^7.2.7",
|
"@angular/core": "^7.2.7",
|
||||||
@ -46,6 +47,7 @@
|
|||||||
"bootstrap": "^4.1.3",
|
"bootstrap": "^4.1.3",
|
||||||
"core-js": "^2.5.4",
|
"core-js": "^2.5.4",
|
||||||
"emojione": "~4.5.0",
|
"emojione": "~4.5.0",
|
||||||
|
"ngx-contextmenu": "^5.2.0",
|
||||||
"rxjs": "^6.4.0",
|
"rxjs": "^6.4.0",
|
||||||
"tslib": "^1.9.0",
|
"tslib": "^1.9.0",
|
||||||
"zone.js": "^0.8.29"
|
"zone.js": "^0.8.29"
|
||||||
|
@ -11,6 +11,7 @@ import { NgxsModule } from '@ngxs/store';
|
|||||||
import { NgxsStoragePluginModule } from '@ngxs/storage-plugin';
|
import { NgxsStoragePluginModule } from '@ngxs/storage-plugin';
|
||||||
|
|
||||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { ContextMenuModule } from 'ngx-contextmenu';
|
||||||
|
|
||||||
import { AppComponent } from "./app.component";
|
import { AppComponent } from "./app.component";
|
||||||
import { LeftSideBarComponent } from "./components/left-side-bar/left-side-bar.component";
|
import { LeftSideBarComponent } from "./components/left-side-bar/left-side-bar.component";
|
||||||
@ -128,7 +129,8 @@ const routes: Routes = [
|
|||||||
StreamsState,
|
StreamsState,
|
||||||
SettingsState
|
SettingsState
|
||||||
]),
|
]),
|
||||||
NgxsStoragePluginModule.forRoot()
|
NgxsStoragePluginModule.forRoot(),
|
||||||
|
ContextMenuModule.forRoot()
|
||||||
],
|
],
|
||||||
providers: [AuthService, NavigationService, NotificationService, MastodonService, StreamingService],
|
providers: [AuthService, NavigationService, NotificationService, MastodonService, StreamingService],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
|
@ -27,7 +27,19 @@
|
|||||||
<fa-icon [icon]="faWindowCloseRegular"></fa-icon>
|
<fa-icon [icon]="faWindowCloseRegular"></fa-icon>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- <a href class="action-bar__link action-bar__link--more" title="More" (click)="more()">
|
<!-- <a href class="action-bar__link action-bar__link--more" (click)="return false;" title="More" [contextMenu]="basicMenu" [contextMenuSubject]="item"> -->
|
||||||
<fa-icon [icon]="faEllipsisH"></fa-icon>
|
<fa-icon [icon]="faEllipsisH" [contextMenu]="basicMenu" [contextMenuSubject]="item"></fa-icon>
|
||||||
</a> -->
|
<!-- </a> -->
|
||||||
|
<context-menu #basicMenu>
|
||||||
|
<ng-template contextMenuItem (execute)="showMessage('Hi, ' + $event.item.name)">
|
||||||
|
Say hi!
|
||||||
|
</ng-template>
|
||||||
|
<ng-template contextMenuItem divider="true"></ng-template>
|
||||||
|
<ng-template contextMenuItem let-item (execute)="showMessage($event.item.name + ' said: ' + $event.item.otherProperty)">
|
||||||
|
Bye, {{item?.name}}
|
||||||
|
</ng-template>
|
||||||
|
<ng-template contextMenuItem passive="true">
|
||||||
|
Input something: <input type="text">
|
||||||
|
</ng-template>
|
||||||
|
</context-menu>
|
||||||
</div>
|
</div>
|
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, OnInit, OnDestroy, Input, Output, EventEmitter, ViewChild } from '@angular/core';
|
||||||
import { HttpErrorResponse } from '@angular/common/http';
|
import { HttpErrorResponse } from '@angular/common/http';
|
||||||
import { Store } from '@ngxs/store';
|
import { Store } from '@ngxs/store';
|
||||||
import { Observable, Subscription } from 'rxjs';
|
import { Observable, Subscription } from 'rxjs';
|
||||||
@ -12,6 +12,8 @@ import { ToolsService } from '../../../../services/tools.service';
|
|||||||
import { NotificationService } from '../../../../services/notification.service';
|
import { NotificationService } from '../../../../services/notification.service';
|
||||||
import { StatusWrapper } from '../../../../models/common.model';
|
import { StatusWrapper } from '../../../../models/common.model';
|
||||||
|
|
||||||
|
import { ContextMenuComponent } from 'ngx-contextmenu';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-action-bar',
|
selector: 'app-action-bar',
|
||||||
templateUrl: './action-bar.component.html',
|
templateUrl: './action-bar.component.html',
|
||||||
@ -26,6 +28,12 @@ export class ActionBarComponent implements OnInit, OnDestroy {
|
|||||||
faEllipsisH = faEllipsisH;
|
faEllipsisH = faEllipsisH;
|
||||||
faLock = faLock;
|
faLock = faLock;
|
||||||
|
|
||||||
|
@ViewChild(ContextMenuComponent) public basicMenu: ContextMenuComponent;
|
||||||
|
public items = [
|
||||||
|
{ name: 'John', otherProperty: 'Foo' },
|
||||||
|
{ name: 'Joe', otherProperty: 'Bar' }
|
||||||
|
];
|
||||||
|
|
||||||
@Input() statusWrapper: StatusWrapper;
|
@Input() statusWrapper: StatusWrapper;
|
||||||
@Output() replyEvent = new EventEmitter();
|
@Output() replyEvent = new EventEmitter();
|
||||||
@Output() cwIsActiveEvent = new EventEmitter<boolean>();
|
@Output() cwIsActiveEvent = new EventEmitter<boolean>();
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.lds-ripple {
|
.lds-ripple {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user