Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community: chat with some preloaded data (fixes #7337) #7352

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Next Next commit
Optionally show/hide chat toolbar
  • Loading branch information
Mutugiii committed Nov 29, 2023
commit 84e425ab79c7951c0c695cb453f19037a08c2ae9
2 changes: 1 addition & 1 deletion src/app/chat/chat.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mat-toolbar class="titlebar">
<mat-toolbar *ngIf="showToolbar" class="titlebar">
<button mat-icon-button (click)="goBack()"><mat-icon>arrow_back</mat-icon></button>
<span i18n>AI Chat</span>
<span class="toolbar-fill"></span>
Expand Down
3 changes: 2 additions & 1 deletion src/app/chat/chat.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { Component, Input } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

@Component({
Expand All @@ -7,6 +7,7 @@ import { ActivatedRoute, Router } from '@angular/router';
styleUrls: [ './chat.scss' ]
})
export class ChatComponent {
@Input() showToolbar = true;

constructor(
private route: ActivatedRoute,
Expand Down
3 changes: 3 additions & 0 deletions src/app/community/community.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ <h3 style="text-align: right; margin-right: 0.5rem;">
</h3>
<planet-news-list [items]="news" [shareTarget]="shareTarget" (viewChange)="toggleShowButton($event)" [viewableId]="teamId"></planet-news-list>
</mat-tab>
<mat-tab i18n-label label="Community Advisor">
<planet-chat [showToolbar]="showChatToolbar"></planet-chat>
</mat-tab>
<mat-tab i18n-label label="Community Leaders">
<div class="card-grid">
<mat-card *ngFor="let councillor of councillors">
Expand Down
1 change: 1 addition & 0 deletions src/app/community/community.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class CommunityComponent implements OnInit, OnDestroy {
resizeCalendar: any = false;
deviceType: DeviceType;
deviceTypes = DeviceType;
showChatToolbar = false;

constructor(
private dialog: MatDialog,
Expand Down