mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-23 21:28:47 +00:00
fix(console): Implement generic feature toggle (#9516)
This PR implements a component which is used to render the feature settings in a generic way. All features besides`loginV2` and `improvedPerformance` are rendered. Note: The feature flags are not autogenerated as the console needs descriptions for the respective features and there are multiple types where additional fields like text input is required Closes #9090 --------- Co-authored-by: conblem <[email protected]>
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { GrpcService } from './grpc.service';
|
||||
import { GetInstanceFeaturesResponse } from '@zitadel/proto/zitadel/feature/v2/instance_pb';
|
||||
import {
|
||||
GetInstanceFeaturesResponse,
|
||||
ResetInstanceFeaturesResponse,
|
||||
SetInstanceFeaturesRequest,
|
||||
SetInstanceFeaturesRequestSchema,
|
||||
SetInstanceFeaturesResponse,
|
||||
} from '@zitadel/proto/zitadel/feature/v2/instance_pb';
|
||||
import { MessageInitShape } from '@bufbuild/protobuf';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@@ -11,4 +18,14 @@ export class NewFeatureService {
|
||||
public getInstanceFeatures(): Promise<GetInstanceFeaturesResponse> {
|
||||
return this.grpcService.featureNew.getInstanceFeatures({});
|
||||
}
|
||||
|
||||
public setInstanceFeatures(
|
||||
req: MessageInitShape<typeof SetInstanceFeaturesRequestSchema>,
|
||||
): Promise<SetInstanceFeaturesResponse> {
|
||||
return this.grpcService.featureNew.setInstanceFeatures(req);
|
||||
}
|
||||
|
||||
public resetInstanceFeatures(): Promise<ResetInstanceFeaturesResponse> {
|
||||
return this.grpcService.featureNew.resetInstanceFeatures({});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user