Skip to content

Commit

Permalink
replace name project
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasferreiralimax committed Oct 21, 2024
1 parent 171b745 commit 3a4d4e3
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section class="voicewave" [class.active]="start()" (click)="deactivateVoice()">
<section class="voicecapture" [class.active]="start()" (click)="deactivateVoice()">
<button class="exit" type="button" (click)="deactivateVoice()">
<i class="icon icon-exit">X</i>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
z-index: 999;
}

.voicewave {
.voicecapture {
align-items: center;
background-color: var(--voicecapture-background);
bottom: 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { VoiceWave } from './voicecapture-angular.component';
import { VoiceCapture } from './voicecapture-angular.component';

describe('VoiceWave', () => {
let component: VoiceWave;
let fixture: ComponentFixture<VoiceWave>;
describe('VoiceCapture', () => {
let component: VoiceCapture;
let fixture: ComponentFixture<VoiceCapture>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [VoiceWave],
imports: [VoiceCapture],
}).compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(VoiceWave);
fixture = TestBed.createComponent(VoiceCapture);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import {
} from '@angular/core';

@Component({
selector: 'voicewave',
selector: 'voicecapture',
standalone: true,
templateUrl: './voicecapture-angular.component.html',
styleUrls: [
'./voicecapture-angular.component.scss',
'./voicecapture-angular.variables.scss',
],
})
export class VoiceWave implements OnInit {
export class VoiceCapture implements OnInit {
@Input() start: WritableSignal<boolean> = signal(false);
@Output() voiceTranscript = new EventEmitter<string>();

Expand Down Expand Up @@ -91,7 +91,7 @@ export class VoiceWave implements OnInit {
if (!this.ignoreOnEnd && this.finalTranscript) {
this.updateText('');
document
.querySelector('.voicewave .exit')
.querySelector('.voicecapture .exit')
?.dispatchEvent(new Event('click'));
}
};
Expand Down Expand Up @@ -142,7 +142,7 @@ export class VoiceWave implements OnInit {
}

private updateText(text: string): void {
const textElement = document.querySelector('.voicewave p');
const textElement = document.querySelector('.voicecapture p');
if (textElement) {
textElement.textContent = text;
}
Expand Down
12 changes: 6 additions & 6 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
</div>
</div>
<div class="content">
<h2>VoiceWave Example</h2>
<h2>VoiceCapture Example</h2>
<button
class="button-voicewave-example"
class="button-voicecapture-example"
type="button"
(click)="openVoiceWave()"
(click)="openVoiceCapture()"
>
<span class="material-symbols-outlined"> &#xe029; </span> VoiceWave
<span class="material-symbols-outlined"> &#xe029; </span> VoiceCapture
</button>

<voicewave
[start]="isVoiceWaveExample"
<voicecapture
[start]="isVoiceCaptureExample"
(voiceTranscript)="returnVoiceTranscript($event)"
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AppComponent } from './app.component';
import { AppHeaderComponent } from './components/app-header/app-header.component';
import { ModalinstallComponent } from './components/modal-install/modal-install.component';
import { AppFooterComponent } from './components/app-footer/app-footer.component';
import { VoiceWave } from '../../projects/voicecapture-angular/src/public-api';
import { VoiceCapture } from '../../projects/voicecapture-angular/src/public-api';
import { By } from '@angular/platform-browser';

describe('AppComponent', () => {
Expand All @@ -20,7 +20,7 @@ describe('AppComponent', () => {
DarkmodeComponent,
AppHeaderComponent,
ModalinstallComponent,
VoiceWave,
VoiceCapture,
AppFooterComponent
],
}).compileComponents();
Expand Down
10 changes: 5 additions & 5 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AppHeaderComponent } from './components/app-header/app-header.component
import { ModalinstallComponent } from './components/modal-install/modal-install.component';
import { AppFooterComponent } from './components/app-footer/app-footer.component';
import { FormsModule } from '@angular/forms';
import { VoiceWave } from '../../projects/voicecapture-angular/src/public-api';
import { VoiceCapture } from '../../projects/voicecapture-angular/src/public-api';

@Component({
selector: 'app-root',
Expand All @@ -17,7 +17,7 @@ import { VoiceWave } from '../../projects/voicecapture-angular/src/public-api';
ModalinstallComponent,
DarkmodeComponent,
AppFooterComponent,
VoiceWave,
VoiceCapture,
],
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
Expand All @@ -27,7 +27,7 @@ export class AppComponent {

codeString: string = 'npm install voicecapture-angular';
isModalActive: boolean = false;
isVoiceWaveExample: WritableSignal<boolean> = signal(false);
isVoiceCaptureExample: WritableSignal<boolean> = signal(false);
voiceTextTranscript!: string;

openModal(): void {
Expand All @@ -40,8 +40,8 @@ export class AppComponent {
this.renderer.removeClass(document.body, 'modal-active');
}

openVoiceWave() {
this.isVoiceWaveExample.set(true);
openVoiceCapture() {
this.isVoiceCaptureExample.set(true);
}

returnVoiceTranscript(transcript: string) {
Expand Down
18 changes: 9 additions & 9 deletions src/app/components/modal-install/modal-install.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ export class ModalinstallComponent {
codeExample: string = `// Example Component
import { Component } from '@angular/core';
import { signal, WritableSignal } from 'signals';
import { VoiceWave } from 'voicecapture-angular';
import { VoiceCapture } from 'voicecapture-angular';
@Component({
selector: 'app-voicewave-example',
selector: 'app-voicecapture-example',
template: \`
<button (click)="openVoiceWave()">
Open VoiceWave Example
<button (click)="openVoiceCapture()">
Open VoiceCapture Example
</button>
<voicecapture-angular
[start]="isVoiceWaveExample"
[start]="isVoiceCaptureExample"
(voiceTranscript)="returnVoiceTranscript($event)"
/>
Expand All @@ -46,12 +46,12 @@ import { VoiceWave } from 'voicecapture-angular';
}
\`,
})
export class VoiceWaveExampleComponent {
isVoiceWaveExample: WritableSignal<boolean> = signal(false);
export class VoiceCaptureExampleComponent {
isVoiceCaptureExample: WritableSignal<boolean> = signal(false);
voiceTextTranscript!: string;
openVoiceWave() {
this.isVoiceWaveExample.set(true);
openVoiceCapture() {
this.isVoiceCaptureExample.set(true);
}
returnVoiceTranscript(transcript: string) {
Expand Down
6 changes: 3 additions & 3 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ h2 {
}

.button-modal,
.button-voicewave-example {
.button-voicecapture-example {
background: var(--vtl-background-gradient);
color: var(--color-text);
display: flex;
Expand All @@ -146,15 +146,15 @@ h2 {
}
}

.button-voicewave-example {
.button-voicecapture-example {
background: var(--primary);
color: #fff;
margin-top: 1rem;
margin-left: 0;
padding: 1rem;
}

.button-voicewave-example {
.button-voicecapture-example {
display: inline-flex;
align-items: center;
padding: 0.5rem 1rem;
Expand Down

0 comments on commit 3a4d4e3

Please sign in to comment.