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

Commit

Permalink
[C-3001, C-3003] Fix new upload flow error formatting (#3953)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Shanks authored Aug 28, 2023
1 parent 4727ef4 commit f8dcd92
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ const messages = {
},
errors: {
price: {
tooLow: 'Price must be at least $0.99',
tooHigh: 'Price must be less than $9.99'
tooLow: 'Price must be at least $0.99.',
tooHigh: 'Price must be less than $9.99.'
},
preview: {
tooEarly: 'Preview must start during the track',
tooEarly: 'Preview must start during the track.',
tooLate:
'Preview must start at lest 15 seconds before the end of the track'
'Preview must start at lest 15 seconds before the end of the track.'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ const messages = {
description:
'If your AI generated track was trained on an existing Audius artist, you can give them credit here. Only users who have opted-in will appear in this list.',
placeholder: 'Search for Users',
requiredError: 'Valid user must be selected'
requiredError: 'Valid user must be selected.'
},
isrc: {
header: 'ISRC',
placeholder: 'CC-XXX-YY-NNNNN',
validError: 'Must be valid ISRC format'
validError: 'Must be valid ISRC format.'
},
iswc: {
header: 'ISWC',
placeholder: 'T-345246800-1',
validError: 'Must be valid ISWC format'
validError: 'Must be valid ISWC format.'
},
licenseType: 'License Type',
allowAttribution: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
width: 12px;
}

.iconError path {
fill: var(--accent-red);
}

/* Track */
.tracks {
margin: 0 calc(-1 * var(--unit-4));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export const MultiTrackSidebar = () => {
className={styles.iconError}
icon={IconError}
size='xSmall'
fill='accentRed'
/>
<Text size='xSmall' color='accentRed'>
{messages.fixErrors}
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/pages/upload-page/forms/EditTrackForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import { TrackMetadataSchema } from '../validation'
import styles from './EditTrackForm.module.css'

const messages = {
titleError: 'Your track must have a name',
artworkError: 'Artwork is required',
genreError: 'Genre is required',
titleError: 'Your track must have a name.',
artworkError: 'Artwork is required.',
genreError: 'Genre is required.',
multiTrackCount: (index: number, total: number) =>
`TRACK ${index} of ${total}`,
prev: 'Prev',
Expand Down
12 changes: 6 additions & 6 deletions packages/web/src/pages/upload-page/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import {
import { z } from 'zod'

const messages = {
invalidReleaseDateError: 'Release date should not be in the future',
artworkRequiredError: 'Artwork is required',
genreRequiredError: 'Genre is required',
invalidReleaseDateError: 'Release date should not be in the future.',
artworkRequiredError: 'Artwork is required.',
genreRequiredError: 'Genre is required.',
track: {
titleRequiredError: 'Your track must have a name'
titleRequiredError: 'Your track must have a name.'
},
playlist: {
nameRequiredError: 'Your playlist must have a name'
nameRequiredError: 'Your playlist must have a name.'
},
album: {
nameRequiredError: 'Your album must have a name'
nameRequiredError: 'Your album must have a name.'
}
}

Expand Down

0 comments on commit f8dcd92

Please sign in to comment.