diff --git a/src/app/shared/components/footer/footer.component.html b/src/app/shared/components/footer/footer.component.html index 2fbf577..0324d34 100644 --- a/src/app/shared/components/footer/footer.component.html +++ b/src/app/shared/components/footer/footer.component.html @@ -1,4 +1,8 @@ - + + + + diff --git a/src/app/shared/components/footer/footer.component.scss b/src/app/shared/components/footer/footer.component.scss index 13765a8..f1347d2 100644 --- a/src/app/shared/components/footer/footer.component.scss +++ b/src/app/shared/components/footer/footer.component.scss @@ -2,3 +2,7 @@ commander-branch-ahead-behind { line-height: 25px; cursor: pointer; } + +.spinner { + margin-top: 4px; +} diff --git a/src/app/shared/components/footer/footer.component.ts b/src/app/shared/components/footer/footer.component.ts index 126607f..f9831a2 100644 --- a/src/app/shared/components/footer/footer.component.ts +++ b/src/app/shared/components/footer/footer.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { RepositoryService } from '@routes/repository/repository.service'; +import { sleep } from '@shared/functions'; @Component({ selector: 'commandos-footer', @@ -8,6 +9,8 @@ import { RepositoryService } from '@routes/repository/repository.service'; }) export class FooterComponent implements OnInit { + isSync = false; + constructor( public repositoryService: RepositoryService ) { } @@ -15,7 +18,10 @@ export class FooterComponent implements OnInit { ngOnInit(): void { } - sync() { - this.repositoryService.sync(); + async sync() { + this.isSync = true; + await this.repositoryService.sync(); + await sleep(2000); + this.isSync = false; } }