Archived
peppe spiderman
This commit is contained in:
Generated
+8
-22
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hazetv-alfatube-1",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -5879,13 +5879,11 @@
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@@ -5898,18 +5896,15 @@
|
||||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
@@ -6012,8 +6007,7 @@
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
@@ -6023,7 +6017,6 @@
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
@@ -6036,20 +6029,17 @@
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.2.4",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1",
|
||||
"yallist": "^3.0.0"
|
||||
@@ -6066,7 +6056,6 @@
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
@@ -6139,8 +6128,7 @@
|
||||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
@@ -6150,7 +6138,6 @@
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
@@ -6256,7 +6243,6 @@
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
"browserslist": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not ie <= 11",
|
||||
"not ie <= 8",
|
||||
"not op_mini all"
|
||||
]
|
||||
}
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ class TopBar extends Component {
|
||||
}
|
||||
handleSubmit = event => {
|
||||
event.preventDefault();
|
||||
event.target.reset();
|
||||
// event.target.reset();
|
||||
this.props.history.push('/search/' + this.state.query);
|
||||
}
|
||||
render() {
|
||||
@@ -87,7 +87,7 @@ class TopBar extends Component {
|
||||
className="mr-sm-2"
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<Button type="submit" variant="outline-success">Search</Button>
|
||||
<Button type="submit" variant="secondary">Search</Button>
|
||||
</form>
|
||||
</Navbar.Collapse>
|
||||
</Navbar>
|
||||
|
||||
+4
-3
@@ -53,8 +53,8 @@ class VideoInfo extends React.Component {
|
||||
}), error => {
|
||||
console.error(error);
|
||||
this.setState({
|
||||
isLoaded: true,
|
||||
error
|
||||
error,
|
||||
isLoaded: true
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -64,10 +64,11 @@ class VideoInfo extends React.Component {
|
||||
const momentDuration = this.momentDuration;
|
||||
const ISO_8601parse = this.ISO_8601parse;
|
||||
if (error) {
|
||||
let htmlRegEx = /<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\^'">\s]+))?)+\s*|\s*)\/?>/gm;
|
||||
return (
|
||||
<span className="text-white">
|
||||
<span>{}</span>
|
||||
Error: {error.message} -- Cannot get {error.config.url}
|
||||
Error: {error.message} -- {error.response.data && error.response.data.error.message.replace(htmlRegEx,'')}
|
||||
</span>
|
||||
);
|
||||
} else if (!isLoaded) {
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ class VideoList extends React.Component {
|
||||
);
|
||||
} else if (!isLoaded) {
|
||||
return <Col className="text-center">
|
||||
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
|
||||
<div className="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
|
||||
</Col>;
|
||||
} else {
|
||||
return (
|
||||
|
||||
+3
-3
@@ -15,8 +15,8 @@ class VideoPlayer extends React.Component {
|
||||
modestbranding: 1,
|
||||
fs: 0,
|
||||
iv_load_policy:3,
|
||||
rel: 0,
|
||||
origin//: 'http://site1854.tw.cs.unibo.it'
|
||||
rel: 0
|
||||
//origin//: 'http://site1854.tw.cs.unibo.it'
|
||||
}
|
||||
},
|
||||
promise1: null,
|
||||
@@ -42,7 +42,7 @@ class VideoPlayer extends React.Component {
|
||||
|
||||
// access to player in all event handlers via event.target
|
||||
_onError(event) {
|
||||
console.error('Player error: ', event);
|
||||
this.setState({error:event.data});
|
||||
}
|
||||
|
||||
_onPlay(event) {}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import 'react-app-polyfill/ie9';
|
||||
//import 'bootstrap/dist/css/bootstrap.css';
|
||||
// import './css/bootswatch/darkly/bootstrap.min.css'
|
||||
import './css/bootswatch/superhero/bootstrap.min.css'
|
||||
import 'react-app-polyfill/ie9';
|
||||
//import '@babel/polyfill';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
@@ -30,6 +30,12 @@ class Recent extends React.Component {
|
||||
// //this.shuffleArray(response.data);
|
||||
// console.info ('a',response.data);
|
||||
this.getThumbnailsNames(JSON.parse(localStorage.getItem('lastWatched')));
|
||||
|
||||
let lastWatchedList = JSON.parse(localStorage.getItem('lastWatched')).map(x =>x.lastWatched)
|
||||
let now = moment(new Date()); // riferimento unico temporale
|
||||
let timePast = lastWatchedList.map(item => now.diff(item)) // differenza in secondi tra adesso e lastWatched
|
||||
console.info(lastWatchedList, timePast.sort((a, b) => a - b))
|
||||
|
||||
// console.info(response.data.recommended);
|
||||
// // this.setState({
|
||||
// // isLoaded: true,
|
||||
@@ -105,14 +111,14 @@ class Recent extends React.Component {
|
||||
);
|
||||
} else if (!isLoaded) {
|
||||
return <Col className="text-center">
|
||||
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
|
||||
<div className="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
|
||||
</Col>;
|
||||
} else {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{items.map(item => (
|
||||
<Col md="4">
|
||||
<Card key={item.id}>
|
||||
<Col key={item.id} md="4">
|
||||
<Card >
|
||||
<Link
|
||||
to={{
|
||||
pathname: '/video/' + item.id,
|
||||
|
||||
+31
-26
@@ -79,33 +79,38 @@ class fvitali extends React.Component {
|
||||
} else if (!isLoaded) {
|
||||
return (
|
||||
<Col className="text-center">
|
||||
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
|
||||
<div className="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
|
||||
</Col>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
// <React.Fragment>
|
||||
// {items.map(item=>( <Col md="4">
|
||||
// <Card key={item.videoID}>
|
||||
// <Link
|
||||
// to={{
|
||||
// pathname: '/video/' + item.videoID,
|
||||
// }}
|
||||
// >
|
||||
// <Card.Img
|
||||
// src={item.thumbnail}
|
||||
// alt={'Thumbnail of ' + item.name}
|
||||
// />
|
||||
// <Card.ImgOverlay>
|
||||
// <Card.Title className="bg-dark d-inline text-white">
|
||||
// {item.name}<br/>
|
||||
// {item.lastSelected}
|
||||
// </Card.Title>
|
||||
// </Card.ImgOverlay>
|
||||
// </Link>
|
||||
// </Card>
|
||||
// </Col>))}
|
||||
// </React.Fragment>
|
||||
if(window.innerWidth < 992){
|
||||
return(
|
||||
<React.Fragment>
|
||||
{items.map(item=>( <Col md="4">
|
||||
<Card key={item.videoID}>
|
||||
<Link
|
||||
to={{
|
||||
pathname: '/video/' + item.videoID,
|
||||
}}
|
||||
>
|
||||
<Card.Img
|
||||
src={item.thumbnail}
|
||||
alt={'Thumbnail of ' + item.name}
|
||||
/>
|
||||
<Card.ImgOverlay>
|
||||
<Card.Title className="bg-dark d-inline text-white">
|
||||
<p>{item.name}</p>
|
||||
<p className='small'>{item.lastSelected}</p>
|
||||
<p className='small'>Reccomender: fvitali</p>
|
||||
</Card.Title>
|
||||
</Card.ImgOverlay>
|
||||
</Link>
|
||||
</Card>
|
||||
</Col>))}
|
||||
</React.Fragment>
|
||||
);
|
||||
}else{
|
||||
return(
|
||||
<ul className="list-unstyled">{
|
||||
items.map(item => (
|
||||
<Link
|
||||
@@ -117,7 +122,7 @@ class fvitali extends React.Component {
|
||||
<img
|
||||
width={240}
|
||||
height={120}
|
||||
className="align-self-center mr-3"
|
||||
className="align-self-center mr-3 img-fluid"
|
||||
src={item.thumbnail}
|
||||
alt={'Thumbnail of ' + item.name}
|
||||
/>
|
||||
@@ -129,7 +134,7 @@ class fvitali extends React.Component {
|
||||
</Link>
|
||||
))
|
||||
}</ul>
|
||||
);
|
||||
);}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user