fix(diff_commit_merge): delayed commit data load condition
This commit is contained in:
parent
da353cec84
commit
ce7d595427
8 changed files with 278 additions and 131 deletions
|
|
@ -41,7 +41,7 @@
|
|||
</div>
|
||||
|
||||
<!-- File Change Status -->
|
||||
<button onclick="patch_merge_modal.showModal()" *ngIf="showDetectChanges">
|
||||
<button onclick="patch_merge_modal.showModal()" *ngIf="isCommitLoaded">
|
||||
|
||||
<h1 class="text-center font-extrabold text-2xl text-red-500 animate-pulse">Detect Changes! Click</h1>
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ export class LayoutComponent implements OnInit, OnDestroy {
|
|||
|
||||
redisStatus:string = "Offline";
|
||||
showDetectChanges: boolean = false;
|
||||
changesCommit: any = undefined;
|
||||
changesCommit!: any;
|
||||
isCommitLoaded!: Promise<boolean>;
|
||||
|
||||
constructor(
|
||||
private _userService: UserService,
|
||||
|
|
@ -93,6 +94,12 @@ export class LayoutComponent implements OnInit, OnDestroy {
|
|||
this._recipeService.getCurrentFile()
|
||||
).subscribe({
|
||||
next: async (data: any) => {
|
||||
console.log("get saved tmp", data);
|
||||
|
||||
if(data != null && data != undefined){
|
||||
this.isCommitLoaded = Promise.resolve(true);
|
||||
}
|
||||
|
||||
if(data != undefined && typeof data === 'object'){
|
||||
// check if attr exists
|
||||
if(data.files != null && data.files != undefined){
|
||||
|
|
|
|||
|
|
@ -297,10 +297,10 @@ export class RecipeService {
|
|||
);
|
||||
}
|
||||
|
||||
async getPatchListOfCurrentFile(
|
||||
getPatchListOfCurrentFile(
|
||||
country: string,
|
||||
filename: string
|
||||
): Promise<Observable<any>> {
|
||||
): Observable<any> {
|
||||
|
||||
console.log("try get patches", country, filename);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue