correct naming of Generalinfos and added tests

This commit is contained in:
2020-08-05 22:00:55 +02:00
parent 5970e4d19e
commit f87c02c276
10 changed files with 57 additions and 24 deletions

View File

@ -1,6 +1,6 @@
import React from "react";
import style from "./PageTitle.module.css"
import StaticInfos from "../../GlobalInfos";
import GlobalInfos from "../../GlobalInfos";
class PageTitle extends React.Component {
constructor(props) {
@ -11,7 +11,7 @@ class PageTitle extends React.Component {
}
render() {
const themeStyle = StaticInfos.getThemeStyle();
const themeStyle = GlobalInfos.getThemeStyle();
return (
<div className={style.pageheader + ' ' + themeStyle.backgroundcolor}>
<span className={style.pageheadertitle + ' ' + themeStyle.textcolor}>{this.props.title}</span>
@ -31,7 +31,7 @@ class PageTitle extends React.Component {
*/
export class Line extends React.Component {
render() {
const themeStyle = StaticInfos.getThemeStyle();
const themeStyle = GlobalInfos.getThemeStyle();
return (
<>
<hr className={themeStyle.hrcolor}/>

View File

@ -2,7 +2,7 @@ import React from "react";
import style from "./Preview.module.css";
import Player from "../../pages/Player/Player";
import {Spinner} from "react-bootstrap";
import StaticInfos from "../../GlobalInfos";
import GlobalInfos from "../../GlobalInfos";
class Preview extends React.Component {
constructor(props, context) {
@ -34,7 +34,7 @@ class Preview extends React.Component {
}
render() {
const themeStyle = StaticInfos.getThemeStyle();
const themeStyle = GlobalInfos.getThemeStyle();
return (
<div className={style.videopreview + ' ' + themeStyle.secbackground + ' '+ themeStyle.preview} onClick={() => this.itemClick()}>
<div className={style.previewtitle + ' '+ themeStyle.lighttextcolor}>{this.state.name}</div>
@ -65,7 +65,7 @@ class Preview extends React.Component {
export class TagPreview extends React.Component {
render() {
const themeStyle = StaticInfos.getThemeStyle();
const themeStyle = GlobalInfos.getThemeStyle();
return (
<div className={style.videopreview + ' ' + style.tagpreview + ' ' + themeStyle.secbackground + ' '+ themeStyle.preview} onClick={() => this.itemClick()}>
<div className={style.tagpreviewtitle + ' ' + themeStyle.lighttextcolor}>

View File

@ -42,7 +42,6 @@
.videopreview:hover {
opacity: 1;
/*box-shadow: rgba(2, 12, 27, 0.7) 0 0 0 5px;*/
transition: all 300ms;
}

View File

@ -1,10 +1,10 @@
import React from "react";
import style from "./SideBar.module.css"
import StaticInfos from "../../GlobalInfos";
import GlobalInfos from "../../GlobalInfos";
class SideBar extends React.Component {
render() {
const themeStyle = StaticInfos.getThemeStyle();
const themeStyle = GlobalInfos.getThemeStyle();
return (<div className={style.sideinfo + ' '+ themeStyle.secbackground}>
{this.props.children}
</div>);
@ -13,7 +13,7 @@ class SideBar extends React.Component {
export class SideBarTitle extends React.Component {
render() {
const themeStyle = StaticInfos.getThemeStyle();
const themeStyle = GlobalInfos.getThemeStyle();
return (
<div className={style.sidebartitle + ' '+ themeStyle.subtextcolor}>{this.props.children}</div>
);
@ -22,7 +22,7 @@ export class SideBarTitle extends React.Component {
export class SideBarItem extends React.Component {
render() {
const themeStyle = StaticInfos.getThemeStyle();
const themeStyle = GlobalInfos.getThemeStyle();
return (
<div className={style.sidebarinfo + ' ' + themeStyle.thirdbackground + ' ' + themeStyle.lighttextcolor}>{this.props.children}</div>
);