From 5a24d6c570c98598671aa76e0a16b9d4b41a7d16 Mon Sep 17 00:00:00 2001 From: Franco Montenegro Date: Mon, 28 Mar 2022 15:18:03 -0300 Subject: [PATCH] Allow renaming collection in view playlist page. --- ui/component/collectionActions/view.jsx | 13 +++++ ui/component/collectionMenuList/view.jsx | 17 +----- ui/component/collectionPreviewTile/index.js | 3 +- ui/component/collectionPreviewTile/view.jsx | 60 +++----------------- ui/constants/action_types.js | 1 - ui/page/collection/index.js | 1 + ui/page/collection/view.jsx | 63 ++++++++++++++++++--- ui/redux/actions/collections.js | 8 --- ui/redux/reducers/collections.js | 13 ----- 9 files changed, 77 insertions(+), 102 deletions(-) diff --git a/ui/component/collectionActions/view.jsx b/ui/component/collectionActions/view.jsx index 1322a7002..ce125a871 100644 --- a/ui/component/collectionActions/view.jsx +++ b/ui/component/collectionActions/view.jsx @@ -29,6 +29,7 @@ type Props = { doToggleShuffleList: (string, boolean) => void, playNextUri: string, firstItem: string, + onRenameCollection: () => void, }; function CollectionActions(props: Props) { @@ -48,6 +49,7 @@ function CollectionActions(props: Props) { firstItem, showEdit, setShowEdit, + onRenameCollection, } = props; const [doShuffle, setDoShuffle] = React.useState(false); const { push } = useHistory(); @@ -120,6 +122,17 @@ function CollectionActions(props: Props) { {!isBuiltin && (isMyCollection ? ( <> + {!uri && ( +