mirror of
https://github.com/block-core/blockcore-notes.git
synced 2024-09-29 22:40:44 +00:00
Implement Mention Module for User Referencing
Signed-off-by: Harshil-Jani <harshiljani2002@gmail.com>
This commit is contained in:
parent
5d91211754
commit
80a07af531
21
package-lock.json
generated
21
package-lock.json
generated
@ -31,6 +31,7 @@
|
|||||||
"@scure/bip39": "^1.1.1",
|
"@scure/bip39": "^1.1.1",
|
||||||
"@twogate/ngx-photo-gallery": "^1.4.0",
|
"@twogate/ngx-photo-gallery": "^1.4.0",
|
||||||
"@types/sharedworker": "^0.0.91",
|
"@types/sharedworker": "^0.0.91",
|
||||||
|
"angular-mentions": "^1.5.0",
|
||||||
"angularx-qrcode": "^15.0.1",
|
"angularx-qrcode": "^15.0.1",
|
||||||
"html5-qrcode": "^2.3.7",
|
"html5-qrcode": "^2.3.7",
|
||||||
"idb": "^7.1.1",
|
"idb": "^7.1.1",
|
||||||
@ -4729,6 +4730,18 @@
|
|||||||
"ajv": "^8.8.2"
|
"ajv": "^8.8.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/angular-mentions": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/angular-mentions/-/angular-mentions-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-6l63v7AvrX9vFzj2h7jAPTnQ390IomCz3HiQP+b3PnDvaZiycd+tiVavi5RxAIX8WYjsamAR+tTPCkOkBkqZ+w==",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": ">=7.2.0",
|
||||||
|
"@angular/core": ">=7.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/angularx-qrcode": {
|
"node_modules/angularx-qrcode": {
|
||||||
"version": "15.0.1",
|
"version": "15.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/angularx-qrcode/-/angularx-qrcode-15.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/angularx-qrcode/-/angularx-qrcode-15.0.1.tgz",
|
||||||
@ -16429,6 +16442,14 @@
|
|||||||
"fast-deep-equal": "^3.1.3"
|
"fast-deep-equal": "^3.1.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"angular-mentions": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/angular-mentions/-/angular-mentions-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-6l63v7AvrX9vFzj2h7jAPTnQ390IomCz3HiQP+b3PnDvaZiycd+tiVavi5RxAIX8WYjsamAR+tTPCkOkBkqZ+w==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"angularx-qrcode": {
|
"angularx-qrcode": {
|
||||||
"version": "15.0.1",
|
"version": "15.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/angularx-qrcode/-/angularx-qrcode-15.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/angularx-qrcode/-/angularx-qrcode-15.0.1.tgz",
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
"@scure/bip39": "^1.1.1",
|
"@scure/bip39": "^1.1.1",
|
||||||
"@twogate/ngx-photo-gallery": "^1.4.0",
|
"@twogate/ngx-photo-gallery": "^1.4.0",
|
||||||
"@types/sharedworker": "^0.0.91",
|
"@types/sharedworker": "^0.0.91",
|
||||||
|
"angular-mentions": "^1.5.0",
|
||||||
"angularx-qrcode": "^15.0.1",
|
"angularx-qrcode": "^15.0.1",
|
||||||
"html5-qrcode": "^2.3.7",
|
"html5-qrcode": "^2.3.7",
|
||||||
"idb": "^7.1.1",
|
"idb": "^7.1.1",
|
||||||
|
@ -29,6 +29,7 @@ import { MatStepperModule } from '@angular/material/stepper';
|
|||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||||
import { MatChipsModule } from '@angular/material/chips';
|
import { MatChipsModule } from '@angular/material/chips';
|
||||||
import { MatPaginatorModule } from '@angular/material/paginator';
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
||||||
|
import { MentionModule } from 'angular-mentions';
|
||||||
import { AuthGuardService } from './services/auth-guard';
|
import { AuthGuardService } from './services/auth-guard';
|
||||||
import { ConnectComponent } from './connect/connect';
|
import { ConnectComponent } from './connect/connect';
|
||||||
import { LogoutComponent } from './logout/logout';
|
import { LogoutComponent } from './logout/logout';
|
||||||
@ -294,6 +295,7 @@ import { ExampleComponent } from './example/example';
|
|||||||
MatPaginatorModule,
|
MatPaginatorModule,
|
||||||
MatSlideToggleModule,
|
MatSlideToggleModule,
|
||||||
MatAutocompleteModule,
|
MatAutocompleteModule,
|
||||||
|
MentionModule,
|
||||||
PickerModule,
|
PickerModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
<div mat-dialog-content class="mat-dialog-content">
|
<div mat-dialog-content class="mat-dialog-content">
|
||||||
<mat-form-field class="input-full-width">
|
<mat-form-field class="input-full-width">
|
||||||
<mat-label>What's on your mind?</mat-label>
|
<mat-label>What's on your mind?</mat-label>
|
||||||
<textarea appContentEditor appAutoInputHeight #noteContent class="note-input noscrollbars" matInput type="text" formControlName="content" rows="2"></textarea>
|
<textarea appContentEditor appAutoInputHeight #noteContent class="note-input noscrollbars" matInput type="text" formControlName="content" rows="2" [mention]="followingUsers"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<!-- <mat-autocomplete #auto="matAutocomplete">
|
<!-- <mat-autocomplete #auto="matAutocomplete">
|
||||||
|
@ -61,6 +61,8 @@ export class EditorComponent {
|
|||||||
|
|
||||||
subscriptions: Subscription[] = [];
|
subscriptions: Subscription[] = [];
|
||||||
|
|
||||||
|
followingUsers : string [] = this.profileService.following.map(follower => follower.name);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private snackBar: MatSnackBar,
|
private snackBar: MatSnackBar,
|
||||||
public articleService: ArticleService,
|
public articleService: ArticleService,
|
||||||
|
Loading…
Reference in New Issue
Block a user