Default to the first credential tab if no cookie
Also removes the credential dialog id, to ensure persistence across sessions
This commit is contained in:
parent
f89ad30320
commit
b5db46ad06
4 changed files with 16 additions and 14 deletions
|
@ -20,6 +20,7 @@ export class CorCookieTabsDirective implements AfterContentInit {
|
|||
public ngAfterContentInit(): void {
|
||||
// Set initial tab
|
||||
const tabId: string = this.cookieService.get(this.cookieName);
|
||||
|
||||
this.panel.activeTab.next(tabId);
|
||||
|
||||
this.panel.activeTab.subscribe((tab: string) => {
|
||||
|
|
|
@ -14,9 +14,9 @@ import 'rxjs/add/operator/filter';
|
|||
}
|
||||
})
|
||||
export class CorTabComponent implements OnInit {
|
||||
|
||||
@Input('@') public tabId: string;
|
||||
@Input('@') public tabTitle: string;
|
||||
@Input('<') public tabActive: boolean = false;
|
||||
|
||||
@Output() public tabInit: EventEmitter<any> = new EventEmitter();
|
||||
@Output() public tabShow: EventEmitter<any> = new EventEmitter();
|
||||
|
@ -29,6 +29,8 @@ export class CorTabComponent implements OnInit {
|
|||
}
|
||||
|
||||
public ngOnInit(): void {
|
||||
this.isActive = this.tabActive;
|
||||
|
||||
this.panel.activeTab
|
||||
.filter(tabId => tabId != undefined)
|
||||
.subscribe((tabId: string) => {
|
||||
|
|
|
@ -34,7 +34,6 @@ angular.module('quay').directive('credentialsDialog', function () {
|
|||
}
|
||||
|
||||
$rootScope.credentialsDialogCounter++;
|
||||
$scope.dialogID = $rootScope.credentialsDialogCounter;
|
||||
|
||||
$scope.hide = function() {
|
||||
$element.find('.modal').modal('hide');
|
||||
|
|
Reference in a new issue