Remove unused and duplicated files
This commit is contained in:
@@ -1,63 +0,0 @@
|
||||
import React, { Component } from "react";
|
||||
import consts from "../../consts.js";
|
||||
import PropTypes from "prop-types";
|
||||
import styled from "styled-components";
|
||||
import classNames from "classnames";
|
||||
|
||||
import play from "../../img/start_1279169.svg";
|
||||
import stop from "../../img/stop_1279170.svg";
|
||||
|
||||
const StatusText = styled.span`
|
||||
padding: 10px;
|
||||
vertical-align: middle;
|
||||
font-size: 18px;
|
||||
`;
|
||||
|
||||
const PlayingRadio = styled(StatusText)`
|
||||
font-size: 26px;
|
||||
display: flex;
|
||||
vertical-align: middle;
|
||||
flex-grow: 1;
|
||||
align-items: center;
|
||||
|
||||
&.condensed {
|
||||
font-size: 18px;
|
||||
}
|
||||
`;
|
||||
|
||||
const PlaybackButton = styled.img`
|
||||
height: 40px;
|
||||
margin-right: 10px;
|
||||
`;
|
||||
|
||||
class PlayerStatus extends Component {
|
||||
|
||||
render() {
|
||||
var lang = this.props.settings.config.uiLang;
|
||||
var reducedVolume = this.props.settings.config.filterVolume === consts.VOLUME_MUTED;
|
||||
//let radios = this.props.settings.radios;
|
||||
let indexRadio = this.props.bsw.getActiveIndex();
|
||||
let text;
|
||||
if (isNaN(indexRadio)) {
|
||||
text = { fr: "Choisissez une radio à écouter", en: "Choose a radio to listen to" }[lang];
|
||||
} else {
|
||||
text = this.props.settings.radios[indexRadio].name + (reducedVolume ? { fr: " (volume réduit)", en: " (muted)" }[lang] : "");
|
||||
}
|
||||
|
||||
return (
|
||||
<PlayingRadio className={classNames({ condensed: this.props.condensed })}>
|
||||
<PlaybackButton src={isNaN(indexRadio) ? play : stop} alt="Stop" onClick={this.props.playbackAction} />
|
||||
{text}
|
||||
</PlayingRadio>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
PlayerStatus.propTypes = {
|
||||
settings: PropTypes.object.isRequired,
|
||||
bsw: PropTypes.object.isRequired,
|
||||
condensed: PropTypes.bool.isRequired,
|
||||
playbackAction: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default PlayerStatus;
|
||||
@@ -1,62 +0,0 @@
|
||||
import React, { Component } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
//import classNames from "classnames";
|
||||
//import styled from "styled-components";
|
||||
|
||||
import music from "../img/type/1music.png";
|
||||
import speech from "../img/type/2speech.png";
|
||||
import ads from "../img/type/3ads.png";
|
||||
import consts from "../consts.js";
|
||||
|
||||
/*const TdIcons = styled.td`
|
||||
padding: 1em;
|
||||
text-align: center;
|
||||
`;*/
|
||||
|
||||
class FilterContentIcons extends Component {
|
||||
render() {
|
||||
//let glyphPl = <span className="glyphicon glyphicon-plus glyphStyle" aria-hidden="true"></span>;
|
||||
let logoMusic = <img className="img-circle choice-icon" src={music} alt="music" />;
|
||||
let logoTalk = <img className="img-circle choice-icon" src={speech} alt="speech" />;
|
||||
let logoAds = <img className="img-circle choice-icon" src={ads} alt="ads" />;
|
||||
let glyphOk = <span className="glyphicon glyphicon-ok glyphStyle" aria-hidden="true" style={{"color": "green"}}></span>;
|
||||
let glyphRm = <span className="glyphicon glyphicon-remove glyphStyle" aria-hidden="true" style={{"color": "orange"}}></span>;
|
||||
|
||||
|
||||
return (
|
||||
<span>
|
||||
{logoMusic}
|
||||
{glyphOk}
|
||||
{logoTalk}
|
||||
{(this.props.cat === consts.FILTER_SPEECH || this.props.cat === consts.FILTER_OFF) &&
|
||||
glyphOk
|
||||
}
|
||||
{this.props.cat === consts.FILTER_MUSIC &&
|
||||
glyphRm
|
||||
}
|
||||
|
||||
{logoAds}
|
||||
{this.props.cat === consts.FILTER_OFF &&
|
||||
glyphOk
|
||||
}
|
||||
{(this.props.cat === consts.FILTER_MUSIC || this.props.cat === consts.FILTER_SPEECH) &&
|
||||
glyphRm
|
||||
}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
FilterContentIcons.propTypes = {
|
||||
cat: PropTypes.number.isRequired
|
||||
};
|
||||
|
||||
export default FilterContentIcons;
|
||||
@@ -5,7 +5,6 @@ import classNames from "classnames";
|
||||
|
||||
import consts from "../../consts.js";
|
||||
import RegistrationStatus from "../RegistrationStatus.js";
|
||||
//import FilterContentIcons from "./FilterContentIcons";
|
||||
import ListRadios from "../ListRadios";
|
||||
import OnboardingSteps from "./OnboardingSteps.jsx";
|
||||
import ChooseFilter from "./ChooseFilter.jsx";
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
import React, { Component } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import consts from "../consts.js";
|
||||
import classNames from "classnames";
|
||||
import styled from "styled-components";
|
||||
import StatusChart from "./StatusChart.js";
|
||||
|
||||
import play from "../img/status/play.png";
|
||||
import playing from "../img/status/playing.gif";
|
||||
import pause from "../img/status/pause.png";
|
||||
import music from "../img/type/1music.png";
|
||||
import speech from "../img/type/2speech.png";
|
||||
import ads from "../img/type/3ads.png";
|
||||
import unknown from "../img/type/unknown.png";
|
||||
import unavailable from "../img/type/unavailable.png";
|
||||
|
||||
const DivRadio = styled.div`
|
||||
margin: 5px auto;
|
||||
`;
|
||||
|
||||
class RadioElement extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.play = this.play.bind(this);
|
||||
this.handleMoveUp = this.handleMoveUp.bind(this);
|
||||
this.handleRemove = this.handleRemove.bind(this);
|
||||
this.handleMoveDown = this.handleMoveDown.bind(this);
|
||||
}
|
||||
|
||||
play() {
|
||||
this.props.bsw.togglePlay(this.props.radio.name);
|
||||
this.forceUpdate();
|
||||
}
|
||||
|
||||
handleRemove() {
|
||||
this.props.settings.removeRadio(this.props.radio.name);
|
||||
this.forceUpdate();
|
||||
}
|
||||
|
||||
handleMoveUp() {
|
||||
let self = this;
|
||||
this.props.bsw.moveRadio(this.props.radio.name, "up", function() {
|
||||
self.forceUpdate();
|
||||
});
|
||||
}
|
||||
|
||||
handleMoveDown() {
|
||||
let self = this;
|
||||
this.props.bsw.moveRadio(this.props.radio.name, "down", function() {
|
||||
self.forceUpdate();
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
let radioInfo = this.props.radio;
|
||||
//console.log("rendering radio " + radioInfo.name);
|
||||
let playerConfig = this.props.settings.config;
|
||||
let playPauseLogo = play;
|
||||
if (radioInfo.playing && radioInfo.hovered) {
|
||||
playPauseLogo = pause;
|
||||
} else if (radioInfo.playing) {
|
||||
playPauseLogo = playing;
|
||||
}
|
||||
let radioLogo = radioInfo.logo || play;
|
||||
let shadeColor = "";
|
||||
if (playerConfig.filterType !== consts.FILTER_OFF) {
|
||||
let filteredVolume = this.props.bsw.getFilteredVolume(radioInfo.getStatus());
|
||||
if (filteredVolume === consts.VOLUME_NORMAL || filteredVolume === consts.VOLUME_UNKNOWN) {
|
||||
shadeColor = " statusShadeGreen";
|
||||
} else {
|
||||
shadeColor = " statusShadeRed";
|
||||
}
|
||||
}
|
||||
let radioStatus;
|
||||
switch (radioInfo.getStatus()) {
|
||||
case consts.STATUS_MUSIC: radioStatus = music; break;
|
||||
case consts.STATUS_SPEECH: radioStatus = speech; break;
|
||||
case consts.STATUS_AD: radioStatus = ads; break;
|
||||
case consts.STATUS_STREAM_BROKEN: radioStatus = unavailable; break;
|
||||
default: radioStatus = unknown;
|
||||
}
|
||||
return (
|
||||
<DivRadio className={"radioInfo vmid" + classNames({" playing": radioInfo.playing })} draggable="true">
|
||||
<img src={playPauseLogo} className="playingGif" alt="Playing" />
|
||||
<img className="radioLogo" src={radioLogo} alt="Radio logo" />
|
||||
<div className="radioName">{radioInfo.name}</div>
|
||||
<span className="statusContainer">
|
||||
<span className={"statusShade" + shadeColor}>
|
||||
<img className="statusLogo" src={radioStatus} alt="Radio status" />
|
||||
</span>
|
||||
</span>
|
||||
<div className="playlistCommands">
|
||||
<span className="playlistCommand glyphicon glyphicon-chevron-up" aria-hidden="true" onClick={this.handleMoveUp} ></span><br />
|
||||
<span className="playlistCommand glyphicon glyphicon-remove" aria-hidden="true" onClick={this.handleRemove} ></span><br />
|
||||
<span className="playlistCommand glyphicon glyphicon-chevron-down" aria-hidden="true" onClick={this.handleMoveDown} ></span>
|
||||
</div>
|
||||
|
||||
<div className="radioInfoOverlay" onClick={this.play}></div>
|
||||
</DivRadio>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
RadioElement.propTypes = {
|
||||
settings: PropTypes.object.isRequired,
|
||||
bsw: PropTypes.object.isRequired,
|
||||
radio: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
const DivRadios = styled.div`
|
||||
margin: auto;
|
||||
`;
|
||||
|
||||
class Radios extends Component {
|
||||
render() {
|
||||
let props = this.props;
|
||||
return (
|
||||
<DivRadios>
|
||||
{props.settings.radios.map(function(radio, i){
|
||||
return <RadioElement radio={radio} settings={props.settings} bsw={props.bsw} key={"radio" + i} />;
|
||||
})}
|
||||
<StatusChart status={this.props.settings.radios[0].status} />
|
||||
</DivRadios>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Radios.propTypes = {
|
||||
bsw: PropTypes.object.isRequired,
|
||||
settings: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
export default Radios;
|
||||
@@ -1,15 +0,0 @@
|
||||
// eslint-disable-next-line
|
||||
module.exports = function() {
|
||||
|
||||
var _paq = []; //_paq ||
|
||||
// tracker methods like "setCustomDimension" should be called before "trackPageView"
|
||||
_paq.push(["trackPageView"]);
|
||||
_paq.push(["enableLinkTracking"]);
|
||||
(function() {
|
||||
var u="https://static.adblockradio.com/pwk/";
|
||||
_paq.push(["setTrackerUrl", u+"p.php"]);
|
||||
_paq.push(["setSiteId", "1"]);
|
||||
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0];
|
||||
g.type="text/javascript"; g.async=true; g.defer=true; g.src=u+"p.js"; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
};
|
||||
Reference in New Issue
Block a user