mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-04 23:45:07 +00:00
fix(console): change external links dynamically (#8423)
This PR fixes a problem, where the external links were not replaced dynamically on an org change.
This commit is contained in:
parent
fd0c15dd4f
commit
5faaf87b22
@ -168,9 +168,11 @@
|
||||
|
||||
<span class="fill-space"></span>
|
||||
|
||||
<a class="custom-link" *ngIf="customLink && customLinkText" href="{{ customLink }}" mat-stroked-button target="_blank">
|
||||
{{ customLinkText }}
|
||||
</a>
|
||||
<ng-container *ngIf="authService.privacypolicy | async as pP">
|
||||
<a class="custom-link" *ngIf="pP.customLink" href="{{ pP.customLink }}" mat-stroked-button target="_blank">
|
||||
{{ pP.customLinkText }}
|
||||
</a>
|
||||
</ng-container>
|
||||
|
||||
<a class="doc-link" *ngIf="docsLink" href="{{ docsLink }}" mat-stroked-button target="_blank">
|
||||
{{ 'MENU.DOCUMENTATION' | translate }}
|
||||
|
@ -9,7 +9,6 @@ import { BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.s
|
||||
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
import { ActionKeysType } from '../action-keys/action-keys.component';
|
||||
import { GetPrivacyPolicyResponse } from 'src/app/proto/generated/zitadel/management_pb';
|
||||
|
||||
@Component({
|
||||
selector: 'cnsl-header',
|
||||
@ -32,8 +31,6 @@ export class HeaderComponent implements OnDestroy {
|
||||
public BreadcrumbType: any = BreadcrumbType;
|
||||
public ActionKeysType: any = ActionKeysType;
|
||||
public docsLink = 'https://zitadel.com/docs';
|
||||
public customLink = '';
|
||||
public customLinkText = '';
|
||||
|
||||
public positions: ConnectedPosition[] = [
|
||||
new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }, 0, 10),
|
||||
@ -50,25 +47,7 @@ export class HeaderComponent implements OnDestroy {
|
||||
public mgmtService: ManagementService,
|
||||
public breadcrumbService: BreadcrumbService,
|
||||
public router: Router,
|
||||
) {
|
||||
this.loadData();
|
||||
}
|
||||
|
||||
public async loadData(): Promise<any> {
|
||||
const getData = (): Promise<GetPrivacyPolicyResponse.AsObject> => {
|
||||
return this.mgmtService.getPrivacyPolicy();
|
||||
};
|
||||
|
||||
getData()
|
||||
.then((resp) => {
|
||||
if (resp.policy) {
|
||||
this.docsLink = resp.policy.docsLink;
|
||||
this.customLink = resp.policy.customLink;
|
||||
this.customLinkText = resp.policy.customLinkText;
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
) {}
|
||||
|
||||
public ngOnDestroy() {
|
||||
this.destroy$.next();
|
||||
|
Loading…
Reference in New Issue
Block a user