Properly rewrote modal UI/UX (not complete)
This commit is contained in:
parent
976c000d79
commit
2be6b600c5
2 changed files with 34 additions and 44 deletions
|
@ -16,6 +16,7 @@ import {
|
|||
Select,
|
||||
Switch,
|
||||
Text,
|
||||
Tooltip,
|
||||
UserStore,
|
||||
useState
|
||||
} from "@vencord/types/webpack/common";
|
||||
|
@ -187,26 +188,40 @@ function StreamSettings({
|
|||
deps: [source.id]
|
||||
}
|
||||
);
|
||||
const [visible, setVisible] = useState(false);
|
||||
const preview = (
|
||||
<div className="vcd-screen-picker-preview">
|
||||
<img src={thumb} alt="stream preview" />;
|
||||
</div>
|
||||
);
|
||||
// the source's name is not properly being displayed
|
||||
return (
|
||||
<div>
|
||||
<Forms.FormTitle>What you're streaming</Forms.FormTitle>
|
||||
<section>
|
||||
<Card className={"vcd-screen-picker-card vcd-screen-picker-preview-buttons"}>
|
||||
<button
|
||||
className="vcd-screen-picker-subtle-button"
|
||||
onClick={() => {
|
||||
setVisible(!visible);
|
||||
}}
|
||||
>
|
||||
Show Preview
|
||||
</button>
|
||||
<button className="vcd-screen-picker-button">Change</button>
|
||||
</Card>
|
||||
<Card className={visible ? "vcd-screen-picker-card vcd-screen-picker-preview fade-in" : "not-visible"}>
|
||||
<img src={thumb} alt="stream preview" />
|
||||
</Card>
|
||||
<div className="vcd-screen-picker-tooltip">
|
||||
<Card className={"vcd-screen-picker-card"}>
|
||||
<Tooltip text={preview}>
|
||||
{({ onMouseEnter, onMouseLeave }) => (
|
||||
<div
|
||||
className="vcd-screen-picker-tooltip"
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
>
|
||||
Show Preview
|
||||
</div>
|
||||
)}
|
||||
</Tooltip>
|
||||
<Button
|
||||
color={Button.Colors.TRANSPARENT}
|
||||
className="vcd-screen-picker-startbuttons"
|
||||
onClick={() => {
|
||||
navigator.mediaDevices.getDisplayMedia();
|
||||
}}
|
||||
>
|
||||
Go Back
|
||||
</Button>
|
||||
</Card>
|
||||
</div>
|
||||
</section>
|
||||
<Forms.FormTitle>Stream Settings</Forms.FormTitle>
|
||||
<Card className="vcd-screen-picker-card">
|
||||
|
|
|
@ -138,21 +138,13 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.vcd-screen-picker-preview-buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
background-color: var(--background-secondary);
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.vcd-screen-picker-subtle-button {
|
||||
.vcd-screen-picker-tooltip {
|
||||
background-color: transparent;
|
||||
color: var(--primary-500);
|
||||
color: var(--text-normal);
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
font-style: bold;
|
||||
text-transform: uppercase;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.vcd-screen-picker-button{
|
||||
|
@ -161,21 +153,4 @@
|
|||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.fade-in {
|
||||
animation-name: fade-in;
|
||||
animation-duration: .25s;
|
||||
animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||
}
|
||||
|
||||
@keyframes fade-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: scale(0, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
Reference in a new issue