Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (dispatch) => {
// TODO: Better way of handling this HACK (logging out)
Request({url: ConfGlobal.baseURL + "/logout", method: "GET"}, function (error, response, body) {
client.login({auth: {method: 'basic', username: username, password: password}}).then((user) => {
dispatch(user);
// Close box
//_this._handleClose();
}).catch((error) => { throw error });
});
}
//import alt from '../alt';
import Nuxeo from 'nuxeo';
// Configuration
import ConfGlobal from 'conf/local.json';
//import RunActions from '../actions/RunActions';
//import UserApiUtils from '../utils/UserApiUtils';
//import RunApiUtils from '../utils/RunApiUtils';
//import logError from '../utils/logError'
class ClientActions {
static nuxeoArgs = {
baseURL: ConfGlobal.baseURL,
restPath: 'site/api/v1',
automationPath: 'site/automation',
timeout: 30000
};
connect() {
return (dispatch) => {
let client = new Nuxeo(this.nuxeoArgs);
client.header('X-NXproperties', '*');
dispatch(client);
}
}
}
if (this.props.hasOwnProperty('action') && typeof this.props.action === "function") {
action = this.props.action;
} else {
action = () => {};
}
const DEFAULT_LANGUAGE = this.props.defaultLanguage;
let mediumImage = selectn('contextParameters.book.related_pictures[0].views[2]', this.props.item);
let coverImage = selectn('url', mediumImage) || '/assets/images/cover.png';
let audioObj = selectn('contextParameters.book.related_audio[0].path', this.props.item);
if (audioObj) {
const stateFunc = function(state) { this.setState(state); }.bind(this);
audioIcon = (decodeURIComponent(selectn('src', this.state.nowPlaying)) !== ConfGlobal.baseURL + audioObj) ? : ;
audioCallback = (decodeURIComponent(selectn('src', this.state.nowPlaying)) !== ConfGlobal.baseURL + audioObj) ? UIHelpers.playAudio.bind(this, this.state, stateFunc, ConfGlobal.baseURL + audioObj) : UIHelpers.stopAudio.bind(this, this.state, stateFunc);
}
return <div style="{Object.assign(defaultStyle,">
β’ <a href="{ConfGlobal.baseWebUIURL">{this.props.item.name}</a>
</div>;
}
}
render() {
return <div>
<h1>{intl.trans('forgot_password', 'Forgot your password', 'first')}</h1>
<p>{intl.trans('views.pages.users.forgot.forgot_copy',
'If you forgot your password enter your email address in the form below to begin the process of resetting it.')}</p>
<div style="{{marginTop:">
<div>
</div></div></div>
} else {
action = () => {};
}
const DEFAULT_LANGUAGE = this.props.defaultLanguage;
let mediumImage = selectn('contextParameters.book.related_pictures[0].views[2]', this.props.item);
let coverImage = selectn('url', mediumImage) || '/assets/images/cover.png';
let audioObj = selectn('contextParameters.book.related_audio[0].path', this.props.item);
if (audioObj) {
const stateFunc = function(state) { this.setState(state); }.bind(this);
audioIcon = (decodeURIComponent(selectn('src', this.state.nowPlaying)) !== ConfGlobal.baseURL + audioObj) ? : ;
audioCallback = (decodeURIComponent(selectn('src', this.state.nowPlaying)) !== ConfGlobal.baseURL + audioObj) ? UIHelpers.playAudio.bind(this, this.state, stateFunc, ConfGlobal.baseURL + audioObj) : UIHelpers.stopAudio.bind(this, this.state, stateFunc);
}
return <div style="{Object.assign(defaultStyle,">
β’ <a href="{ConfGlobal.baseWebUIURL">{this.props.item.name}</a>
</div>;
}
}
const word_array = (selectn('response.entries', computeWords) || []).map(function (word, k) {
return {
word: selectn('properties.dc:title', word),
translation: selectn('properties.fv:literal_translation[0].translation', word) || selectn('properties.fv:definitions[0].translation', word),
audio: ConfGlobal.baseURL + selectn('contextParameters.word.related_audio[0].path', word) + '?inline=true',
image: ConfGlobal.baseURL + selectn('contextParameters.word.related_pictures[0].path', word) + '?inline=true'
};
}).filter(v => v.word.length < 12);
const word_array = (selectn('response.entries', computeWords) || []).map(function (word, k) {
return {
word: selectn('properties.dc:title', word),
translation: selectn('properties.fv:literal_translation[0].translation', word) || selectn('properties.fv:definitions[0].translation', word),
audio: ConfGlobal.baseURL + selectn('contextParameters.word.related_audio[0].path', word) + '?inline=true',
image: ConfGlobal.baseURL + selectn('contextParameters.word.related_pictures[0].path', word) + '?inline=true'
};
}).filter(v => v.word.length < 12);