move mic meter

This commit is contained in:
michael-grace 2020-04-22 22:33:41 +01:00
parent e08e3df2c6
commit 6ee50b198e
4 changed files with 22 additions and 14 deletions

View file

@ -94,38 +94,46 @@ button {
z-index: 5; z-index: 5;
/* padding: 1px; */ /* padding: 1px; */
} }
.waveform .current, .waveform .current,
.waveform .remaining, .waveform .remaining,
.waveform .length { .waveform .length {
font-weight: 800; font-weight: 800;
} }
.waveform .remaining, .waveform .remaining,
.waveform .outro { .waveform .outro {
right: 0; right: 0;
position: absolute; position: absolute;
} }
.waveform .intro, .waveform .intro,
.waveform .outro, .waveform .outro,
.waveform .length { .waveform .length {
bottom: 0; bottom: 0;
position: absolute; position: absolute;
} }
.waveform .length { .waveform .length {
text-align: center; text-align: center;
width: 100%; width: 100%;
} }
.waveform { .waveform {
height: 6vh; height: 6vh;
} }
.waveform .graph { .waveform .graph {
position: absolute; position: absolute;
height: 6vh; height: 6vh;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
} }
.waveform .graph wave { .waveform .graph wave {
height: 6vh !important; height: 6vh !important;
} }
.waveform .loading { .waveform .loading {
background: #ccccff; background: #ccccff;
} }
@ -135,6 +143,7 @@ button {
} }
/* Flash class and keyframe animation */ /* Flash class and keyframe animation */
.sp-ending-soon { .sp-ending-soon {
-webkit-animation: green-flash steps(1) 0.5s infinite; -webkit-animation: green-flash steps(1) 0.5s infinite;
animation: green-flash steps(1) 0.5s infinite; animation: green-flash steps(1) 0.5s infinite;
@ -154,3 +163,7 @@ button {
pointer-events: none; pointer-events: none;
box-shadow: inset 0 0 3px 6px red; box-shadow: inset 0 0 3px 6px red;
} }
#micMeter {
margin: 0.4rem 0 0 0.6rem;
}

View file

@ -1,7 +1,6 @@
import React, { useRef, useEffect } from "react"; import React, { useRef, useEffect } from "react";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import Clock from "react-live-clock"; import Clock from "react-live-clock";
import { VUMeter } from "../optionsMenu/helpers/VUMeter";
import { FaRegClock, FaRegUser } from "react-icons/fa"; import { FaRegClock, FaRegUser } from "react-icons/fa";
@ -69,15 +68,6 @@ export function NavBar() {
/> />
</div> </div>
</div> </div>
<div className="nav-item" id="navMeter">
<VUMeter
width={400}
height={40}
range={[-70, 0]}
greenRange={[-14, -3]}
/>
</div>
</div> </div>
<ul className="nav navbar-nav navbar-right"> <ul className="nav navbar-nav navbar-right">

View file

@ -251,7 +251,3 @@
font-weight: bold; font-weight: bold;
font-size: 1.1em; font-size: 1.1em;
} }
#navMeter {
margin: 0.4rem 0 0 1rem;
}

View file

@ -2,6 +2,7 @@ import React, { useState, useReducer, useEffect } from "react";
import { ContextMenu, MenuItem } from "react-contextmenu"; import { ContextMenu, MenuItem } from "react-contextmenu";
import { useBeforeunload } from "react-beforeunload"; import { useBeforeunload } from "react-beforeunload";
import { FaAlignJustify, FaBookOpen, FaMicrophone } from "react-icons/fa"; import { FaAlignJustify, FaBookOpen, FaMicrophone } from "react-icons/fa";
import { VUMeter } from "../optionsMenu/helpers/VUMeter";
import { TimeslotItem } from "../api"; import { TimeslotItem } from "../api";
import appLogo from "../assets/images/webstudio.svg"; import appLogo from "../assets/images/webstudio.svg";
@ -145,6 +146,14 @@ function MicControl() {
The microphone has not been setup. Go to options. The microphone has not been setup. Go to options.
</p> </p>
)} )}
<div id="micMeter">
<VUMeter
width={400}
height={40}
range={[-70, 0]}
greenRange={[-14, -3]}
/>
</div>
<div className={`mixer-buttons ${!state.open && "disabled"}`}> <div className={`mixer-buttons ${!state.open && "disabled"}`}>
<div <div
className="mixer-buttons-backdrop" className="mixer-buttons-backdrop"