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