Updated console

This commit is contained in:
2022-05-03 17:03:42 -04:00
parent ce0e7dcc98
commit cf05d96812
3 changed files with 26 additions and 19 deletions

View File

@ -4,8 +4,8 @@ import {QuoteService} from '../../services/quote.service';
import {sleep} from '../../misc/utils';
@Component({
selector: 'home',
templateUrl: './home.component.html'
selector: 'home',
templateUrl: './home.component.html'
})
export class HomeComponent implements AfterViewInit {
@ViewChild(ConsoleComponent) console!: ConsoleComponent;
@ -16,12 +16,10 @@ export class HomeComponent implements AfterViewInit {
animateConsole() {
setTimeout(async () => {
this.console.exec('bash ./random-thought.sh', () => this.quotes.random());
await this.console.exec('bash ./random-thought.sh', () => this.quotes.random());
await sleep(10000);
this.console.exec('clear', async () => {
this.console.clear();
this.animateConsole();
});
await this.console.exec('clear', async () => this.console.clear());
this.animateConsole();
}, 1000);
}
}