Skip to content

Commit

Permalink
Add link to chat page
Browse files Browse the repository at this point in the history
  • Loading branch information
miladsoft committed Nov 1, 2024
1 parent 2d4bb0d commit 8505bd9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 26 deletions.
58 changes: 34 additions & 24 deletions src/app/components/bookmark/bookmark.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,36 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatSelectModule } from '@angular/material/select';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatTooltipModule } from '@angular/material/tooltip';
import { RouterLink } from '@angular/router';
import { Router, RouterLink } from '@angular/router';
import { BookmarkService } from 'app/services/bookmark.service';
import { Project } from 'app/interface/project.interface';
import { StorageService } from 'app/services/storage.service';
import { Observable, Subject, takeUntil } from 'rxjs';

@Component({
selector: 'app-bookmark',
standalone: true,
imports: [
MatButtonModule,
RouterLink,
MatIconModule,
AngorCardComponent,
CdkScrollable,
MatFormFieldModule,
MatSelectModule,
MatOptionModule,
MatInputModule,
MatSlideToggleModule,
NgClass,
MatTooltipModule,
MatProgressBarModule,
AngorFindByKeyPipe,
PercentPipe,
I18nPluralPipe,
CommonModule,
],
templateUrl: './bookmark.component.html',
styleUrls: ['./bookmark.component.scss']
selector: 'app-bookmark',
standalone: true,
imports: [
MatButtonModule,
RouterLink,
MatIconModule,
AngorCardComponent,
CdkScrollable,
MatFormFieldModule,
MatSelectModule,
MatOptionModule,
MatInputModule,
MatSlideToggleModule,
NgClass,
MatTooltipModule,
MatProgressBarModule,
AngorFindByKeyPipe,
PercentPipe,
I18nPluralPipe,
CommonModule,
],
templateUrl: './bookmark.component.html',
styleUrls: ['./bookmark.component.scss']
})
export class BookmarkComponent implements OnInit, OnDestroy {
savedProjects: Project[] = [];
Expand All @@ -51,6 +51,7 @@ export class BookmarkComponent implements OnInit, OnDestroy {
constructor(
private _bookmarkService: BookmarkService,
private _storageService: StorageService,
private _router: Router,
) {
this.bookmarks$ = this._bookmarkService.bookmarks$;
}
Expand Down Expand Up @@ -110,4 +111,13 @@ export class BookmarkComponent implements OnInit, OnDestroy {
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}

goToProjectDetails(project: Project): void {
this._router.navigate(['/profile', project.nostrPubKey]);
}
openChat(pubKey : string): void
{
this._router.navigate(['/chat', pubKey]);
}

}
5 changes: 3 additions & 2 deletions src/app/components/explore/explore.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ export class ExploreComponent implements OnInit, OnDestroy {
}


openChat(pubKey: string): void {

openChat(pubKey : string): void
{
this._router.navigate(['/chat', pubKey]);
}


Expand Down

0 comments on commit 8505bd9

Please sign in to comment.