fix(core.gbapp): Translator hierachy param tree is OK.
This commit is contained in:
parent
5021e7fcf1
commit
94e791ca71
2 changed files with 10 additions and 16 deletions
|
@ -805,8 +805,8 @@ export class GBConversationalService {
|
|||
}
|
||||
return false;
|
||||
};
|
||||
const endPoint = min.instance.translatorEndpoint;
|
||||
const key = min.instance.translatorKey;
|
||||
const endPoint = min.core.getParam<string>(min.instance, 'translatorEndpoint', null);
|
||||
const key = min.core.getParam<string>(min.instance, 'translatorKey', null);
|
||||
|
||||
if (endPoint === null || !translatorEnabled() || process.env.TRANSLATOR_DISABLED === 'true') {
|
||||
return text;
|
||||
|
|
|
@ -97,7 +97,7 @@ class GBUIApp extends React.Component {
|
|||
}
|
||||
|
||||
postEvent(name, item) {
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
window['botConnection'].postActivity({
|
||||
type: "event",
|
||||
name: name,
|
||||
|
@ -108,7 +108,7 @@ class GBUIApp extends React.Component {
|
|||
from: window.user
|
||||
})
|
||||
.subscribe(console.log("success"));
|
||||
},400);
|
||||
}, 400);
|
||||
}
|
||||
postMessage(value) {
|
||||
window.line.postActivity({
|
||||
|
@ -193,21 +193,15 @@ class GBUIApp extends React.Component {
|
|||
if (connectionStatus === ConnectionStatus.Online) {
|
||||
_this_.setState({ line: line });
|
||||
window['botConnection'] = line;
|
||||
line.postActivity({
|
||||
type: 'event',
|
||||
value: 'startGB',
|
||||
from: this.getUser(),
|
||||
name: 'startGB'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
window.line = line;
|
||||
this.postEvent('startGB', true);
|
||||
|
||||
line.activity$
|
||||
.filter(activity => activity.type === 'event' && activity.name === 'loadInstance')
|
||||
.subscribe(activity => {
|
||||
this.postEvent('startGB', true);
|
||||
_this_.setState({ instance: activity.value });
|
||||
_this_.authenticate();
|
||||
});
|
||||
|
@ -315,7 +309,7 @@ class GBUIApp extends React.Component {
|
|||
|
||||
let chat = <div />;
|
||||
let gbCss = <div />;
|
||||
let seo= <div />;
|
||||
let seo = <div />;
|
||||
|
||||
let sideBar = (
|
||||
<div className="sidebar">
|
||||
|
@ -324,9 +318,9 @@ class GBUIApp extends React.Component {
|
|||
);
|
||||
|
||||
if (this.state.line && this.state.instance) {
|
||||
this.postEvent('startGB', true);
|
||||
|
||||
gbCss = <GBCss instance={this.state.instance} />;
|
||||
seo = <SEO instance={this.state.instance}/>;
|
||||
seo = <SEO instance={this.state.instance} />;
|
||||
|
||||
// let speechOptions;
|
||||
// let token = this.state.instanceClient.speechToken;
|
||||
|
|
Loading…
Add table
Reference in a new issue