-
Notifications
You must be signed in to change notification settings - Fork 5
fix(VLE): Show notes launcher and chatbot toggle in tabbed mode #2258
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <button matIconButton matTooltip="AI Assistant" (click)="emitToggleChatbot()"> | ||
| <mat-icon>auto_awesome</mat-icon> | ||
| </button> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
|
||
| import { ChatbotLauncherComponent } from './chatbot-launcher.component'; | ||
|
|
||
| describe('ChatbotLauncherComponent', () => { | ||
| let component: ChatbotLauncherComponent; | ||
| let fixture: ComponentFixture<ChatbotLauncherComponent>; | ||
|
|
||
| beforeEach(async () => { | ||
| await TestBed.configureTestingModule({ | ||
| imports: [ChatbotLauncherComponent] | ||
| }).compileComponents(); | ||
|
|
||
| fixture = TestBed.createComponent(ChatbotLauncherComponent); | ||
| component = fixture.componentInstance; | ||
| fixture.detectChanges(); | ||
| }); | ||
|
|
||
| it('should create', () => { | ||
| expect(component).toBeTruthy(); | ||
| }); | ||
| }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||
| import { Component, EventEmitter, Output } from '@angular/core'; | ||||||
| import { MatButtonModule } from '@angular/material/button'; | ||||||
| import { MatIconModule } from '@angular/material/icon'; | ||||||
| import { MatTooltipModule } from '@angular/material/tooltip'; | ||||||
|
|
||||||
| @Component({ | ||||||
| selector: 'chatbot-launcher', | ||||||
| imports: [MatButtonModule, MatIconModule, MatTooltipModule], | ||||||
| templateUrl: './chatbot-launcher.component.html', | ||||||
| styleUrl: './chatbot-launcher.component.scss' | ||||||
|
||||||
| }) | ||||||
| export class ChatbotLauncherComponent { | ||||||
| @Output() toggleChatbot = new EventEmitter<void>(); | ||||||
|
|
||||||
| emitToggleChatbot(): void { | ||||||
|
||||||
| emitToggleChatbot(): void { | |
| protected emitToggleChatbot(): void { |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,20 @@ | ||
| <mat-tab-group | ||
| [selectedIndex]="selectedTabIndex" | ||
| (focusChange)="goToGroupTab($event.index)" | ||
| animationDuration="0ms" | ||
| class="app-bg-bg" | ||
| > | ||
| @for (node of groupNodes; track node.id) { | ||
| <mat-tab [label]="node.title" [disabled]="node.disabled" /> | ||
| } | ||
| </mat-tab-group> | ||
| <div class="flex gap-2"> | ||
| <mat-tab-group | ||
| [selectedIndex]="selectedTabIndex" | ||
| (focusChange)="goToGroupTab($event.index)" | ||
| animationDuration="0ms" | ||
| class="flex-grow" | ||
| > | ||
| @for (node of groupNodes; track node.id) { | ||
| <mat-tab [label]="node.title" [disabled]="node.disabled" /> | ||
| } | ||
| </mat-tab-group> | ||
| <div> | ||
| @if (notebookConfig?.itemTypes.note.enabled) { | ||
| <notebook-launcher [notebookConfig]="notebookConfig" /> | ||
| } | ||
| @if (chatbotEnabled) { | ||
| <chatbot-launcher (toggleChatbot)="emitToggleChatbot()" /> | ||
| } | ||
| </div> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.