Skip to content

Commit

Permalink
Add logout button to upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Randoom97 committed Sep 9, 2021
1 parent 50197f2 commit a78f928
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ <h1 mat-dialog-title *ngIf="importMode">Import</h1>
</div>

<div mat-dialog-actions>
<button mat-button [disabled]="loginDisabled()" (click)="onLoginClick()">Login</button>
<button mat-button *ngIf="!loginDisabled()" [disabled]="!registry" (click)="onLoginClick()">Login</button>
<button mat-button *ngIf="loginDisabled()" [disabled]="!registry" (click)="onLogoutClick()">Logout</button>
<button mat-button (click)="onCancelClick()">Cancel</button>
<button *ngIf="!importMode" mat-button [disabled]="!finishCheck()" (click)="onUploadClick()">Upload</button>
<button *ngIf="importMode" mat-button [disabled]="!finishCheck()" (click)="onImportClick()">Import</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ export class UploadGraphComponent implements OnInit {
});
}

async onLogoutClick() {
this.working = true;
await this.loginService.logout(this.registry);
this.working = false;
this.updateCollections();
}

onCreateCollectionClick() {
this.dialog.open(CollectionCreationComponent, {data: {registry: this.registry}}).afterClosed().subscribe(result => {
if(result)
Expand Down

0 comments on commit a78f928

Please sign in to comment.