Skip to content

Commit be94731

Browse files
committed
and now the login button is visible after you close out the error messages
1 parent 93ef85d commit be94731

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

SBOLCanvasFrontend/src/app/http.interceptor.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { Observable, of, throwError } from "rxjs";
44
import { tap, catchError } from "rxjs/operators";
55
import { MatDialog } from '@angular/material/dialog';
66
import { ErrorComponent } from './error/error.component';
7+
import { UploadGraphComponent } from './upload-graph/upload-graph.component';
8+
import { CollectionCreationComponent } from './collection-creation/collection-creation.component';
79
import { ActivatedRoute } from '@angular/router'
810
import { LoginService } from './login.service';
911

@@ -44,7 +46,20 @@ intercept(
4446

4547
const serverLabel = serverParam || 'the registry';
4648
const message = `Disconnected from ${serverLabel}. Please sign in again.`;
47-
!this.ignoreHTTPErrors && this.dialog.open(ErrorComponent, { data: message });
49+
try {
50+
this.dialog.openDialogs.forEach(d => {
51+
try {
52+
const ci = d.componentInstance;
53+
if (ci instanceof CollectionCreationComponent) {
54+
d.close();
55+
}
56+
} catch(e) {
57+
}
58+
});
59+
} catch(e) {
60+
}
61+
62+
!this.ignoreHTTPErrors && this.dialog.open(ErrorComponent, { data: message });
4863
}
4964
}
5065
return throwError(err);

0 commit comments

Comments
 (0)