Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ui tweak for buttons #1

Merged
merged 1 commit into from
Apr 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/streamaudiofixer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React, {ReactElement} from 'react';
import OBS from "@ponyfest/obs-websocket-js";
import {Button} from "@material-ui/core";
import {PropTypes} from "@material-ui/core";

interface StreamManagerProps {
obs: OBS;
source: string;
label: string;
color: PropTypes.Color;
}

export function StreamAudioFixer(props: StreamManagerProps): ReactElement {
Expand All @@ -19,5 +21,5 @@ export function StreamAudioFixer(props: StreamManagerProps): ReactElement {
}, 1000);
}

return <Button variant="contained" color="secondary" onClick={() => fixPanelAudio()}>{props.label}</Button>;
return <Button variant="contained" color={props.color} onClick={() => fixPanelAudio()}>{props.label}</Button>;
}
4 changes: 2 additions & 2 deletions src/streammanager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export function StreamManager(props: StreamManagerProps): ReactElement {
</div>
<StreamVolume obs={props.obs} source={PANEL_SOURCE} />
<div className="StreamManager-fixers">
<StreamAudioFixer obs={props.obs} source={PANEL_SOURCE} label="Reboot Panel" />
<StreamAudioFixer obs={props.obs} source={TECH_SOURCE} label="Reboot Tech" />
<StreamAudioFixer obs={props.obs} source={PANEL_SOURCE} label="Reboot Panel" color="secondary" />
<StreamAudioFixer obs={props.obs} source={TECH_SOURCE} label="Reboot Tech" color="primary"/>
{/* Todo: put this button somewhere less ridiculous. */}
<PanelSettings obs={props.obs} />
</div>
Expand Down