mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
Merge e50f1b378d into 2fe3235d51
This commit is contained in:
commit
7e0c24b1f7
2 changed files with 26 additions and 5 deletions
|
|
@ -19,6 +19,7 @@ import EqToggleButton from "./EqToggleButton";
|
|||
import PlaylistToggleButton from "./PlaylistToggleButton";
|
||||
import Kbps from "./Kbps";
|
||||
import Khz from "./Khz";
|
||||
import WorkIndicator from "./work-indicator"
|
||||
import Marquee from "./Marquee";
|
||||
import MonoStereo from "./MonoStereo";
|
||||
import Position from "./Position";
|
||||
|
|
@ -99,11 +100,7 @@ const MainWindow = React.memo(({ analyser, filePickers }: Props) => {
|
|||
</div>
|
||||
<div className="webamp-status">
|
||||
<ClutterBar />
|
||||
{!working && <div id="play-pause" />}
|
||||
<div
|
||||
id="work-indicator"
|
||||
className={classnames({ selected: working })}
|
||||
/>
|
||||
<WorkIndicator />
|
||||
<Time />
|
||||
</div>
|
||||
<Vis analyser={analyser} />
|
||||
|
|
|
|||
24
packages/webamp/js/components/MainWindow/work-indicator.tsx
Normal file
24
packages/webamp/js/components/MainWindow/work-indicator.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import * as React from "react";
|
||||
import classnames from "classnames";
|
||||
import { useTypedSelector } from "../../hooks";
|
||||
import * as Selectors from "../../selectors";
|
||||
import { MEDIA_STATUS } from "../../constants";
|
||||
|
||||
export default function WorkIndicator() {
|
||||
const kbps = useTypedSelector(Selectors.getKbps);
|
||||
const khz = useTypedSelector(Selectors.getKhz);
|
||||
const mediaStatus = useTypedSelector(Selectors.getMediaStatus);
|
||||
|
||||
const working =
|
||||
mediaStatus === MEDIA_STATUS.PLAYING &&
|
||||
!(kbps != null &&
|
||||
khz != null &&
|
||||
kbps.trim() !== "0");
|
||||
|
||||
return (
|
||||
<div
|
||||
id="work-indicator"
|
||||
className={classnames({ selected: working })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue