added local images

master
Malar Kannan 2017-06-27 14:47:37 +05:30
parent 50ef8b3585
commit 14d031fea8
1 changed files with 6 additions and 4 deletions

View File

@ -14,7 +14,8 @@ const { Flex, Box } = require('reflexbox');
interface LexEditorProps {
fileName: RequestInfo;
}
const imageRoot = 'https://s3-us-west-2.amazonaws.com/aac-buddy/static/img/png/';
// const imageRoot = 'https://s3-us-west-2.amazonaws.com/aac-buddy/static/img/png/';
const imageRoot = 'https://localhost:3000/png/';
const fieldMetaMap = {
'label': { lens: 'label[0]', type: 'text' },
'unl': { lens: 'unl[0]', type: 'text' },
@ -93,6 +94,7 @@ export class LexEditor extends React.Component<LexEditorProps, any> {
let searchLens = fieldMetaMap[searchEvent.searchType].lens;
let matchedEntries = _.chain(this.allEntries)
.filter((q: any) => _.get<any>(q, searchLens, '') === searchText)
.take(10)
.value();
this.setState({ ...this.state, matchedEntries, searchText, searchLens });
}
@ -199,7 +201,7 @@ class LexEdit extends React.Component<any, any> {
placeholder={field}
type="text"
dir="auto"
style={{ width: '150px' }}
style={{ width: '10em' }}
/>
</LexSingleInput>
);
@ -208,7 +210,7 @@ class LexEdit extends React.Component<any, any> {
<LexSingleInput key={field} labelText={_.capitalize(field)}>
<select
onChange={sh}
style={{ width: '150px' }}
style={{ width: '10em' }}
defaultValue={defaultText}
>
{this.props.selectionMeta[field].map((k: any, i: any, c: any) => {
@ -233,7 +235,7 @@ class LexEdit extends React.Component<any, any> {
<Card raised={true}>
<Card.Content>
<Card.Header>
GUID {_.get<any>(li, 'guid', '')}
{_.get<any>(li, 'label', '')}
</Card.Header>
<Card.Meta>
language: {_.get<any>(li, '$.id', '')}