-
+
+
{
- this.state.playlistThumbnail &&
-

+ React.createElement(this.steps[this.state.currentStep].crender, {
+ playlist: this.state.playlistData,
-
{
- this.setState({
- playlistThumbnail: null
- })
- }}
- icon={}
- shape="round"
- >
- Remove Cover
-
-
- }
+ trackList: this.state.trackList,
+ fileList: this.state.fileList,
- {
- !this.state.playlistThumbnail &&
{
- this.setState({
- playlistThumbnail: file.url
- })
- }}
- multiple={false}
- accept="image/*"
- >
- Upload cover
-
+ onTitleChange: (title) => {
+ this.updatePlaylistData("title", title)
+ },
+ onDescriptionChange: (description) => {
+ this.updatePlaylistData("description", description)
+ },
+ onPlaylistCoverChange: (url) => {
+ this.updatePlaylistData("thumbnail", url)
+ },
+ onVisibilityChange: (visibility) => {
+ this.updatePlaylistData("visibility", visibility)
+ },
+ onDeletePlaylist: this.handleDeletePlaylist,
+
+ handleUploadTrack: this.handleUploadTrack,
+ handleTrackDragEnd: this.handleTrackDragEnd,
+ handleTrackRemove: this.handleTrackRemove,
+ handleTrackInfoChange: this.handleTrackInfoChange,
+ onTrackUploaderChange: this.onTrackUploaderChange,
+ })
}
-
-
- {
- this.state.fileList.length === 0 ?
- : }>
- Upload files
-
- }
-
-
-
-
- {(provided, snapshot) => (
-
- {
- this.state.trackList.map((track, index) => {
- return {
- return this.handleTrackCoverChange(track.uid)
- }}
- onTitleChange={(event) => {
- return this.handleTrackTitleOnChange(event, track.uid)
- }}
- onClickRemove={() => {
- return this.removeTrack(track.uid)
- }}
- />
- })
- }
- {provided.placeholder}
-
- )}
-
-
-
-
-
- {
- this.state.pendingUploads.length !== 0 &&
-
-
-
- {this.state.pendingUploads.length} file(s) are being uploaded
-
-
-
- }
-
-
-
+
}
- loading={this.state.loading}
- onClick={this.handleSubmit}
+ onClick={this.previousStep}
+ disabled={this.state.currentStep === 0}
>
- Publish
+ Previous
- {
- this.props.playlist_id &&
- Delete Playlist
-
- }
-
-
-
-
- Uploading files that are not permitted by our app.setLocation("/terms")}>Terms of Service may result in your account being suspended.
-
+
+ {
+ this.state.currentStep === this.steps.length - 1 ? "Finish" : "Next"
+ }
+
}
diff --git a/packages/app/src/pages/music/creator/index.less b/packages/app/src/pages/music/creator/index.less
index 6d40cdbd..e707d596 100755
--- a/packages/app/src/pages/music/creator/index.less
+++ b/packages/app/src/pages/music/creator/index.less
@@ -1,14 +1,68 @@
.playlistCreator {
+ position: relative;
+
display: flex;
flex-direction: column;
align-items: center;
- justify-content: center;
+ //justify-content: center;
- width: 100%;
+ width: 50vw;
+ height: 100%;
+
+ min-width: 800px;
transition: all 0.3s ease-in-out;
-
+
+ .stepContent {
+ display: flex;
+ flex-direction: column;
+
+ width: 100%;
+ height: 100%;
+
+ padding: 20px 0;
+ }
+
+ .stepActions {
+ position: sticky;
+
+ bottom: 0;
+ right: 0;
+
+ display: flex;
+ flex-direction: row;
+
+ align-items: center;
+ //justify-content: flex-end;
+
+ width: 100%;
+ padding: 20px;
+
+ gap: 10px;
+
+ background-color: var(--background-color-accent);
+ border-radius: 12px;
+ }
+
+ .playlistCreator_layout_row {
+ display: flex;
+ flex-direction: row;
+
+ width: 100%;
+
+ gap: 20px;
+
+ .playlistCreator_layout_column {
+ display: flex;
+ flex-direction: column;
+
+ width: 100%;
+
+ gap: 20px;
+ }
+ }
+
.actions {
display: flex;
flex-direction: row;
@@ -19,256 +73,80 @@
gap: 20px;
}
- .inputField {
+ .field {
display: inline-flex;
- flex-direction: row;
+ flex-direction: column;
align-self: start;
- align-items: center;
- justify-content: flex-start;
width: 100%;
margin-bottom: 20px;
- font-size: 2rem;
+ gap: 10px;
color: var(--text-color);
- h1,
- h2,
- h3,
- h4,
- h5,
- h6,
- p,
- span {
- color: var(--text-color);
+ .field_header {
+ font-size: 1rem;
}
.inputText {
width: 100%;
- color: var(--text-color);
- }
- .coverUploader {
- width: 100px;
- }
+ background-color: transparent;
- .coverPreview {
- height: 5vh;
+ outline: 1px solid var(--border-color);
+ }
+ }
+
+ .coverPreview {
+ display: flex;
+ flex-direction: column;
+
+ gap: 10px;
+
+ .coverPreview_preview {
+ align-self: center;
+
+ width: 15vw;
+ height: 15vw;
+
+ max-width: 300px;
+ max-height: 300px;
img {
- height: 100%;
- border-radius: 10px;
- margin-right: 10px;
- }
+ width: 15vw;
+ height: 15vw;
- svg {
- margin: 0 !important;
+ max-width: 300px;
+ max-height: 300px;
+
+ border-radius: 12px;
+
+ object-fit: cover;
}
}
- }
- .files {
- display: flex;
- flex-direction: column;
-
- align-items: center;
- justify-content: center;
-
- border: 1px solid var(--border-color);
- border-radius: 8px;
-
- width: 100%;
- height: 100%;
-
- padding: 10px;
- margin-bottom: 20px;
-
- .ant-upload {
+ .coverPreview_actions {
display: flex;
- flex-direction: column;
+ flex-direction: row;
align-items: center;
- justify-content: center;
+
+ gap: 10px;
width: 100%;
}
- .ant-upload-wrapper {
- margin-bottom: 10px;
- }
-
- .fileList {
- position: relative;
-
- display: flex;
- flex-direction: column;
- width: 100%;
-
- .fileListItem {
- position: relative;
-
- display: inline-flex;
- flex-direction: row;
-
- align-items: center;
-
- padding: 10px;
-
- border-radius: 8px;
-
- background-color: var(--background-color-accent);
-
- border: 1px solid var(--border-color);
-
- margin-bottom: 10px;
-
- &:last-child {
- margin-bottom: 0;
- }
-
- &.uploading {
- .fileListItem_cover {
- img {
- filter: blur(3px);
- }
-
- pointer-events: none;
- }
- }
-
- .fileListItem_loadingIcon {
- position: absolute;
- top: 0;
- right: 0;
-
- padding: 10px;
-
- svg {
- margin: 0 !important;
- }
- }
-
- .ant-btn {
- svg {
- margin: 0 !important;
- }
- }
-
- .fileListItem_title_label {
- display: inline-flex;
- flex-direction: row;
-
- align-items: center;
- }
-
- .fileListItem_cover {
- display: flex;
- flex-direction: column;
-
- align-items: center;
- justify-content: center;
-
- cursor: pointer;
-
- img {
- width: 100px;
- height: 100px;
- object-fit: cover;
- border-radius: 12px;
- }
-
- .fileListItem_cover_mask {
- opacity: 0;
- backdrop-filter: blur(3px);
- }
-
- &:hover {
- .fileListItem_cover_mask {
- opacity: 1;
- }
- }
- }
-
- .fileListItem_details {
- display: flex;
- flex-direction: column;
-
- align-items: flex-start;
- justify-content: center;
-
- margin-left: 10px;
-
- width: 100%;
-
- .fileListItem_title {
- width: 100%;
-
- .ant-input {
- width: 100%;
- }
- }
- }
-
- .fileListItem_actions {
- display: flex;
- flex-direction: row;
-
- align-items: center;
- justify-content: center;
-
- margin-top: 20px;
-
- margin-left: 10px;
-
- .ant-btn {
- svg {
- margin: 0 !important;
- }
-
- margin-right: 10px;
-
- &:last-child {
- margin-right: 0;
- }
- }
- }
- }
-
- .fileListItem_dragHandle {
- svg {
- font-size: 1.5rem;
- margin: 0 !important;
- }
- }
- }
-
- }
-
- .uploadHint {
- display: flex;
- flex-direction: column;
-
- align-self: center;
- align-items: center;
- justify-content: center;
-
- width: 100%;
- height: 100%;
-
svg {
- font-size: 3rem;
- }
-
- h3 {
- font-size: 1.5rem;
+ margin: 0 !important;
}
}
- .footer {
- position: relative;
- padding: 10px;
+ .ant-steps-icon {
+ svg {
+ margin: 0 !important;
+ }
}
}
\ No newline at end of file