diff --git a/src/components/LibraryMenuItems.tsx b/src/components/LibraryMenuItems.tsx index a1c18355..4ed58720 100644 --- a/src/components/LibraryMenuItems.tsx +++ b/src/components/LibraryMenuItems.tsx @@ -172,7 +172,7 @@ const LibraryMenuItems = ({ )} - {itemsSelected && !isPublished && ( + {itemsSelected && ( libraryItems.find((item) => item.id === id)?.status === "published", - ); const [lastSelectedItem, setLastSelectedItem] = useState< LibraryItem["id"] | null diff --git a/src/components/PublishLibrary.scss b/src/components/PublishLibrary.scss index 400e156d..7063b788 100644 --- a/src/components/PublishLibrary.scss +++ b/src/components/PublishLibrary.scss @@ -82,6 +82,10 @@ } } + &-warning { + color: $oc-red-6; + } + &-note { padding: 1em; font-style: italic; diff --git a/src/components/PublishLibrary.tsx b/src/components/PublishLibrary.tsx index adcc90a4..37543b6b 100644 --- a/src/components/PublishLibrary.tsx +++ b/src/components/PublishLibrary.tsx @@ -295,6 +295,11 @@ const PublishLibrary = ({ }, [clonedLibItems, onClose, updateItemsInStorage, libraryData]); const shouldRenderForm = !!libraryItems.length; + + const containsPublishedItems = libraryItems.some( + (item) => item.status === "published", + ); + return ( {t("publishDialog.noteItems")} + {containsPublishedItems && ( + + {t("publishDialog.republishWarning")} + + )} {renderLibraryItems()}