Răsfoiți Sursa

Merge remote-tracking branch 'origin/master' into support/use-turborepo

Yuki Takei 3 ani în urmă
părinte
comite
30eadda381
40 a modificat fișierele cu 135 adăugiri și 96 ștergeri
  1. 21 1
      CHANGELOG.md
  2. 11 11
      apps/app/package.json
  3. 1 2
      apps/app/src/client/services/page-operation.ts
  4. 1 1
      apps/app/src/client/services/side-effects/hackmd-draft-updated.ts
  5. 1 1
      apps/app/src/client/services/side-effects/page-updated.ts
  6. 4 2
      apps/app/src/components/Navbar/GrowiContextualSubNavigation.tsx
  7. 1 1
      apps/app/src/components/Page/PageContentsUtilities.tsx
  8. 2 2
      apps/app/src/components/Page/PageView.tsx
  9. 1 2
      apps/app/src/components/PageAlert/OldRevisionAlert.tsx
  10. 1 1
      apps/app/src/components/PageAlert/PageAlerts.tsx
  11. 2 2
      apps/app/src/components/PageAttachment.tsx
  12. 10 6
      apps/app/src/components/PageEditor.tsx
  13. 2 2
      apps/app/src/components/PageEditor/ConflictDiffModal.tsx
  14. 2 2
      apps/app/src/components/PageEditorByHackmd.tsx
  15. 1 2
      apps/app/src/components/PageHistory.tsx
  16. 1 1
      apps/app/src/components/PagePathNav.tsx
  17. 2 2
      apps/app/src/components/SavePageControls.tsx
  18. 1 1
      apps/app/src/components/ShareLink/ShareLink.tsx
  19. 1 1
      apps/app/src/components/ShareLink/ShareLinkForm.tsx
  20. 1 1
      apps/app/src/components/ShareLink/ShareLinkPageView.tsx
  21. 2 4
      apps/app/src/components/Sidebar/PageTree.tsx
  22. 22 7
      apps/app/src/pages/[[...path]].page.tsx
  23. 2 1
      apps/app/src/pages/share/[[...path]].page.tsx
  24. 2 1
      apps/app/src/pages/trash.page.tsx
  25. 1 1
      apps/app/src/server/routes/login.js
  26. 2 14
      apps/app/src/stores/context.tsx
  27. 14 3
      apps/app/src/stores/page.tsx
  28. 5 3
      apps/app/src/stores/ui.tsx
  29. 2 2
      apps/slackbot-proxy/package.json
  30. 1 1
      package.json
  31. 1 1
      packages/codemirror-textlint/package.json
  32. 1 1
      packages/core/package.json
  33. 1 1
      packages/hackmd/package.json
  34. 2 2
      packages/presentation/package.json
  35. 1 1
      packages/preset-themes/package.json
  36. 1 1
      packages/remark-drawio/package.json
  37. 1 1
      packages/remark-growi-directive/package.json
  38. 4 4
      packages/remark-lsx/package.json
  39. 1 1
      packages/slack/package.json
  40. 2 2
      packages/ui/package.json

+ 21 - 1
CHANGELOG.md

@@ -1,9 +1,29 @@
 # Changelog
 
-## [Unreleased](https://github.com/weseek/growi/compare/v6.0.7...HEAD)
+## [Unreleased](https://github.com/weseek/growi/compare/v6.0.8...HEAD)
 
 *Please do not manually update this file. We've automated the process.*
 
