Skip to content

Commit

Permalink
fixing popup
Browse files Browse the repository at this point in the history
  • Loading branch information
dormalk committed Jun 20, 2020
1 parent dc7ccdf commit 25dd102
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 36 deletions.
69 changes: 69 additions & 0 deletions workoutathome2/debug.log
Original file line number Diff line number Diff line change
Expand Up @@ -30158,3 +30158,72 @@
[0620/134606.741:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/134606.741:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/134606.741:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.575:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.578:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.578:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.578:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.578:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.579:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.580:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.581:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.581:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.581:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.581:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.581:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.581:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.581:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.581:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.583:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.583:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.583:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.583:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.583:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.583:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.583:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.584:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0620/154819.585:ERROR:crash_report_database_win.cc(469)] failed to stat report
3 changes: 2 additions & 1 deletion workoutathome2/src/components/Commons/SingleWorkoutCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const SingleWorkoutCard = ({video, onClick, inline}) => {
<div className="panel-body">
<h4 className="margin-none title"><a>{video.title}</a></h4>
<span className="text-grey-500">{video.type}</span><br/>
<span className="text-grey-500">{convertDurationToString(video.duration)}</span>
<span className="text-grey-500">{convertDurationToString(video.duration)}</span><br/>
<span className="text-grey-500">{video.clicks} views</span>
</div>
</div>

Expand Down
26 changes: 26 additions & 0 deletions workoutathome2/src/components/VideoEditor/VideoEditor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';


var editorConfigs = {
videoPath: '',
duration: '',
componentsPosition: [], //['top', 'right'] ['top','left'] ['bottom','right'] ['bottom','left']
components: []
}

var component = {
startAt: 0, //time
endAt: 0, //time
title: '',
titleColor: '',
subTitle: '',
subTitleColor: '',
counter: 0,
counterColor: ''
}

export const VideoEditor = () => {
return(
<div>Test</div>
)
}
12 changes: 7 additions & 5 deletions workoutathome2/src/components/Workout/SuggestOtherVideos.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ export default ({videos,onPick}) => {
<div id="suggest_video" className="portrait">
<div className="panel panel-default">
<h4 className="page-section-heading">Pick your next workout!</h4>
<div className="row gridalicious" data-toggle="gridalicious" data-width="200" id="workouts">
{
videos && videos.map(video => <SingleWorkoutCard key={video.id} video={video} onClick={(videoId) => onPick(videoId)}/>)
}
<div className="panel-body">
<div className="row gridalicious" data-toggle="gridalicious" data-width="200" id="workouts">
{
videos && videos.map(video => <SingleWorkoutCard key={video.id} video={video} onClick={(videoId) => onPick(videoId)}/>)
}
</div>
<button className="btn btn-danger" onClick={() => window.close()}>I want to end the session</button>
</div>
<button className="btn btn-danger" onClick={() => window.close()}>I want to end the session</button>
</div>
</div>
)
Expand Down
27 changes: 7 additions & 20 deletions workoutathome2/src/components/Workout/Workout.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,23 +372,11 @@ export class WorkoutFoo extends React.Component {
timeString = `${seconds} Seconds`
}

var precetage = this.calcPrecetage();
if(Math.floor(player.getDuration() - player.getCurrentTime()) === 0){
gamification = 'FINISH!'
timeleft.innerText = `${gamification}`;
}
else if(precetage < 25){
gamification = ', You Almost Done!'
timeleft.innerText = `${timeString} ${gamification}`;
}
else if(precetage < 50){
gamification = ', Half Way There!'
timeleft.innerText = `${timeString} ${gamification}`;
}
else if(precetage < 75){
gamification = ', Good Job!'
timeleft.innerText = `${timeString} ${gamification}`;
} else {
else {
gamification = ' Left'
timeleft.innerText = `${timeString} ${gamification}`;
}
Expand All @@ -402,19 +390,18 @@ export class WorkoutFoo extends React.Component {
this.setState({session: globalSession.toJson(),endOfVideo: false });
sendEvent(this.state.sessionId, 'change', videoId);
}
printMe(toPrint){
console.log(toPrint);
return true;
}

render(){
var {session,showFirstPopUp} = this.state;
return (
<React.Fragment>
{
session && this.isAdmin() && showFirstPopUp &&
session && this.isAdmin() && showFirstPopUp && !this.state.endOfVideo &&
<PopupCopyLink onStart={() => {
player.playVideo();
this.setState({showFirstPopUp: false})
if(player){
player.playVideo();
this.setState({showFirstPopUp: false})
}
}}/>
}
{this.state.endOfVideo && session.reletedVideos && <SuggestOtherVideos videos={session.reletedVideos} onPick={(videoId) => this.onPickVideo(videoId)}/>}
Expand Down
16 changes: 12 additions & 4 deletions workoutathome2/src/styles/main_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,25 +101,33 @@


/* width */
.nav-tabs::-webkit-scrollbar, .topcategories::-webkit-scrollbar {
.nav-tabs::-webkit-scrollbar,
.topcategories::-webkit-scrollbar,
#workouts::-webkit-scrollbar {
width: 5px;
height: 5px;

}

/* Track */
.nav-tabs::-webkit-scrollbar-track, .topcategories::-webkit-scrollbar-track {
.nav-tabs::-webkit-scrollbar-track,
.topcategories::-webkit-scrollbar-track,
#workouts::-webkit-scrollbar-track {
background: unset;
}

/* Handle */
.nav-tabs::-webkit-scrollbar-thumb, .topcategories::-webkit-scrollbar-thumb {
.nav-tabs::-webkit-scrollbar-thumb,
.topcategories::-webkit-scrollbar-thumb,
#workouts::-webkit-scrollbar-thumb {
background: #FF7C2E;
border-radius: 10px;
}

/* Handle on hover */
.nav-tabs::-webkit-scrollbar-thumb:hover, .topcategories::-webkit-scrollbar-thumb:hover {
.nav-tabs::-webkit-scrollbar-thumb:hover,
.topcategories::-webkit-scrollbar-thumb:hover,
#workouts::-webkit-scrollbar-thumb:hover {
background: #FF7C2E;
}

65 changes: 59 additions & 6 deletions workoutathome2/src/styles/workout_session.scss
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ nav.close_2 #toggle-nav{
}



#suggest_video>.panel-body{
margin: 0.4rem;
}
#suggest_video{
position: fixed;
z-index: 99999;
Expand All @@ -458,6 +460,49 @@ nav.close_2 #toggle-nav{
button{
margin: 10px;
}
.panel-body{
#workouts{
overflow: auto;
img{
height: 120px !important;
}
.panel{
margin-bottom: 0.3rem;
}
.panel-body{
padding: 0.5rem;

h4{
font-size: 16px
}
}
}


/* width */
#workouts::-webkit-scrollbar {
width: 5px;
height: 5px;

}

/* Track */
#workouts::-webkit-scrollbar-track {
background: unset;
}

