Skip to content

Commit

Permalink
Merge pull request #22 from ECE49595-Team-6/centered-modals
Browse files Browse the repository at this point in the history
Fine tuning Now Playing page UI
  • Loading branch information
rrk0804 authored Nov 3, 2024
2 parents e0b7583 + c079120 commit 6d84dd5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/DynamicRecommendations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class DynamicRecommendations extends React.Component<{recTargetProp : string}, {
render() {
Spicetify.Player.addEventListener("onprogress", this.addToQueue);
return (
<div className={styles.recommendationsSection} style={{width: "100%"}}>
<div className={styles.recommendationsSection} style={{width: "100%", paddingRight: "35px"}}>
<div className={styles.recommendationHeader}>
<div className={styles.recommendationsLabel} style={{marginTop: "10px"}}>{"Song Recommendations"}</div>
<div className={styles.recommendationsHeaderSpacer}></div>
Expand Down
22 changes: 12 additions & 10 deletions src/components/NowPlaying.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,12 @@ class NowPlaying extends React.Component<{}, {audioFeatures: AudioFeaturesRespon
backgroundColor: "rgba(0, 0, 0, 0.70)",
},
content: {
position: 'relative',
top: '60px',
left: '27.5%',
width: "550px",
height: "610px",
position: 'absolute',
top: '40%',
left: '47%',
transform: 'translate(-50%, -50%)',
width: "33%",
height: "65%",
},
}

Expand All @@ -153,11 +154,12 @@ class NowPlaying extends React.Component<{}, {audioFeatures: AudioFeaturesRespon
backgroundColor: "rgba(0, 0, 0, 0.70)",
},
content: {
position: 'relative',
top: '55px',
left: '21.5%',
width: "800px",
height: "600px"
position: 'absolute',
top: '43%',
left: '47%',
transform: 'translate(-50%, -50%)',
width: "50%",
height: "600px"
},
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/RecommendationsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class RecommendationsModal extends React.Component<{setModalIsOpen: (value: bool
<img className={styles.playIcon} style={{marginLeft: "auto"}} src={"https://img.icons8.com/?size=100&id=6483&format=png&color=FFFFFF"}
onClick={() => this.props.setModalIsOpen(false)}/>
</div>
<div className={styles.settingContainer} style={{paddingLeft: "0", marginBottom: "30px"}}>
<div className={styles.settingContainer} style={{paddingLeft: "0", marginBottom: "20px"}}>
{Object.keys(this.props.selectedMetrics).map((metric_name) => <div className={styles.recommendationTarget} style={{marginRight: "10px",
}}>
{metric_name}
Expand Down
6 changes: 4 additions & 2 deletions src/css/app.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@
.sectionHeaderContainer {
display: flex;
align-items: center;
margin-left: 0;
margin-right: 0;
}

.settingsIconContainer:hover {
Expand All @@ -327,8 +329,8 @@
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(4, 1fr);
row-gap: 13px;
column-gap: 10px;
row-gap: 5px;
column-gap: 5px;
}


0 comments on commit 6d84dd5

Please sign in to comment.