updated preview and using freespeech_walle as submodule
This commit is contained in:
@@ -43,15 +43,21 @@ export class LexEdit extends React.Component<any, any> {
|
||||
this.handleOnChange(eventData);
|
||||
};
|
||||
let params = { field, sh, defaultText, options, langSelOpts, changed };
|
||||
if (this.props.fieldMetaMap[field].type === 'text') {
|
||||
return textInput(params);
|
||||
} else if (this.props.fieldMetaMap[field].type === 'select') {
|
||||
return selectInput(params);
|
||||
} else if (this.props.fieldMetaMap[field].type === 'preview') {
|
||||
return imagePreview(params);
|
||||
} else {
|
||||
console.log('field discarded :', field);
|
||||
return null;
|
||||
switch (fieldMeta.type) {
|
||||
case 'text': {
|
||||
return textInput(params);
|
||||
}
|
||||
case 'select': {
|
||||
return selectInput(params);
|
||||
}
|
||||
case 'preview': {
|
||||
return imagePreview(params);
|
||||
}
|
||||
default: {
|
||||
console.log('type discarded :', fieldMeta.type);
|
||||
console.log('values discarded :', fieldMeta.get(li));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
});
|
||||
return (
|
||||
|
||||
@@ -27,7 +27,7 @@ const fieldMetaMap = {
|
||||
synset: { type: 'text', ...simpleAccessor('lexprops[0].wnsynset[0]'), },
|
||||
guid: { type: 'text', ...simpleAccessor('guid[0]'), },
|
||||
pos: { type: 'select', ...simpleAccessor('pos[0]'), },
|
||||
image: { type: 'text', ...simpleAccessor('image[0]'), },
|
||||
image: { type: 'preview', ...simpleAccessor('image[0]'), },
|
||||
relations: { type: 'text', ...simpleAccessor('relations[0]'), },
|
||||
frame: { type: 'select', ...simpleAccessor('syntacticprops[0].property[0]._'), },
|
||||
morphclass: {
|
||||
|
||||
@@ -86,5 +86,5 @@ export function imagePreview(params: any) {
|
||||
<LexSingleInput key={field} label={changedLabel(changed, field)}>
|
||||
<Image src={imageSrc} size="tiny" bordered={true} />
|
||||
</LexSingleInput>
|
||||
) : null;
|
||||
) : textInput(params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user