feat(string-prompt): Adds string prompt to menu item
This commit is contained in:
parent
1d73ee8a78
commit
5c7c9c9f87
6 changed files with 164 additions and 26 deletions
|
|
@ -7,6 +7,7 @@ export enum TransformerType {
|
|||
Locale,
|
||||
Channel,
|
||||
PermissionBoolean,
|
||||
String
|
||||
}
|
||||
|
||||
type GroupConfigurationTransformer = {
|
||||
|
|
@ -15,7 +16,7 @@ type GroupConfigurationTransformer = {
|
|||
}
|
||||
|
||||
export type GroupConfigurationResult =
|
||||
ChannelId | Intl.Locale | boolean
|
||||
ChannelId | Intl.Locale | boolean | string
|
||||
|
||||
export class GroupConfigurationTransformers {
|
||||
static TRANSFORMERS: GroupConfigurationTransformer[] = [
|
||||
|
|
@ -34,6 +35,10 @@ export class GroupConfigurationTransformers {
|
|||
{
|
||||
path: ['permissions', 'allowMemberManagingPlaydates'],
|
||||
type: TransformerType.PermissionBoolean
|
||||
},
|
||||
{
|
||||
path: ['calendar', 'title'],
|
||||
type: TransformerType.String
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -50,6 +55,8 @@ export class GroupConfigurationTransformers {
|
|||
return <ChannelId>configValue.value;
|
||||
case TransformerType.PermissionBoolean:
|
||||
return configValue.value === '1';
|
||||
case TransformerType.String:
|
||||
return configValue.value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue