[WIP] Video Options Menu and OPML Export Fix

This commit is contained in:
Preston 2018-03-16 16:04:29 -04:00
parent 1ac6ce7dce
commit 975d60cade
6 changed files with 50 additions and 3 deletions

View File

@ -84,7 +84,7 @@ function goToChannel(channelId) {
grabDuration.then((videoList) => {
videoList.items.forEach((video) => {
displayVideo(video, 'history');
displayVideo(video);
});
});
});

View File

@ -200,7 +200,7 @@ let videoShortcutHandler = function(event) {
};
let fullscreenVideo = function(event){
$('.videoPlayer').get(0).webkitRequestFullscreen()
$('.videoPlayer').get(0).webkitRequestFullscreen();
}
/**

View File

@ -300,3 +300,13 @@ function removeMouseTimeout(){
$('.videoPlayer')[0].style.cursor = 'default';
clearTimeout(mouseTimeout);
}
function showVideoOptions(element){
console.log(element.nextElementSibling.style.display);
if (element.nextElementSibling.style.display == 'none' || element.nextElementSibling.style.display == ''){
element.nextElementSibling.style.display = 'inline-block'
}
else{
element.nextElementSibling.style.display = 'none'
}
}

View File

@ -231,7 +231,7 @@ function setTheme(option) {
* @return {Void}
*/
function importOpmlSubs(json){
if(json[0]['folder'] !== 'YouTube Subscriptions'){
if(!json[0]['folder'].includes('YouTube')){
showToast('Invalid OPML File. Import is unsuccessful.');
return;
}

View File

@ -27,6 +27,35 @@ iframe {
width: 100%;
}
.videoOptions {
float: right;
width: 50px;
}
.videoOptions i {
text-align: right;
width: 50px;
cursor: pointer;
}
.videoOptions ul {
width: 75px;
font-size: 12px;
position: relative;
right: 75px;
bottom: 10px;
background-color: #f5f5f5;
list-style-type: none;
display: none;
}
.videoOptions li {
width: 125px;
position: relative;
right: 40px;
padding: 10px;
}
.videoTitle {
font-weight: bold;
margin-left: 285px;

View File

@ -1,5 +1,13 @@
<div class='video'>
{{{deleteHtml}}}
<div class='videoOptions'>
<i class="fas fa-ellipsis-v" onclick='showVideoOptions(this)'></i>
<ul>
<li>Open in YouTube</li>
<li>Open in HookTube</li>
<li>Save Video</li>
</ul>
</div>
<div class='videoThumbnail'>
<img onclick='playVideo("{{videoId}}")' src={{videoThumbnail}} />
<p onclick='playVideo("{{videoId}}")' class='videoDuration'>{{videoDuration}}</p>