This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first commit * fix with proxy * fixed empy videos * return empty video if it cant access /video * fix for ff video * bump coverage a bit * a bit more * add more coverage * fix broken test * only show the video tab if there are videos to show * diferent test * ui not loading preview * videos update * update to use json endpoint for videos * implemented review changes * implemented ui feedback * remove extra space
- Loading branch information
1 parent
c8d580c
commit 5e6a1c8
Showing
9 changed files
with
292 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ package ui | |
|
||
//go:generate yarn install | ||
//go:generate yarn build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import React from "react"; | ||
import {CSSTransition, TransitionGroup} from "react-transition-group"; | ||
|
||
import "./style.scss"; | ||
|
||
|
||
const Videos = (props) => { | ||
const {videos} = props; | ||
const list = Object.keys(videos); | ||
|
||
return ( | ||
|
||
<div className="videos"> | ||
<div className="videos__section-title"> | ||
Videos | ||
</div> | ||
<TransitionGroup className={`videos__list videos__list_count-${list.length}`}> | ||
{list.length && list.map(video => { | ||
const src = "/video/"+videos[video]; | ||
return ( | ||
|
||
<CSSTransition | ||
key={video} | ||
timeout={500} | ||
classNames="videos-container_state" | ||
unmountOnExit | ||
> | ||
|
||
<div className="videos-container"> | ||
<div className="video-cap video-cap__name" | ||
title={videos[video]}> | ||
{videos[video]} | ||
</div> | ||
<video controls preload="auto"> | ||
<source src={src} type="video/mp4" /> | ||
</video> | ||
</div> | ||
</CSSTransition> | ||
); | ||
} | ||
)} | ||
</TransitionGroup> | ||
{( | ||
<CSSTransition | ||
in={!list.length} | ||
timeout={500} | ||
exit={false} | ||
classNames="videos__no-any_state" | ||
unmountOnExit | ||
> | ||
<div className="videos__no-any"> | ||
<div title="No any" className="icon dripicons-hourglass"/> | ||
<div className="nosession-any-text">NO VIDEOS YET :'(</div> | ||
</div> | ||
</CSSTransition> | ||
)} | ||
|
||
</div> | ||
); | ||
|
||
}; | ||
|
||
export default Videos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
$color-accent: #59a781; | ||
$color-session-name: #555f6a; | ||
$border-section-color: #353b42; | ||
$small-screen: 900px; | ||
$big-screen: 1280px; | ||
|
||
.videos { | ||
width: 100%; | ||
|
||
&__section-title { | ||
color: #666; | ||
position: relative; | ||
top: 0; | ||
left: 0; | ||
padding-left: 5%; | ||
border-bottom: 1px solid $border-section-color; | ||
width: 95%; | ||
letter-spacing: 1px; | ||
font-size: 10px; | ||
line-height: 20px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
&__no-any { | ||
color: #fff; | ||
display: flex; | ||
flex-wrap: wrap; | ||
flex-direction: column; | ||
align-items: center; | ||
font-size: 1.2em; | ||
justify-content: center; | ||
|
||
.nosession-any-text { | ||
margin: 10px; | ||
} | ||
|
||
|
||
&_state-enter-active { | ||
display: none; | ||
} | ||
} | ||
} | ||
|
||
.videos__list { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: flex-start; | ||
width: 94%; | ||
padding-left: 3%; | ||
padding-right: 3%; | ||
|
||
&_count-0, &_count-1, &_count-2 { | ||
justify-content: center; | ||
} | ||
|
||
&_count-3 { | ||
@media screen and (max-width: $big-screen) { | ||
justify-content: flex-start; | ||
} | ||
|
||
@media screen and (min-width: $big-screen + 1) { | ||
justify-content: center; | ||
} | ||
} | ||
|
||
.videos-container { | ||
flex: 0 0 auto; | ||
transition: all 0.5s; | ||
|
||
@media screen and (max-width: $small-screen) { | ||
flex-basis: 100%; | ||
max-width: 100%; | ||
} | ||
|
||
@media screen and (min-width: $small-screen + 1) and (max-width: $big-screen) { | ||
flex-basis: 50%; | ||
max-width: 50%; | ||
} | ||
|
||
@media screen and (min-width: $big-screen + 1) { | ||
flex-basis: 33.333%; | ||
max-width: 33.333%; | ||
} | ||
video{ | ||
flex-basis: 98%; | ||
max-width: 98%; | ||
padding: 0 5px; | ||
} | ||
.video-cap { | ||
height: 30px; | ||
line-height: 30px; | ||
box-shadow: 0 1px 6px rgba(0, 0, 0, .12), 0 1px 4px rgba(0, 0, 0, .12); | ||
margin: -3px 5px 0; | ||
padding: 0 5px; | ||
|
||
&__name { | ||
overflow: hidden; | ||
background-color: $color-session-name; | ||
font-family: "Source Code Pro", Menlo, Monaco, Consolas, "Courier New", monospace; | ||
|
||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
font-size: 13px; | ||
} | ||
|
||
|
||
} //TRANSITIONS | ||
&_state-enter { | ||
opacity: 0.01; | ||
} | ||
|
||
&_state-enter-active { | ||
opacity: 1; | ||
transition: opacity 500ms ease-in; | ||
} | ||
|
||
&_state-exit { | ||
opacity: 1; | ||
} | ||
|
||
&_state-exit-active { | ||
opacity: 0.01; | ||
transition: opacity 500ms ease-out; | ||
} | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.