diff --git a/src/pages/HomePage/HomePage.tsx b/src/pages/HomePage/HomePage.tsx index 4a8be75..bb568f4 100644 --- a/src/pages/HomePage/HomePage.tsx +++ b/src/pages/HomePage/HomePage.tsx @@ -67,6 +67,17 @@ export class HomePage extends React.Component { this.fetchStartData(); } + render(): JSX.Element { + return ( + + + + + {this.homepageContent()} + + ); + } + /** * fetch available videos for specified tag * this function clears all preview elements an reloads gravity with tag @@ -95,109 +106,105 @@ export class HomePage extends React.Component { }); } - render(): JSX.Element { + /** + * main content of homepage + */ + homepageContent(): JSX.Element { return ( <> - - - - - - -
{ - e.preventDefault(); - this.props.history.push('/search/' + this.keyword); - }}> - { - this.keyword = e.target.value; - }} - /> - -
-
- - Infos: - - - {this.state.sideinfo.VideoNr} Videos Total! - - - {this.state.sideinfo.FullHdNr} FULL-HD Videos! - - - {this.state.sideinfo.HDNr} HD Videos! - - - {this.state.sideinfo.SDNr} SD Videos! - - - {this.state.sideinfo.DifferentTags} different Tags! - - - Default Tags: - { - this.tagState = DefaultTags.all; - this.fetchVideoData(); - this.setState({subtitle: 'All Videos'}); - }} - /> - { - this.tagState = DefaultTags.fullhd; - this.fetchVideoData(); - this.setState({subtitle: 'Full Hd Videos'}); - }} - /> - { - this.tagState = DefaultTags.lowq; - this.fetchVideoData(); - this.setState({subtitle: 'Low Quality Videos'}); - }} - /> - { - this.tagState = DefaultTags.hd; - this.fetchVideoData(); - this.setState({subtitle: 'HD Videos'}); - }} - /> - -
- Sort By: -
- - {this.state.sortby} - - -
- this.onDropDownItemClick(SortBy.date, 'Date Added')}>Date Added - this.onDropDownItemClick(SortBy.likes, 'Most likes')}>Most likes - this.onDropDownItemClick(SortBy.random, 'Random')}>Random - this.onDropDownItemClick(SortBy.name, 'Name')}>Name - this.onDropDownItemClick(SortBy.length, 'Length')}>Length -
-
+ +
{ + e.preventDefault(); + this.props.history.push('/media/search/' + this.keyword); + }}> + { + this.keyword = e.target.value; + }} + /> + +
+
+ + Infos: + + + {this.state.sideinfo.VideoNr} Videos Total! + + + {this.state.sideinfo.FullHdNr} FULL-HD Videos! + + + {this.state.sideinfo.HDNr} HD Videos! + + + {this.state.sideinfo.SDNr} SD Videos! + + + {this.state.sideinfo.DifferentTags} different Tags! + + + Default Tags: + { + this.tagState = DefaultTags.all; + this.fetchVideoData(); + this.setState({subtitle: 'All Videos'}); + }} + /> + { + this.tagState = DefaultTags.fullhd; + this.fetchVideoData(); + this.setState({subtitle: 'Full Hd Videos'}); + }} + /> + { + this.tagState = DefaultTags.lowq; + this.fetchVideoData(); + this.setState({subtitle: 'Low Quality Videos'}); + }} + /> + { + this.tagState = DefaultTags.hd; + this.fetchVideoData(); + this.setState({subtitle: 'HD Videos'}); + }} + /> + +
+ Sort By: +
+ + {this.state.sortby} + + +
+ this.onDropDownItemClick(SortBy.date, 'Date Added')}>Date Added + this.onDropDownItemClick(SortBy.likes, 'Most likes')}>Most likes + this.onDropDownItemClick(SortBy.random, 'Random')}>Random + this.onDropDownItemClick(SortBy.name, 'Name')}>Name + this.onDropDownItemClick(SortBy.length, 'Length')}>Length
+
+
- -
- - + +
); } diff --git a/src/pages/SettingsPage/MovieSettings.tsx b/src/pages/SettingsPage/MovieSettings.tsx index 451a2d1..52262e6 100644 --- a/src/pages/SettingsPage/MovieSettings.tsx +++ b/src/pages/SettingsPage/MovieSettings.tsx @@ -117,8 +117,8 @@ class MovieSettings extends React.Component { TVShow Reindex
- {this.state.text.map((m) => ( -
+ {this.state.text.map((m, i) => ( +
{m}
))}