Skip to content

Commit

Permalink
Implement Mention Module for User Referencing (#139)
Browse files Browse the repository at this point in the history
Signed-off-by: Harshil-Jani <[email protected]>
  • Loading branch information
Harshil-Jani authored Oct 17, 2024
1 parent 2f4e567 commit f01541a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@scure/bip39": "^1.1.1",
"@twogate/ngx-photo-gallery": "^1.4.0",
"@types/sharedworker": "^0.0.91",
"angular-mentions": "^1.5.0",
"angularx-qrcode": "^15.0.1",
"html5-qrcode": "^2.3.7",
"idb": "^7.1.1",
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { MatStepperModule } from '@angular/material/stepper';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatChipsModule } from '@angular/material/chips';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MentionModule } from 'angular-mentions';
import { AuthGuardService } from './services/auth-guard';
import { ConnectComponent } from './connect/connect';
import { LogoutComponent } from './logout/logout';
Expand Down Expand Up @@ -294,6 +295,7 @@ import { ExampleComponent } from './example/example';
MatPaginatorModule,
MatSlideToggleModule,
MatAutocompleteModule,
MentionModule,
PickerModule,
FormsModule,
ReactiveFormsModule,
Expand Down
2 changes: 1 addition & 1 deletion src/app/editor/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<div mat-dialog-content class="mat-dialog-content">
<mat-form-field class="input-full-width">
<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-autocomplete #auto="matAutocomplete">
Expand Down
2 changes: 2 additions & 0 deletions src/app/editor/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export class EditorComponent {

subscriptions: Subscription[] = [];

followingUsers : string [] = this.profileService.following.map(follower => follower.name);

constructor(
private snackBar: MatSnackBar,
public articleService: ArticleService,
Expand Down

0 comments on commit f01541a

Please sign in to comment.