Просмотр исходного кода

Merge branch 'feat/rich-attachment' into feat/86710-121390-show-user-picture-tooltip

ryoji-s 2 лет назад
Родитель
Сommit
994fd6a95c

+ 52 - 46
CHANGELOG.md

@@ -6,60 +6,66 @@
 
 
 ## [v6.1.0](https://github.com/weseek/growi/compare/v6.0.15...v6.1.0) - 2023-05-17
 ## [v6.1.0](https://github.com/weseek/growi/compare/v6.0.15...v6.1.0) - 2023-05-17
 
 
+### BREAKING CHANGES
+
+* Node.js v14 is no longer supported.
+* Elasticsearch v6 is no longer supported.
+* imprv: Omit clobber prefix (#7627) @yuki-takei
+* support: Omit textlint (#7578) @yuki-takei
+* support: Remove Blockdiag codes (#7576) @yuki-takei
+
+See the upgrading guide for v6.1.x. => [English](https://docs.growi.org/en/admin-guide/upgrading/61x.html) / [Japanese](https://docs.growi.org/ja/admin-guide/upgrading/61x.html)
+
 ### 💎 Features
 ### 💎 Features
 
 
-- feat: Add read-only user feature (#7648) @jam411
-- feat: Support Mermaid (move into the feature dierctory) (#7647) @miya
-- feat: Fix APP_SITE_URL with an environment variable (#7646) @yuki-takei
-- feat: Support Mermaid (#7645) @miya
-- feat: Support Elasticsearch v8 (#7623) @miya
-- feat: Elasticsearchv8 module (#7623) @miya
-- feat: Bookmarks folder and sidebar menu (#7450) @mudana-grune
-- feat: GROWI Questionnaire (#7316) @hakumizuki
-- feat: Revive attachment-refs with remark (#7597) @arafubeatbox
+* feat: Add read-only user feature (#7648) @jam411
+* feat: Support Mermaid (move into the feature dierctory) (#7647) @miya
+* feat: Fix APP\_SITE\_URL with an environment variable (#7646) @yuki-takei
+* feat: Support Mermaid (#7645) @miya
+* feat: Support Elasticsearch v8 (#7623) @miya
+* feat: Elasticsearchv8 module (#7623) @miya
+* feat: Bookmarks folder and sidebar menu (#7450) @mudana-grune
+* feat: GROWI Questionnaire (#7316) @hakumizuki
+* feat: Revive attachment-refs with remark (#7597) @arafubeatbox
 
 
 ### 🚀 Improvement
 ### 🚀 Improvement
 
 
-- imprv: Font size (#7663) @yuki-takei
-- imprv: Admin user can use `reset-password` without email settings (#7650) @jam411
-- imprv: Optimize fonts with next/font (#7633) @yuki-takei
-- imprv: GFM table performance 2 (#7640) @yuki-takei
-- imprv: GFM footnote styles (#7628) @yuki-takei
-- imprv: Omit clobber prefix (#7627) @yuki-takei
-- imprv: GFM table performance (#7619) @yuki-takei
-- imprv: Show unsaved warning when comment not posted (#7603) @arafubeatbox
-- imprv: Suppress UI Flickering for dropdowns (#7608) @jam411
-- imprv: Allow registering without GROWI email settings for ID/Password authentication's restricted registration (#7591) @jam411
-- imprv: Enable browsing video (for v6.1.0) (#7589) @yuki-takei
-- imprv: Show a spinner into the save button while the saving process (#7579) @yuki-takei
-- imprv: Inject PlantUML URI with config-loader (#7577) @yuki-takei
-- imprv: Loading draw.io (diagrams.net) resources (#7575) @yuki-takei
-
-### 🐛 Bug Fixes
-
-- fix: The environment variable for disabling link sharing (#7652) @yuki-takei
-- fix: Cursor resetting occurs after updating with the built-in editor (#7644) @yuki-takei
-- fix: Revision schema migration for v5 to v6 (#7637) @yuki-takei
-- fix: Editor not resetting when the same markdown (#7625) @arafubeatbox
-- support: Replaced by IAttachmentHasId (#7629) @reiji-h
-- fix: AlignRight DropdownMenu flickering (#7606) @mudana-grune
-- fix: Not display page list count badge in trash page (#7600) @yukendev
-- fix: Reverted descendant pages do not appear in search results (#7587) @miya
-- fix: Deleted descendant pages do not appear in search results (#7583) @miya
-- fix: Show lsx page list in trash page correctly (#7582) @yukendev
-- fix: Uncaught type error by `sticky-event` (#7566) @mudana-grune
+* imprv: Font size (#7663) @yuki-takei
+* imprv: Admin user can use `reset-password` without email settings (#7650) @jam411
+* imprv: Optimize fonts with next/font (#7633) @yuki-takei
+* imprv: GFM table performance 2 (#7640) @yuki-takei
+* imprv: GFM footnote styles (#7628) @yuki-takei
+* imprv: GFM table performance (#7619) @yuki-takei
+* imprv: Show unsaved warning when comment not posted (#7603) @arafubeatbox
+* imprv: Suppress UI Flickering for dropdowns (#7608) @jam411
+* imprv: Allow registering without GROWI email settings for ID/Password authentication's restricted registration (#7591) @jam411
+* imprv: Enable browsing video (for v6.1.0) (#7589) @yuki-takei
+* imprv: Show a spinner into the save button while the saving process (#7579) @yuki-takei
+* imprv: Inject PlantUML URI with config-loader (#7577) @yuki-takei
+* imprv: Loading draw.io (diagrams.net) resources (#7575) @yuki-takei
+
+### 🐛 Bug Fixes
+
+* fix: The environment variable for disabling link sharing (#7652) @yuki-takei
+* fix: Cursor resetting occurs after updating with the built-in editor (#7644) @yuki-takei
+* fix: Revision schema migration for v5 to v6 (#7637) @yuki-takei
+* fix: Editor not resetting when the same markdown (#7625) @arafubeatbox
+* fix: AlignRight DropdownMenu flickering (#7606) @mudana-grune
+* fix: Not display page list count badge in trash page (#7600) @yukendev
+* fix: Reverted descendant pages do not appear in search results (#7587) @miya
+* fix: Deleted descendant pages do not appear in search results (#7583) @miya
+* fix: Show lsx page list in trash page correctly (#7582) @yukendev
+* fix: Uncaught type error by `sticky-event` (#7566) @mudana-grune
 
 
 ### 🧰 Maintenance
 ### 🧰 Maintenance
 
 
-- support: mongoose update (#7659) @jam411
-- support: Elasticsearch8 (#7592) @miya
-- support: Replaced by IAttachmentHasId (#7629) @reiji-h
-- support: Dedupe packages (#7590) @yuki-takei
-- support: Omit textlint (#7578) @yuki-takei
-- support: Typescriptize CustomNav (#7584) @yuki-takei
-- support: Replaced by IAttachmentHasId (#7629) @reiji-h
-- support: Remove Blockdiag codes (#7576) @yuki-takei
-- support: Migrate to Turborepo (#7417) @yuki-takei
+* support: mongoose update (#7659) @jam411
+* support: Elasticsearch8 (#7592) @miya
+* support: Replaced by IAttachmentHasId (#7629) @reiji-h
+* support: Dedupe packages (#7590) @yuki-takei
+* support: Typescriptize CustomNav (#7584) @yuki-takei
+* support: Replaced by IAttachmentHasId (#7629) @reiji-h
+* support: Migrate to Turborepo (#7417) @yuki-takei
 
 
 ## [v6.0.15](https://github.com/weseek/growi/compare/v6.0.14...v6.0.15) - 2023-04-10
 ## [v6.0.15](https://github.com/weseek/growi/compare/v6.0.14...v6.0.15) - 2023-04-10
 
 

+ 1 - 4
apps/app/src/components/Bookmarks/BookmarkFolderMenu.tsx

@@ -88,9 +88,6 @@ export const BookmarkFolderMenu: React.FC<{children?: React.ReactNode}> = ({ chi
     setSelectedItem(itemId);
     setSelectedItem(itemId);
 
 
     try {
     try {
-      if (isBookmarked) {
-        await toggleBookmarkHandler();
-      }
       if (currentPage != null) {
       if (currentPage != null) {
         await addBookmarkToFolder(currentPage._id, itemId === 'root' ? null : itemId);
         await addBookmarkToFolder(currentPage._id, itemId === 'root' ? null : itemId);
       }
       }
@@ -101,7 +98,7 @@ export const BookmarkFolderMenu: React.FC<{children?: React.ReactNode}> = ({ chi
     catch (err) {
     catch (err) {
       toastError(err);
       toastError(err);
     }
     }
-  }, [mutateBookmarkFolders, isBookmarked, currentPage, mutateBookmarkInfo, mutateUserBookmarks, toggleBookmarkHandler]);
+  }, [mutateBookmarkFolders, currentPage, mutateBookmarkInfo, mutateUserBookmarks]);
 
 
   const renderBookmarkMenuItem = () => {
   const renderBookmarkMenuItem = () => {
     return (
     return (

+ 1 - 1
apps/app/src/server/models/bookmark-folder.ts

@@ -215,7 +215,7 @@ bookmarkFolderSchema.statics.updateBookmark = async function(pageId: Types.Objec
 Promise<BookmarkFolderDocument | null> {
 Promise<BookmarkFolderDocument | null> {
   // If isBookmarked
   // If isBookmarked
   if (status) {
   if (status) {
-    const bookmarkedPage = await Bookmark.findOne({ page: pageId });
+    const bookmarkedPage = await Bookmark.findOne({ page: pageId, user: userId });
     const bookmarkFolder = await this.findOne({ owner: userId, bookmarks: { $in: [bookmarkedPage?._id] } });
     const bookmarkFolder = await this.findOne({ owner: userId, bookmarks: { $in: [bookmarkedPage?._id] } });
     if (bookmarkFolder != null) {
     if (bookmarkFolder != null) {
       await this.updateOne({ owner: userId, _id: bookmarkFolder._id }, { $pull: { bookmarks:  bookmarkedPage?._id } });
       await this.updateOne({ owner: userId, _id: bookmarkFolder._id }, { $pull: { bookmarks:  bookmarkedPage?._id } });