Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Dashboard + Wei / Audio types (#52)
Browse files Browse the repository at this point in the history
* Add dashboard stuff

* Handle Wei + Audio correctly, use nominal types

Co-authored-by: jowlee <joeylee0925@gmail.com>
  • Loading branch information
2 people authored and raymondjacobson committed Oct 19, 2020
1 parent 40f1d01 commit beef6dc
Show file tree
Hide file tree
Showing 20 changed files with 772 additions and 108 deletions.
Binary file added src/assets/img/featureChartLevel0@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/featureChartLevel1@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/img/iconCopy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/img/iconReceive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/img/iconSend.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/platformToken@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@

.cryptoContentContainer {
display: flex;
width: 100%;
width: calc(100% + 24px);
flex-wrap: wrap;
margin: -18px -12px;
margin: -18px -12px 16px -12px;
}

.cryptoContentContainer > div {
Expand All @@ -138,4 +138,12 @@

.explainerTile {
flex: 1 1 100% !important;
}

.profileContainer {
display: inline-flex;
width: 100%;
align-items: center;
justify-content: stretch;
margin: 12px 0px 36px;
}
38 changes: 19 additions & 19 deletions src/containers/artist-dashboard-page/ArtistDashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,7 @@ export class ArtistDashboardPage extends Component<
}

renderCreatorContent() {
const {
account,
goToRoute,
listenData,
tracks,
unlistedTracks,
stats
} = this.props
const { account, listenData, tracks, unlistedTracks, stats } = this.props
if (!account.is_creator) return null

const { selectedTrack } = this.state
Expand All @@ -314,17 +307,6 @@ export class ArtistDashboardPage extends Component<
const unlistedDataSource = this.formatMetadata(unlistedTracks)
return (
<>
<div className={styles.sectionContainer}>
<ArtistProfile
userId={account.user_id}
profilePictureSizes={account._profile_picture_sizes}
isVerified={account.is_verified}
name={account.name}
handle={account.handle}
onViewProfile={() => goToRoute(profilePage(account.handle))}
/>
{/* <AchievementTile /> */}
</div>
<div className={styles.sectionContainer}>
<Suspense fallback={<div className={styles.chartFallback} />}>
<TotalPlaysChart
Expand Down Expand Up @@ -362,6 +344,23 @@ export class ArtistDashboardPage extends Component<
)
}

renderProfileSection() {
const { account, goToRoute } = this.props

return (
<div className={styles.profileContainer}>
<ArtistProfile
userId={account.user_id}
profilePictureSizes={account._profile_picture_sizes}
isVerified={account.is_verified}
name={account.name}
handle={account.handle}
onViewProfile={() => goToRoute(profilePage(account.handle))}
/>
</div>
)
}

render() {
const { account, status } = this.props
const header = <Header primary='Your Artist Dashboard' />
Expand All @@ -378,6 +377,7 @@ export class ArtistDashboardPage extends Component<
<Spin size='large' className={styles.spin} />
) : (
<>
{this.renderProfileSection()}
{this.renderCryptoContent()}
{this.renderCreatorContent()}
</>
Expand Down
260 changes: 259 additions & 1 deletion src/containers/artist-dashboard-page/Tiles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,280 @@
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
justify-content: flex-start;
align-items: center;
border-radius: 6px;
box-shadow: 0px 16px 20px rgba(133, 129, 153, 0.15);
min-height: 210px;
}


/* Wallet Tile */
.walletTile {
background-color: var(--white);
padding-top: 36px;
}

.balanceAmount {
font-weight: 800;
font-size: 64px;
background: -webkit-linear-gradient(315deg, #5B23E1 2.04%, #A22FEB 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 6px;
}

.balanceLabel {
font-weight: var(--font-bold);
font-size: var(--font-m);
text-transform: uppercase;
color: var(--neutral-light-4);
margin-bottom: 20px;
}

.receiveBtn {
margin-right: 24px;
}

.balanceBtn {
border: 1px solid var(--neutral-light-6);
width: 144px;
}

.balanceBtn .textClassName {
color: var(--neutral);
font-size: var(--font-s);
}

.balanceBtn .iconStyle path {
fill: var(--neutral);
}

.balanceBtn.balanceDisabled {
opacity: 0.5;
background-color: hsla(0,0%,100%,.1);
}

/* Claim Tile */
.claimTile {
background: linear-gradient(315deg, #5B23E1 2.04%, #A22FEB 100%);
display: inline-flex;
flex-direction: column;
padding-top: 36px;
}

.claimAmount {
font-weight: 800;
font-size: 64px;
text-align: center;
color: var(--static-white);
text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
margin-bottom: 6px;
}

.unclaimed {
font-weight: var(--font-bold);
font-size: var(--font-m);
text-align: center;
letter-spacing: 1px;
text-transform: uppercase;
color: #C675FF;
text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}

.noClaim {
font-weight: var(--font-bold);
font-size: var(--font-s);
line-height: 17px;
text-align: center;
color: var(--static-white);
max-width: 250px;
}

.claimTile .claimBtn {
background: linear-gradient(262.12deg, #FFC700 5.49%, rgba(255, 148, 0, 0) 97.25%), #FF9400;
box-shadow: 0px 5px 15px -2px rgba(0, 0, 0, 0.25);
}

.claimTile .claimBtn:hover {
background: linear-gradient(262.12deg, #FFC700 5.49%, rgba(255, 148, 0, 0) 97.25%), #FF9400;
box-shadow: 0px 5px 15px -2px rgba(0, 0, 0, 0.25);
}

.claimTile .claimBtn:active {
background: linear-gradient(262.12deg, #FFC700 5.49%, rgba(255, 148, 0, 0) 97.25%), #FF9400;
box-shadow: 0px 5px 15px -2px rgba(0, 0, 0, 0.25);
}

/* Explainer Tile */
.explainerTile {
height: 520px;
background-color: var(--white);
display: inline-flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
overflow: hidden;
text-align: left;
}

.platformToken {
height: 393px;
flex: 0 0 362px;
width: 362px;
position: relative;
margin-right: 29px;
}

.platformTokenImage {
position: absolute;
right: 0;
bottom: 0;
width: 448px;
height: 448px;
}

.whatIsAudioContainer {
flex: 1;
display: inline-flex;
flex-direction: column;
align-items: flex-start;
padding: 32px 72px 0px 0px;
}

.whatIsAudio {
font-weight: 800;
font-size: 40px;
line-height: 49px;
background: -webkit-linear-gradient(315deg, #5B23E1 2.04%, #A22FEB 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin: 0px 0px 2px 0px;
}

.whyCare {
font-weight: var(--font-bold);
font-size: var(--font-m);
line-height: 20px;
text-transform: uppercase;
color: var(--neutral-light-4);
margin-bottom: 18px;
text-align: left;
}

.description {
font-weight: var(--font-demi-bold);
font-size: var(--font-m);
line-height: 24px;
color: var(--neutral);
margin-bottom: 16px;
}

.learnMore {
font-weight: var(--font-bold);
font-size: var(--font-s);
line-height: 17px;
text-align: right;
letter-spacing: 0.5px;
color: var(--neutral);
margin-bottom: 28px;
}

.levels {
display: inline-flex;
flex-direction: column;
padding-left: 24px;
position: relative;
}

.levelContainer {
display: inline-flex;
flex-direction: column;
}

.levelImg {
position: absolute;
top: 0;
left: 0;
width: 18px;
}

.level {
margin: 0px 0px 4px 0px;
}

.levelText {
font-weight: 800;
font-size: var(--font-m);
line-height: 20px;
background: -webkit-linear-gradient(315deg, #5B23E1 2.04%, #A22FEB 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

.levelMore {
font-weight: var(--font-bold);
font-size: var(--font-m);
line-height: 20px;
text-transform: uppercase;
color: var(--neutral-light-6);
}

.vip {
font-weight: 500;
font-size: var(--font-m);
line-height: 24px;
color: var(--neutral);
margin-bottom: 16px;
}

.explainerTile .vipButton {
border: 1px solid var(--neutral-light-6);
height: 48px;
margin-bottom: 32px;
}

.explainerTile .vipDiscordDisabled {
background-color: hsla(0,0%,100%,.1);
}

.explainerTile .vipTextClassName {
font-weight: var(--font-bold);
font-size: var(--font-s);
letter-spacing: 0.5px;
text-transform: uppercase;
color: var(--neutral);
}

.explainerTile .iconDiscord {
height: 24px;
width: 24px;
}

.explainerTile .iconDiscord path {
fill: var(--neutral);
}

.tba {
font-weight: 500;
font-size: var(--font-m);
line-height: 24px;

color: var(--neutral);
}

.disabled {
opacity: 0.5;
}


/* Global on tiles */
.tooltip :global(.ant-tooltip-content) :global(.ant-tooltip-inner) {
background: black;
}

.tooltip :global(.ant-tooltip-content) :global(.ant-tooltip-arrow) {
border-bottom-color: black;
border-right-color: black;
}
Loading

0 comments on commit beef6dc

Please sign in to comment.