-
-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin settings config #282
base: main
Are you sure you want to change the base?
Conversation
created the basic structure
89aa1ae
to
4cdc455
Compare
created the basic structure
4cdc455
to
83098e2
Compare
validator: ConfigValidatorMap[T]; | ||
} | ||
|
||
export class ConfigValue<T extends ConfigType> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not ConfigValue extends ConfigProperties<T extends ConfigType>
to remove the duplicate properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understand. ConfigProperties is an interface, so i can't use extends if I want a class from it.
I can use implements, but that is not shorter:
export class ConfigValue<T extends ConfigType> implements ConfigProperties<T> {
key: string;
name: string;
type: T;
defaultValue: ConfigTypeMap[T];
validator: ConfigValidatorMap[T];
value: ConfigTypeMap[T] | undefined;
constructor(props: ConfigProperties<T>) {
this.key = props.key;
this.name = props.name;
this.type = props.type;
this.defaultValue = props.defaultValue;
this.validator = props.validator;
}
setValue(value: ConfigTypeMap[T]): void {
this.value = value;
}
}
Incorporated PR feedback
Added dynamic generation of the UI Added the possibility to validate the schema Added database functions to load/store the config
fixed the issue with the flickering of the UI and properly resetting the state of the config after saving to get rid of any previous changes in hidden elements
created the basic structure
Incorporated PR feedback
Added dynamic generation of the UI Added the possibility to validate the schema Added database functions to load/store the config
fixed the issue with the flickering of the UI and properly resetting the state of the config after saving to get rid of any previous changes in hidden elements
d368e30
to
cf594c6
Compare
created the basic structure
Incorporated PR feedback
Added dynamic generation of the UI Added the possibility to validate the schema Added database functions to load/store the config
fixed the issue with the flickering of the UI and properly resetting the state of the config after saving to get rid of any previous changes in hidden elements
cf594c6
to
bd23681
Compare
just showing the wireframe