mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-30 02:52:16 +00:00
feat(console): seo metatags, fix policy bugs, project options (#844)
* add seo service, index meta info * fix policy buttons, refresh * refresh after timeout * loading spinner for login policy, complexity * fix user form, add project role options * authtoken options * seo service lint * style lint * remove duplicate authmethod * en i18n * Update console/src/assets/i18n/en.json Co-authored-by: Fabi <[email protected]> Co-authored-by: Fabi <[email protected]>
This commit is contained in:
@@ -975,10 +975,12 @@ export class ManagementService {
|
||||
return this.grpcService.mgmt.createProject(req);
|
||||
}
|
||||
|
||||
public UpdateProject(id: string, name: string): Promise<Project> {
|
||||
public UpdateProject(id: string, projectView: ProjectView.AsObject): Promise<Project> {
|
||||
const req = new ProjectUpdateRequest();
|
||||
req.setName(name);
|
||||
req.setId(id);
|
||||
req.setName(projectView.name);
|
||||
req.setProjectRoleAssertion(projectView.projectRoleAssertion);
|
||||
req.setProjectRoleCheck(projectView.projectRoleCheck);
|
||||
return this.grpcService.mgmt.updateProject(req);
|
||||
}
|
||||
|
||||
@@ -1271,6 +1273,9 @@ export class ManagementService {
|
||||
req.setGrantTypesList(oidcConfig.grantTypesList);
|
||||
req.setApplicationType(oidcConfig.applicationType);
|
||||
req.setDevMode(oidcConfig.devMode);
|
||||
req.setAccessTokenType(oidcConfig.accessTokenType);
|
||||
req.setAccessTokenRoleAssertion(oidcConfig.accessTokenRoleAssertion);
|
||||
req.setIdTokenRoleAssertion(oidcConfig.idTokenRoleAssertion);
|
||||
return this.grpcService.mgmt.updateApplicationOIDCConfig(req);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Meta } from '@angular/platform-browser';
|
||||
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class SeoService {
|
||||
constructor(private meta: Meta) { }
|
||||
|
||||
public generateTags(config: any): void {
|
||||
// default values
|
||||
config = {
|
||||
title: 'ZITADEL Console',
|
||||
description: 'Managementplatform for ZITADEL',
|
||||
image: 'https://www.zitadel.ch/zitadel-social-preview25.png',
|
||||
slug: '',
|
||||
...config,
|
||||
};
|
||||
|
||||
this.meta.updateTag({ property: 'og:type', content: 'website' });
|
||||
this.meta.updateTag({ property: 'og:site_name', content: 'ZITADEL Console' });
|
||||
this.meta.updateTag({ property: 'og:title', content: config.title });
|
||||
this.meta.updateTag({ property: 'description', content: config.description });
|
||||
this.meta.updateTag({ property: 'og:description', content: config.description });
|
||||
if (config.image) {
|
||||
this.meta.updateTag({ property: 'og:image', content: config.image });
|
||||
}
|
||||
this.meta.updateTag({ property: 'og:url', content: `https://${environment.production ? 'console.zitadel.ch' : 'console.zitadel.dev'}/${config.slug}` });
|
||||
|
||||
this.meta.updateTag({ property: 'twitter:card', content: 'summary' });
|
||||
this.meta.updateTag({ property: 'og:site', content: '@zitadel_ch' });
|
||||
this.meta.updateTag({ property: 'og:title', content: config.title });
|
||||
this.meta.updateTag({ property: 'og:image', content: 'https://www.zitadel.ch/zitadel-social-preview25.png' });
|
||||
this.meta.updateTag({ property: 'og:description', content: config.description });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user