+## [v6.0.8](https://github.com/weseek/growi/compare/v6.0.7...v6.0.8) - 2023-03-06
+
+### 💎 Features
+
+- feat: Compare all page revisions on PageAccessoriesModal History tab (#7414) @jam411
+
+### 🚀 Improvement
+
+- imprv: Save the correct page body when uploading the attachment (#7432) @miya
+- imprv: Determine page grant considering wiki mode when creating a new page by uploading attachments (#7428) @miya
+
+### 🐛 Bug Fixes
+
+- fix: Email is not sent to Admin user when the user is created at user registration restricted (#7454) @miya
+- fix: Error when trying to create a new page with attachments (#7424) @miya
+- fix: Unable to delete multiple pages (#7435) @miya
+- fix: PageDeleteModal warns even if you have delete permission (#7436) @miya
+- fix: Color of the close icon in modal header (#7419) @ayaka0417
+- fix: Behavior when conflicts occur when saving pages (#7425) @miya
+
 ## [v6.0.7](https://github.com/weseek/growi/compare/v6.0.6...v6.0.7) - 2023-02-21
 
 ### 💎 Features

+ 11 - 11
apps/app/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/app",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "license": "MIT",
   "scripts": {
     "//// for production": "",
@@ -59,14 +59,14 @@
     "@elastic/elasticsearch7": "npm:@elastic/elasticsearch@^7.17.0",
     "@godaddy/terminus": "^4.9.0",
     "@google-cloud/storage": "^5.8.5",
-    "@growi/codemirror-textlint": "^6.0.8-RC.0",
-    "@growi/core": "^6.0.8-RC.0",
-    "@growi/hackmd": "^6.0.8-RC.0",
-    "@growi/preset-themes": "^6.0.8-RC.0",
-    "@growi/remark-drawio": "^6.0.8-RC.0",
-    "@growi/remark-growi-directive": "^6.0.8-RC.0",
-    "@growi/remark-lsx": "^6.0.8-RC.0",
-    "@growi/slack": "^6.0.8-RC.0",
+    "@growi/codemirror-textlint": "^6.0.9-RC.0",
+    "@growi/core": "^6.0.9-RC.0",
+    "@growi/hackmd": "^6.0.9-RC.0",
+    "@growi/preset-themes": "^6.0.9-RC.0",
+    "@growi/remark-drawio": "^6.0.9-RC.0",
+    "@growi/remark-growi-directive": "^6.0.9-RC.0",
+    "@growi/remark-lsx": "^6.0.9-RC.0",
+    "@growi/slack": "^6.0.9-RC.0",
     "@promster/express": "^7.0.6",
     "@promster/server": "^7.0.8",
     "@slack/web-api": "^6.2.4",
@@ -195,8 +195,8 @@
     "handsontable": "v7.0.0 or above is no loger MIT lisence."
   },
   "devDependencies": {
-    "@growi/presentation": "^6.0.8-RC.0",
-    "@growi/ui": "^6.0.8-RC.0",
+    "@growi/presentation": "^6.0.9-RC.0",
+    "@growi/ui": "^6.0.9-RC.0",
     "@handsontable/react": "=2.1.0",
     "@icon/themify-icons": "1.0.1-alpha.3",
     "@next/bundle-analyzer": "^12.2.3",

+ 1 - 2
apps/app/src/client/services/page-operation.ts

@@ -4,9 +4,8 @@ import { SubscriptionStatusType, Nullable } from '@growi/core';
 import urljoin from 'url-join';
 
 import { OptionsToSave } from '~/interfaces/page-operation';
-import { useCurrentPageId } from '~/stores/context';
 import { useEditingMarkdown, useIsEnabledUnsavedWarning, usePageTagsForEditors } from '~/stores/editor';
-import { useSWRMUTxCurrentPage, useSWRxTagsInfo } from '~/stores/page';
+import { useCurrentPageId, useSWRMUTxCurrentPage, useSWRxTagsInfo } from '~/stores/page';
 import { useSetRemoteLatestPageData } from '~/stores/remote-latest-page';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
apps/app/src/client/services/side-effects/hackmd-draft-updated.ts

@@ -1,8 +1,8 @@
 import { useCallback, useEffect } from 'react';
 
 import { SocketEventName } from '~/interfaces/websocket';
-import { useCurrentPageId } from '~/stores/context';
 import { useIsHackmdDraftUpdatingInRealtime } from '~/stores/hackmd';
+import { useCurrentPageId } from '~/stores/page';
 import { useGlobalSocket } from '~/stores/websocket';
 
 export const useHackmdDraftUpdatedEffect = (): void => {

+ 1 - 1
apps/app/src/client/services/side-effects/page-updated.ts

@@ -1,7 +1,7 @@
 import { useCallback, useEffect } from 'react';
 
 import { SocketEventName } from '~/interfaces/websocket';
-import { useCurrentPageId } from '~/stores/context';
+import { useCurrentPageId } from '~/stores/page';
 import { useSetRemoteLatestPageData } from '~/stores/remote-latest-page';
 import { useGlobalSocket } from '~/stores/websocket';
 

+ 4 - 2
apps/app/src/components/Navbar/GrowiContextualSubNavigation.tsx

@@ -16,7 +16,7 @@ import {
 } from '~/interfaces/page';
 import { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
 import {
-  useCurrentPageId, useCurrentPathname, useIsNotFound,
+  useCurrentPathname,
   useCurrentUser, useIsGuestUser, useIsSharedUser, useShareLinkId, useTemplateTagData, useIsContainerFluid, useIsIdenticalPath,
 } from '~/stores/context';
 import { usePageTagsForEditors } from '~/stores/editor';
@@ -24,7 +24,9 @@ import {
   usePageAccessoriesModal, PageAccessoriesModalContents, IPageForPageDuplicateModal,
   usePageDuplicateModal, usePageRenameModal, usePageDeleteModal, usePagePresentationModal,
 } from '~/stores/modal';
-import { useSWRMUTxCurrentPage, useSWRxTagsInfo } from '~/stores/page';
+import {
+  useSWRMUTxCurrentPage, useSWRxTagsInfo, useCurrentPageId, useIsNotFound,
+} from '~/stores/page';
 import {
   EditorMode, useDrawerMode, useEditorMode, useIsAbleToShowPageManagement, useIsAbleToShowTagLabel,
   useIsAbleToChangeEditorMode, useIsAbleToShowPageAuthors,

+ 1 - 1
apps/app/src/components/Page/PageContentsUtilities.tsx

@@ -4,7 +4,7 @@ import { useUpdateStateAfterSave } from '~/client/services/page-operation';
 import { useDrawioModalLauncherForView } from '~/client/services/side-effects/drawio-modal-launcher-for-view';
 import { useHandsontableModalLauncherForView } from '~/client/services/side-effects/handsontable-modal-launcher-for-view';
 import { toastSuccess, toastError } from '~/client/util/toastr';
-import { useCurrentPageId } from '~/stores/context';
+import { useCurrentPageId } from '~/stores/page';
 
 
 export const PageContentsUtilities = (): null => {

+ 2 - 2
apps/app/src/components/Page/PageView.tsx

@@ -9,9 +9,9 @@ import dynamic from 'next/dynamic';
 import type { RendererConfig } from '~/interfaces/services/renderer';
 import { generateSSRViewOptions } from '~/services/renderer/renderer';
 import {
-  useIsForbidden, useIsIdenticalPath, useIsNotCreatable, useIsNotFound,
+  useIsForbidden, useIsIdenticalPath, useIsNotCreatable,
 } from '~/stores/context';
-import { useSWRxCurrentPage } from '~/stores/page';
+import { useSWRxCurrentPage, useIsNotFound } from '~/stores/page';
 import { useViewOptions } from '~/stores/renderer';
 import { useIsMobile } from '~/stores/ui';
 

+ 1 - 2
apps/app/src/components/PageAlert/OldRevisionAlert.tsx

@@ -4,8 +4,7 @@ import { pathUtils } from '@growi/core';
 import Link from 'next/link';
 import { useTranslation } from 'react-i18next';
 
-import { useIsLatestRevision } from '~/stores/context';
-import { useSWRxCurrentPage } from '~/stores/page';
+import { useSWRxCurrentPage, useIsLatestRevision } from '~/stores/page';
 
 export const OldRevisionAlert = (): JSX.Element => {
 

+ 1 - 1
apps/app/src/components/PageAlert/PageAlerts.tsx

@@ -2,7 +2,7 @@ import React from 'react';
 
 import dynamic from 'next/dynamic';
 
-import { useIsNotFound } from '~/stores/context';
+import { useIsNotFound } from '~/stores/page';
 
 import { OldRevisionAlert } from './OldRevisionAlert';
 import { PageGrantAlert } from './PageGrantAlert';

+ 2 - 2
apps/app/src/components/PageAttachment.tsx

@@ -5,8 +5,8 @@ import React, {
 import { HasObjectId, IAttachment } from '@growi/core';
 
 import { useSWRxAttachments } from '~/stores/attachment';
-import { useCurrentPageId, useIsGuestUser } from '~/stores/context';
-import { useSWRxCurrentPage } from '~/stores/page';
+import { useIsGuestUser } from '~/stores/context';
+import { useSWRxCurrentPage, useCurrentPageId } from '~/stores/page';
 
 import { DeleteAttachmentModal } from './PageAttachment/DeleteAttachmentModal';
 import { PageAttachmentList } from './PageAttachment/PageAttachmentList';

+ 10 - 6
apps/app/src/components/PageEditor.tsx

@@ -21,8 +21,8 @@ import { IEditorMethods } from '~/interfaces/editor-methods';
 import { OptionsToSave } from '~/interfaces/page-operation';
 import { SocketEventName } from '~/interfaces/websocket';
 import {
-  useCurrentPathname, useCurrentPageId, useIsEnabledAttachTitleHeader, useTemplateBodyData,
-  useIsEditable, useIsUploadableFile, useIsUploadableImage, useIsNotFound, useIsIndentSizeForced,
+  useCurrentPathname, useIsEnabledAttachTitleHeader, useTemplateBodyData,
+  useIsEditable, useIsUploadableFile, useIsUploadableImage, useIsIndentSizeForced,
 } from '~/stores/context';
 import {
   useCurrentIndentSize, useIsSlackEnabled, useIsTextlintEnabled, usePageTagsForEditors,
@@ -32,7 +32,7 @@ import {
 } from '~/stores/editor';
 import { useConflictDiffModal } from '~/stores/modal';
 import {
-  useCurrentPagePath, useSWRMUTxCurrentPage, useSWRxCurrentPage, useSWRxTagsInfo,
+  useCurrentPagePath, useSWRMUTxCurrentPage, useSWRxCurrentPage, useSWRxTagsInfo, useCurrentPageId, useIsNotFound, useIsLatestRevision,
 } from '~/stores/page';
 import { mutatePageTree } from '~/stores/page-listing';
 import {
@@ -76,8 +76,8 @@ const PageEditor = React.memo((): JSX.Element => {
   const { t } = useTranslation();
   const router = useRouter();
 
-  const { data: isNotFound } = useIsNotFound();
-  const { data: pageId } = useCurrentPageId();
+  const { data: isNotFound, mutate: mutateIsNotFound } = useIsNotFound();
+  const { data: pageId, mutate: mutateCurrentPageId } = useCurrentPageId();
   const { data: currentPagePath } = useCurrentPagePath();
   const { data: currentPathname } = useCurrentPathname();
   const { data: currentPage } = useSWRxCurrentPage();
@@ -97,6 +97,7 @@ const PageEditor = React.memo((): JSX.Element => {
   const { data: isUploadableFile } = useIsUploadableFile();
   const { data: isUploadableImage } = useIsUploadableImage();
   const { data: conflictDiffModalStatus, close: closeConflictDiffModal } = useConflictDiffModal();
+  const { mutate: mutateIsLatestRevision } = useIsLatestRevision();
   const { mutate: mutateRemotePageId } = useRemoteRevisionId();
   const { mutate: mutateRemoteRevisionId } = useRemoteRevisionBody();
   const { mutate: mutateRemoteRevisionLastUpdatedAt } = useRemoteRevisionLastUpdatedAt();
@@ -318,6 +319,9 @@ const PageEditor = React.memo((): JSX.Element => {
         logger.info('Page is created', res.page._id);
         globalEmitter.emit('resetInitializedHackMdStatus');
         mutateGrant(res.page.grant);
+        mutateIsLatestRevision(true);
+        await mutateCurrentPageId(res.page._id);
+        await mutateCurrentPage();
       }
     }
     catch (e) {
@@ -327,7 +331,7 @@ const PageEditor = React.memo((): JSX.Element => {
     finally {
       editorRef.current.terminateUploadingState();
     }
-  }, [currentPagePath, mutateGrant, pageId]);
+  }, [currentPagePath, mutateCurrentPage, mutateCurrentPageId, mutateGrant, mutateIsLatestRevision, mutateIsNotFound, pageId]);
 
 
   const scrollPreviewByEditorLine = useCallback((line: number) => {

+ 2 - 2
apps/app/src/components/PageEditor/ConflictDiffModal.tsx

@@ -13,8 +13,8 @@ import {
 import { useSaveOrUpdate } from '~/client/services/page-operation';
 import { toastError, toastSuccess } from '~/client/util/toastr';
 import { OptionsToSave } from '~/interfaces/page-operation';
-import { useCurrentPageId, useCurrentPathname, useCurrentUser } from '~/stores/context';
-import { useCurrentPagePath, useSWRxCurrentPage } from '~/stores/page';
+import { useCurrentPathname, useCurrentUser } from '~/stores/context';
+import { useCurrentPagePath, useSWRxCurrentPage, useCurrentPageId } from '~/stores/page';
 import {
   useRemoteRevisionBody, useRemoteRevisionId, useRemoteRevisionLastUpdatedAt, useRemoteRevisionLastUpdateUser, useSetRemoteLatestPageData,
 } from '~/stores/remote-latest-page';

+ 2 - 2
apps/app/src/components/PageEditorByHackmd.tsx

@@ -16,7 +16,7 @@ import { apiPost } from '~/client/util/apiv1-client';
 import { IResHackmdIntegrated, IResHackmdDiscard } from '~/interfaces/hackmd';
 import { OptionsToSave } from '~/interfaces/page-operation';
 import {
-  useCurrentPageId, useCurrentPathname, useHackmdUri, useIsNotFound,
+  useCurrentPathname, useHackmdUri,
 } from '~/stores/context';
 import {
   useIsSlackEnabled, usePageTagsForEditors, useIsEnabledUnsavedWarning,
@@ -25,7 +25,7 @@ import {
   usePageIdOnHackmd, useHasDraftOnHackmd, useRevisionIdHackmdSynced, useIsHackmdDraftUpdatingInRealtime,
 } from '~/stores/hackmd';
 import {
-  useCurrentPagePath, useSWRMUTxCurrentPage, useSWRxCurrentPage, useSWRxTagsInfo,
+  useCurrentPagePath, useSWRMUTxCurrentPage, useSWRxCurrentPage, useSWRxTagsInfo, useCurrentPageId, useIsNotFound,
 } from '~/stores/page';
 import { mutatePageTree } from '~/stores/page-listing';
 import { useRemoteRevisionId } from '~/stores/remote-latest-page';

+ 1 - 2
apps/app/src/components/PageHistory.tsx

@@ -1,7 +1,6 @@
 import React from 'react';
 
-import { useCurrentPageId } from '~/stores/context';
-import { useCurrentPagePath } from '~/stores/page';
+import { useCurrentPagePath, useCurrentPageId } from '~/stores/page';
 import loggerFactory from '~/utils/logger';
 
 import { PageRevisionTable } from './PageHistory/PageRevisionTable';

+ 1 - 1
apps/app/src/components/PagePathNav.tsx

@@ -3,7 +3,7 @@ import React, { FC } from 'react';
 import { DevidedPagePath, pagePathUtils } from '@growi/core';
 import dynamic from 'next/dynamic';
 
-import { useIsNotFound } from '~/stores/context';
+import { useIsNotFound } from '~/stores/page';
 
 import LinkedPagePath from '../models/linked-page-path';
 

+ 2 - 2
apps/app/src/components/SavePageControls.tsx

@@ -11,9 +11,9 @@ import {
 
 import { IPageGrantData } from '~/interfaces/page';
 import {
-  useIsEditable, useCurrentPageId, useIsAclEnabled,
+  useIsEditable, useIsAclEnabled,
 } from '~/stores/context';
-import { useCurrentPagePath } from '~/stores/page';
+import { useCurrentPagePath, useCurrentPageId } from '~/stores/page';
 import { useSelectedGrant } from '~/stores/ui';
 import loggerFactory from '~/utils/logger';
 

+ 1 - 1
apps/app/src/components/ShareLink/ShareLink.tsx

@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
 
 import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Delete } from '~/client/util/apiv3-client';
-import { useCurrentPageId } from '~/stores/context';
+import { useCurrentPageId } from '~/stores/page';
 import { useSWRxSharelink } from '~/stores/share-link';
 
 import { ShareLinkForm } from './ShareLinkForm';

+ 1 - 1
apps/app/src/components/ShareLink/ShareLinkForm.tsx

@@ -8,7 +8,7 @@ import { useTranslation } from 'next-i18next';
 
 import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { apiv3Post } from '~/client/util/apiv3-client';
-import { useCurrentPageId } from '~/stores/context';
+import { useCurrentPageId } from '~/stores/page';
 
 
 const ExpirationType = {

+ 1 - 1
apps/app/src/components/ShareLink/ShareLinkPageView.tsx

@@ -6,7 +6,7 @@ import dynamic from 'next/dynamic';
 import type { RendererConfig } from '~/interfaces/services/renderer';
 import type { IShareLinkHasId } from '~/interfaces/share-link';
 import { generateSSRViewOptions } from '~/services/renderer/renderer';
-import { useIsNotFound } from '~/stores/context';
+import { useIsNotFound } from '~/stores/page';
 import { useViewOptions } from '~/stores/renderer';
 import loggerFactory from '~/utils/logger';
 

+ 2 - 4
apps/app/src/components/Sidebar/PageTree.tsx

@@ -2,10 +2,8 @@ import React, { FC, memo } from 'react';
 
 import { useTranslation } from 'next-i18next';
 
-import {
-  useCurrentPageId, useTargetAndAncestors, useIsGuestUser,
-} from '~/stores/context';
-import { useCurrentPagePath } from '~/stores/page';
+import { useTargetAndAncestors, useIsGuestUser } from '~/stores/context';
+import { useCurrentPagePath, useCurrentPageId } from '~/stores/page';
 import { useSWRxV5MigrationStatus } from '~/stores/page-listing';
 
 import ItemsTree from './PageTree/ItemsTree';

+ 22 - 7
apps/app/src/pages/[[...path]].page.tsx

@@ -30,19 +30,20 @@ import type { PageModel, PageDocument } from '~/server/models/page';
 import type { PageRedirectModel } from '~/server/models/page-redirect';
 import {
   useCurrentUser,
-  useIsLatestRevision,
-  useIsForbidden, useIsNotFound, useIsSharedUser,
+  useIsForbidden, useIsSharedUser,
   useIsEnabledStaleNotification, useIsIdenticalPath,
   useIsSearchServiceConfigured, useIsSearchServiceReachable, useDisableLinkSharing,
   useDrawioUri, useHackmdUri, useDefaultIndentSize, useIsIndentSizeForced,
   useIsAclEnabled, useIsSearchPage, useTemplateTagData, useTemplateBodyData, useIsEnabledAttachTitleHeader,
-  useCsrfToken, useIsSearchScopeChildrenAsDefault, useCurrentPageId, useCurrentPathname,
+  useCsrfToken, useIsSearchScopeChildrenAsDefault, useCurrentPathname,
   useIsSlackConfigured, useRendererConfig,
   useEditorConfig, useIsAllReplyShown, useIsUploadableFile, useIsUploadableImage, useIsContainerFluid, useIsNotCreatable,
 } from '~/stores/context';
 import { useEditingMarkdown } from '~/stores/editor';
 import { useHasDraftOnHackmd, usePageIdOnHackmd, useRevisionIdHackmdSynced } from '~/stores/hackmd';
-import { useSWRxCurrentPage, useSWRxIsGrantNormalized } from '~/stores/page';
+import {
+  useSWRxCurrentPage, useSWRxIsGrantNormalized, useCurrentPageId, useIsNotFound, useIsLatestRevision,
+} from '~/stores/page';
 import { useRedirectFrom } from '~/stores/page-redirect';
 import { useRemoteRevisionId } from '~/stores/remote-latest-page';
 import { useSelectedGrant } from '~/stores/ui';
@@ -190,11 +191,9 @@ const Page: NextPageWithLayout<Props> = (props: Props) => {
   useCsrfToken(props.csrfToken);
 
   // page
-  useIsLatestRevision(props.isLatestRevision);
   useIsContainerFluid(props.isContainerFluid);
   // useOwnerOfCurrentPage(props.pageUser != null ? JSON.parse(props.pageUser) : null);
   useIsForbidden(props.isForbidden);
-  useIsNotFound(props.isNotFound);
   useIsNotCreatable(props.isNotCreatable);
   useRedirectFrom(props.redirectFrom ?? null);
   useIsSharedUser(false); // this page cann't be routed for '/share'
@@ -234,14 +233,18 @@ const Page: NextPageWithLayout<Props> = (props: Props) => {
   const pagePath = pageWithMeta?.data.path ?? props.currentPathname;
   const revisionBody = pageWithMeta?.data.revision?.body;
 
-  useCurrentPageId(pageId ?? null);
   usePageIdOnHackmd(pageWithMeta?.data.pageIdOnHackmd);
   useHasDraftOnHackmd(pageWithMeta?.data.hasDraftOnHackmd ?? false);
   useCurrentPathname(props.currentPathname);
 
   useSWRxCurrentPage(pageWithMeta?.data ?? null); // store initial data
 
+  const { mutate: mutateIsNotFound } = useIsNotFound();
+
+  const { mutate: mutateCurrentPageId } = useCurrentPageId();
+
   const { mutate: mutateEditingMarkdown } = useEditingMarkdown();
+  const { mutate: mutateIsLatestRevision } = useIsLatestRevision();
 
   const { data: grantData } = useSWRxIsGrantNormalized(pageId);
   const { mutate: mutateSelectedGrant } = useSelectedGrant();
@@ -286,6 +289,18 @@ const Page: NextPageWithLayout<Props> = (props: Props) => {
     mutateRevisionIdHackmdSynced(pageWithMeta?.data.revisionHackmdSynced);
   }, [mutateRemoteRevisionId, mutateRevisionIdHackmdSynced, pageWithMeta?.data.revision?._id, pageWithMeta?.data.revisionHackmdSynced]);
 
+  useEffect(() => {
+    mutateCurrentPageId(pageId ?? null);
+  }, [mutateCurrentPageId, pageId]);
+
+  useEffect(() => {
+    mutateIsNotFound(props.isNotFound);
+  }, [mutateIsNotFound, props.isNotFound]);
+
+  useEffect(() => {
+    mutateIsLatestRevision(props.isLatestRevision);
+  }, [mutateIsLatestRevision, props.isLatestRevision]);
+
   const title = generateCustomTitleForPage(props, pagePath);
 
   return (

+ 2 - 1
apps/app/src/pages/share/[[...path]].page.tsx

@@ -19,9 +19,10 @@ import type { RendererConfig } from '~/interfaces/services/renderer';
 import type { IShareLinkHasId } from '~/interfaces/share-link';
 import type { PageDocument } from '~/server/models/page';
 import {
-  useCurrentUser, useCurrentPageId, useRendererConfig, useIsSearchPage, useCurrentPathname, useIsNotFound,
+  useCurrentUser, useRendererConfig, useIsSearchPage, useCurrentPathname,
   useShareLinkId, useIsSearchServiceConfigured, useIsSearchServiceReachable, useIsSearchScopeChildrenAsDefault, useDrawioUri, useIsContainerFluid,
 } from '~/stores/context';
+import { useCurrentPageId, useIsNotFound } from '~/stores/page';
 import loggerFactory from '~/utils/logger';
 
 import type { NextPageWithLayout } from '../_app.page';

+ 2 - 1
apps/app/src/pages/trash.page.tsx

@@ -9,11 +9,12 @@ import Head from 'next/head';
 import { GrowiSubNavigation } from '~/components/Navbar/GrowiSubNavigation';
 import type { CrowiRequest } from '~/interfaces/crowi-request';
 import type { RendererConfig } from '~/interfaces/services/renderer';
+import { useCurrentPageId } from '~/stores/page';
 import { useDrawerMode } from '~/stores/ui';
 
 import { BasicLayout } from '../components/Layout/BasicLayout';
 import {
-  useCurrentUser, useCurrentPageId, useCurrentPathname,
+  useCurrentUser, useCurrentPathname,
   useIsSearchServiceConfigured, useIsSearchServiceReachable,
   useIsSearchScopeChildrenAsDefault, useIsSearchPage, useShowPageLimitationXL, useIsGuestUser, useRendererConfig,
 } from '../stores/context';

+ 1 - 1
apps/app/src/server/routes/login.js

@@ -28,8 +28,8 @@ module.exports = function(crowi, app) {
         subject: `[${appTitle}:admin] A New User Created and Waiting for Activation`,
         template: path.join(crowi.localeDir, 'en_US/admin/userWaitingActivation.txt'),
         vars: {
+          adminUser: admin,
           createdUser: userData,
-          admin,
           url: appService.getSiteUrl(),
           appTitle,
         },

+ 2 - 14
apps/app/src/stores/context.tsx

@@ -1,5 +1,5 @@
-import type { ColorScheme, IUser, IUserHasId } from '@growi/core';
-import { Key, SWRResponse } from 'swr';
+import type { ColorScheme, IUserHasId } from '@growi/core';
+import { SWRResponse } from 'swr';
 import useSWRImmutable from 'swr/immutable';
 
 import { SupportedActionType } from '~/interfaces/activity';
@@ -44,10 +44,6 @@ export const useCurrentPathname = (initialData?: string): SWRResponse<string, Er
   return useContextSWR('currentPathname', initialData);
 };
 
-export const useCurrentPageId = (initialData?: Nullable<string>): SWRResponse<Nullable<string>, Error> => {
-  return useStaticSWR<Nullable<string>, Error>('currentPageId', initialData);
-};
-
 export const useIsIdenticalPath = (initialData?: boolean): SWRResponse<boolean, Error> => {
   return useContextSWR<boolean, Error>('isIdenticalPath', initialData, { fallbackData: false });
 };
@@ -60,10 +56,6 @@ export const useIsNotCreatable = (initialData?: boolean): SWRResponse<boolean, E
   return useContextSWR<boolean, Error>('isNotCreatable', initialData, { fallbackData: false });
 };
 
-export const useIsNotFound = (initialData?: boolean): SWRResponse<boolean, Error> => {
-  return useContextSWR<boolean, Error>('isNotFound', initialData, { fallbackData: false });
-};
-
 export const useTemplateTagData = (initialData?: string[]): SWRResponse<string[], Error> => {
   return useContextSWR<string[], Error>('templateTagData', initialData);
 };
@@ -161,10 +153,6 @@ export const useIsEnabledStaleNotification = (initialData?: boolean): SWRRespons
   return useContextSWR('isEnabledStaleNotification', initialData);
 };
 
-export const useIsLatestRevision = (initialData?: boolean): SWRResponse<boolean, any> => {
-  return useContextSWR('isLatestRevision', initialData);
-};
-
 export const useEditorConfig = (initialData?: EditorConfig): SWRResponse<EditorConfig, Error> => {
   return useContextSWR<EditorConfig, Error>('editorConfig', initialData);
 };

+ 14 - 3
apps/app/src/stores/page.tsx

@@ -19,13 +19,24 @@ import { IRevision, IRevisionHasId } from '~/interfaces/revision';
 
 import { IPageTagsInfo } from '../interfaces/tag';
 
-import {
-  useCurrentPageId, useCurrentPathname, useShareLinkId, useIsGuestUser, useIsNotFound,
-} from './context';
+import { useCurrentPathname, useShareLinkId, useIsGuestUser } from './context';
+import { useStaticSWR } from './use-static-swr';
 
 const { isPermalink: _isPermalink } = pagePathUtils;
 
 
+export const useCurrentPageId = (initialData?: Nullable<string>): SWRResponse<Nullable<string>, Error> => {
+  return useStaticSWR<Nullable<string>, Error>('currentPageId', initialData);
+};
+
+export const useIsLatestRevision = (initialData?: boolean): SWRResponse<boolean, any> => {
+  return useStaticSWR('isLatestRevision', initialData);
+};
+
+export const useIsNotFound = (initialData?: boolean): SWRResponse<boolean, Error> => {
+  return useStaticSWR<boolean, Error>('isNotFound', initialData, { fallbackData: false });
+};
+
 export const useSWRxCurrentPage = (initialData?: IPagePopulatedToShowRevision|null): SWRResponse<IPagePopulatedToShowRevision|null> => {
   const key = 'currentPage';
 

+ 5 - 3
apps/app/src/stores/ui.tsx

@@ -20,13 +20,15 @@ import type { IPageGrantData } from '~/interfaces/page';
 import type { ISidebarConfig } from '~/interfaces/sidebar-config';
 import { SidebarContentsType } from '~/interfaces/ui';
 import type { UpdateDescCountData } from '~/interfaces/websocket';
+import {
+  useIsNotFound, useCurrentPagePath, useIsTrashPage, useCurrentPageId,
+} from '~/stores/page';
 import loggerFactory from '~/utils/logger';
 
 import {
-  useCurrentPageId, useIsEditable,
-  useIsSharedUser, useIsIdenticalPath, useCurrentUser, useShareLinkId, useIsNotFound,
+  useIsEditable,
+  useIsSharedUser, useIsIdenticalPath, useCurrentUser, useShareLinkId,
 } from './context';
-import { useCurrentPagePath, useIsTrashPage } from './page';
 import { useStaticSWR } from './use-static-swr';
 
 const { isTrashTopPage, isUsersTopPage } = pagePathUtils;

+ 2 - 2
apps/slackbot-proxy/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/slackbot-proxy",
-  "version": "6.0.8-slackbot-proxy.0",
+  "version": "6.0.9-slackbot-proxy.0",
   "license": "MIT",
   "scripts": {
     "build": "yarn tsc && tsc-alias -p tsconfig.build.json",
@@ -25,7 +25,7 @@
   },
   "dependencies": {
     "@godaddy/terminus": "^4.9.0",
-    "@growi/slack": "^6.0.8-RC.0",
+    "@growi/slack": "^6.0.9-RC.0",
     "@slack/oauth": "^2.0.1",
     "@slack/web-api": "^6.2.4",
     "@tsed/common": "^6.43.0",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "growi",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "description": "Team collaboration software using markdown",
   "tags": [
     "wiki",

+ 1 - 1
packages/codemirror-textlint/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/codemirror-textlint",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "license": "MIT",
   "main": "dist/index.js",
   "scripts": {

+ 1 - 1
packages/core/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/core",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "description": "GROWI Core Libraries",
   "license": "MIT",
   "keywords": [

+ 1 - 1
packages/hackmd/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/hackmd",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "description": "GROWI js and css files to use hackmd",
   "license": "MIT",
   "type": "module",

+ 2 - 2
packages/presentation/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/presentation",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "description": "GROWI plugin for presentation",
   "license": "MIT",
   "keywords": ["growi", "growi-plugin"],
@@ -21,7 +21,7 @@
     "lint": "run-p lint:*"
   },
   "dependencies": {
-    "@growi/core": "^6.0.8-RC.0"
+    "@growi/core": "^6.0.9-RC.0"
   },
   "devDependencies": {
     "@marp-team/marp-core": "^3.4.2",

+ 1 - 1
packages/preset-themes/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@growi/preset-themes",
   "description": "GROWI preset themes",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "license": "MIT",
   "main": "dist/libs/preset-themes.umd.js",
   "module": "dist/libs/preset-themes.mjs",

+ 1 - 1
packages/remark-drawio/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/remark-drawio",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "description": "remark plugin to draw diagrams with draw.io (diagrams.net)",
   "license": "MIT",
   "keywords": [

+ 1 - 1
packages/remark-growi-directive/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/remark-growi-directive",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "description": "remark plugin to support GROWI plugin (forked from remark-directive@2.0.1)",
   "license": "MIT",
   "keywords": [

+ 4 - 4
packages/remark-lsx/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/remark-lsx",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "description": "GROWI plugin to list pages",
   "license": "MIT",
   "keywords": ["growi", "growi-plugin"],
@@ -23,9 +23,9 @@
     "lint": "run-p lint:*"
   },
   "dependencies": {
-    "@growi/core": "^6.0.8-RC.0",
-    "@growi/remark-growi-directive": "^6.0.8-RC.0",
-    "@growi/ui": "^6.0.8-RC.0",
+    "@growi/core": "^6.0.9-RC.0",
+    "@growi/remark-growi-directive": "^6.0.9-RC.0",
+    "@growi/ui": "^6.0.9-RC.0",
     "swr": "^2.0.3"
   },
   "devDependencies": {

+ 1 - 1
packages/slack/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/slack",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "license": "MIT",
   "main": "dist/slack.umd.js",
   "module": "dist/slack.mjs",

+ 2 - 2
packages/ui/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/ui",
-  "version": "6.0.8-RC.0",
+  "version": "6.0.9-RC.0",
   "description": "GROWI UI Libraries",
   "license": "MIT",
   "keywords": ["growi"],
@@ -17,7 +17,7 @@
     "lint": "npm-run-all -p lint:*"
   },
   "dependencies": {
-    "@growi/core": "^6.0.8-RC.0"
+    "@growi/core": "^6.0.9-RC.0"
   },
   "devDependencies": {
     "react": "^18.2.0"