|
@@ -6,7 +6,7 @@ import {
|
|
|
useIsDeleted, useIsNotCreatable, useIsTrashPage, useIsUserPage, useLastUpdateUsername,
|
|
useIsDeleted, useIsNotCreatable, useIsTrashPage, useIsUserPage, useLastUpdateUsername,
|
|
|
useCurrentPageId, usePageIdOnHackmd, usePageUser, useCurrentPagePath, useRevisionCreatedAt, useRevisionId, useRevisionIdHackmdSynced,
|
|
useCurrentPageId, usePageIdOnHackmd, usePageUser, useCurrentPagePath, useRevisionCreatedAt, useRevisionId, useRevisionIdHackmdSynced,
|
|
|
useShareLinkId, useShareLinksNumber, useTemplateTagData, useCurrentUpdatedAt, useCreator, useRevisionAuthor, useCurrentUser, useTargetAndAncestors,
|
|
useShareLinkId, useShareLinksNumber, useTemplateTagData, useCurrentUpdatedAt, useCreator, useRevisionAuthor, useCurrentUser, useTargetAndAncestors,
|
|
|
- useSlackChannels, useNotFoundTargetPathOrId, useIsSearchPage, useIsForbidden, useIsIdenticalPath,
|
|
|
|
|
|
|
+ useSlackChannels, useNotFoundTargetPathOrId, useIsSearchPage, useIsForbidden, useIsIdenticalPath, useIsAclEnabled,
|
|
|
} from '../../stores/context';
|
|
} from '../../stores/context';
|
|
|
import {
|
|
import {
|
|
|
useIsDeviceSmallerThanMd, useIsDeviceSmallerThanLg,
|
|
useIsDeviceSmallerThanMd, useIsDeviceSmallerThanLg,
|
|
@@ -30,6 +30,11 @@ const ContextExtractorOnce: FC = () => {
|
|
|
*/
|
|
*/
|
|
|
const currentUser = JSON.parse(document.getElementById('growi-current-user')?.textContent || jsonNull);
|
|
const currentUser = JSON.parse(document.getElementById('growi-current-user')?.textContent || jsonNull);
|
|
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ * AdminSettings from DOM
|
|
|
|
|
+ */
|
|
|
|
|
+ const adminSettings = JSON.parse(document.getElementById('growi-context-hydrate')?.textContent || jsonNull);
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
* UserUISettings from DOM
|
|
* UserUISettings from DOM
|
|
|
*/
|
|
*/
|
|
@@ -84,6 +89,9 @@ const ContextExtractorOnce: FC = () => {
|
|
|
// App
|
|
// App
|
|
|
useCurrentUser(currentUser);
|
|
useCurrentUser(currentUser);
|
|
|
|
|
|
|
|
|
|
+ // AppSetting
|
|
|
|
|
+ useIsAclEnabled(adminSettings?.isAclEnabled);
|
|
|
|
|
+
|
|
|
// UserUISettings
|
|
// UserUISettings
|
|
|
usePreferDrawerModeByUser(userUISettings?.preferDrawerModeByUser);
|
|
usePreferDrawerModeByUser(userUISettings?.preferDrawerModeByUser);
|
|
|
usePreferDrawerModeOnEditByUser(userUISettings?.preferDrawerModeOnEditByUser);
|
|
usePreferDrawerModeOnEditByUser(userUISettings?.preferDrawerModeOnEditByUser);
|