maintain (client): maintain project dependencies and relevant upgrade

This commit is contained in:
Mickael Kerjean
2020-01-06 21:34:50 +11:00
parent b3124b95ec
commit 3b3a03da0d
10 changed files with 30 additions and 30 deletions

View File

@ -6,7 +6,7 @@ import load from "little-loader";
export class Bundle extends React.Component { export class Bundle extends React.Component {
state = { mod: null }; state = { mod: null };
componentWillMount() { componentDidMount() {
this.load(this.props) this.load(this.props)
} }

View File

@ -46,7 +46,7 @@ export class Enabler extends React.Component {
super(props); super(props);
} }
componentWillMount(){ componentDidMount(){
requestAnimationFrame(() => { requestAnimationFrame(() => {
this.toggle(this.props.defaultValue || false); this.toggle(this.props.defaultValue || false);
}); });

View File

@ -25,10 +25,10 @@ function AdminOnly(WrappedComponent){
notify.send("Error: " + (err && err.message) , "error"); notify.send("Error: " + (err && err.message) , "error");
}); });
}; };
this.timeout = window.setInterval(this.admin.bind(this), 30 * 1000);
} }
componentWillMount(){ componentDidMount(){
this.timeout = window.setInterval(this.admin.bind(this), 30 * 1000);
this.admin.call(this); this.admin.call(this);
} }

View File

@ -11,7 +11,7 @@ export class ConfigPage extends React.Component {
}; };
} }
componentWillMount(){ componentDidMount(){
Config.all().then((c) => { Config.all().then((c) => {
delete c.constant; // The constant key contains read only global variable that are delete c.constant; // The constant key contains read only global variable that are
// application wide truth => not editable from the admin area // application wide truth => not editable from the admin area

View File

@ -15,7 +15,7 @@ export class DashboardPage extends React.Component {
}; };
} }
componentWillMount(){ componentDidMount(){
Promise.all([ Promise.all([
Backend.all(), Backend.all(),
Config.all() Config.all()

View File

@ -16,7 +16,7 @@ export class LogPage extends React.Component {
}; };
} }
componentWillMount(){ componentDidMount(){
Config.all().then((config) => { Config.all().then((config) => {
this.setState({ this.setState({
form: {"":{"params":config["log"]}}, form: {"":{"params":config["log"]}},

View File

@ -20,7 +20,7 @@ export class PluginPage extends React.Component {
}; };
} }
componentWillMount(){ componentDidMount(){
Plugin.all().then((list) => this.setState({plugins: list})); Plugin.all().then((list) => this.setState({plugins: list}));
} }

View File

@ -21,7 +21,7 @@ export class ConnectPage extends React.Component {
}; };
} }
componentWillMount(){ componentDidMount(){
const urlData = urlParams(); const urlData = urlParams();
const get_params = Object.keys(urlData); const get_params = Object.keys(urlData);
if(get_params.length === 0){ if(get_params.length === 0){

View File

@ -22,14 +22,14 @@ export class Submenu extends React.Component {
search_keyword: "", search_keyword: "",
search_input_visible: false search_input_visible: false
}); });
this.refs.$input.blur(); if(this.refs.$input) this.refs.$input.blur();
this.props.onSearch(null); this.props.onSearch(null);
}else if(e.ctrlKey && e.keyCode === 70){ // 'Ctrl F' shortcut to search }else if(e.ctrlKey && e.keyCode === 70){ // 'Ctrl F' shortcut to search
e.preventDefault(); e.preventDefault();
this.setState({ this.setState({
search_input_visible: true search_input_visible: true
}); });
this.refs.$input.focus(); if(this.refs.$input) this.refs.$input.focus();
}else if(e.altKey && (e.keyCode === 49 || e.keyCode === 50)){ // 'alt 1' 'alt 2' shortcut }else if(e.altKey && (e.keyCode === 49 || e.keyCode === 50)){ // 'alt 1' 'alt 2' shortcut
e.preventDefault(); e.preventDefault();
this.onViewChange(); this.onViewChange();

View File

@ -14,8 +14,26 @@
"dependencies": { "dependencies": {
"aes-js": "git+https://github.com/mickael-kerjean/aes-js.git", "aes-js": "git+https://github.com/mickael-kerjean/aes-js.git",
"bcryptjs": "^2.4.3", "bcryptjs": "^2.4.3",
"codemirror": "^5.26.0",
"exif-js": "^2.3.0",
"little-loader": "^0.2.0", "little-loader": "^0.2.0",
"react-selectable": "git+https://github.com/mickael-kerjean/react-selectable.git" "prop-types": "^15.5.10",
"react": "^16.5.0",
"react-addons-css-transition-group": "^15.6.2",
"react-dnd": "^2.4.0",
"react-dnd-html5-backend-filedrop": "^1.0.0",
"react-dom": "^16.5.0",
"react-draggable": "^2.2.6",
"react-infinite-scroller": "^1.1.4",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-selectable": "git+https://github.com/mickael-kerjean/react-selectable.git",
"react-sticky": "^6.0.2",
"rxjs": "^5.4.0",
"video.js": "^5.19.2",
"videojs-contrib-hls": "^5.14.1",
"videojs-sublime-skin": "^1.0.3",
"wavesurfer.js": "^1.4.0"
}, },
"devDependencies": { "devDependencies": {
"babel-core": "^6.13.2", "babel-core": "^6.13.2",
@ -27,35 +45,17 @@
"babel-preset-react": "^6.11.1", "babel-preset-react": "^6.11.1",
"babel-preset-stage-2": "^6.24.1", "babel-preset-stage-2": "^6.24.1",
"babelify": "^8.0.0", "babelify": "^8.0.0",
"codemirror": "^5.26.0",
"compression-webpack-plugin": "^1.1.11", "compression-webpack-plugin": "^1.1.11",
"copy-webpack-plugin": "^4.5.2", "copy-webpack-plugin": "^4.5.2",
"css-loader": "^0.28.10", "css-loader": "^0.28.10",
"exif-js": "^2.3.0",
"html-loader": "^0.4.5", "html-loader": "^0.4.5",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"node-sass": "^4.10.0", "node-sass": "^4.10.0",
"prop-types": "^15.5.10",
"react": "^15.6.2",
"react-addons-css-transition-group": "^15.6.2",
"react-dnd": "^2.4.0",
"react-dnd-html5-backend-filedrop": "^1.0.0",
"react-dom": "^15.6.2",
"react-draggable": "^2.2.6",
"react-infinite-scroller": "^1.1.4",
"react-router": "^4.1.1",
"react-router-dom": "^4.1.1",
"react-sticky": "^6.0.2",
"rxjs": "^5.4.0",
"sass-loader": "^6.0.6", "sass-loader": "^6.0.6",
"sass-variable-loader": "^0.1.2", "sass-variable-loader": "^0.1.2",
"style-loader": "^0.20.2", "style-loader": "^0.20.2",
"uglifyjs-webpack-plugin": "^1.2.5", "uglifyjs-webpack-plugin": "^1.2.5",
"url-loader": "^0.6.2", "url-loader": "^0.6.2",
"video.js": "^5.19.2",
"videojs-contrib-hls": "^5.14.1",
"videojs-sublime-skin": "^1.0.3",
"wavesurfer.js": "^1.4.0",
"webpack": "^2.7.0", "webpack": "^2.7.0",
"webpack-bundle-analyzer": "^3.3.2", "webpack-bundle-analyzer": "^3.3.2",
"worker-loader": "^2.0.0" "worker-loader": "^2.0.0"