/* Handle */
#workouts::-webkit-scrollbar-thumb {
background: #FF7C2E;
border-radius: 10px;
}

/* Handle on hover */
#workouts::-webkit-scrollbar-thumb:hover {
background: #FF7C2E;
}

}
}


Expand All @@ -467,10 +512,9 @@ nav.close_2 #toggle-nav{
width: 50%;
text-align: center;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
transform: translate(-50%,0);
bottom: 0px;
animation: 1s ease-out 0s 1 slideInFromLeft2;
animation: 1s ease-out 0s 1 slideInFromLeft;

i:active{
color: #FF7C2E;
Expand Down Expand Up @@ -544,9 +588,18 @@ nav.close_2 #toggle-nav{

#share_workout,#suggest_video{
z-index: 99999;
top: 25%;
top: 0px;
font-size: 1.2rem;
padding: 1rem;
transform: translate(-50%,-25%);
width: 65%;

.page-section-heading{
padding: 0.5rem;
}
}

#share_workout>.panel-body,
#suggest_video>.panel-body{
padding: 0.4rem !important;
}
}
4 changes: 4 additions & 0 deletions workoutathome2/src/styles/workouts_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
#workouts .inline{
width: 100%;

img {
width: 100% !important;
height: auto;
}
}


Expand Down

0 comments on commit 25dd102

Please sign in to comment.