|
|
@@ -1,6 +1,6 @@
|
|
|
import type { ColorScheme, IUserHasId } from '@growi/core';
|
|
|
import { atom, useAtom } from 'jotai';
|
|
|
-
|
|
|
+import type { SupportedActionType } from '~/interfaces/activity';
|
|
|
import type { UseAtom } from '../helper';
|
|
|
|
|
|
// CSRF Token atom (no persistence needed as it's server-provided)
|
|
|
@@ -41,6 +41,14 @@ export const useSiteUrl = (): UseAtom<typeof siteUrlAtom> => {
|
|
|
return useAtom(siteUrlAtom);
|
|
|
};
|
|
|
|
|
|
+// Site URL atom (no persistence needed as it's server-provided)
|
|
|
+export const siteUrlWithEmptyValueWarnAtom = atom<string>();
|
|
|
+export const useSiteUrlWithEmptyValueWarn = (): UseAtom<
|
|
|
+ typeof siteUrlWithEmptyValueWarnAtom
|
|
|
+> => {
|
|
|
+ return useAtom(siteUrlWithEmptyValueWarnAtom);
|
|
|
+};
|
|
|
+
|
|
|
// Confidential atom (no persistence needed as it's server-provided)
|
|
|
export const confidentialAtom = atom<string>('');
|
|
|
export const useConfidential = (): UseAtom<typeof confidentialAtom> => {
|
|
|
@@ -67,6 +75,20 @@ export const useIsDefaultLogo = (): UseAtom<typeof isDefaultLogoAtom> => {
|
|
|
return useAtom(isDefaultLogoAtom);
|
|
|
};
|
|
|
|
|
|
+// Customize Title (admin customize setting)
|
|
|
+export const customizeTitleAtom = atom<string | undefined>(undefined);
|
|
|
+export const useCustomizeTitle = (): UseAtom<typeof customizeTitleAtom> => {
|
|
|
+ return useAtom(customizeTitleAtom);
|
|
|
+};
|
|
|
+
|
|
|
+// Is Customized Logo Uploaded
|
|
|
+export const isCustomizedLogoUploadedAtom = atom<boolean>(false);
|
|
|
+export const useIsCustomizedLogoUploaded = (): UseAtom<
|
|
|
+ typeof isCustomizedLogoUploadedAtom
|
|
|
+> => {
|
|
|
+ return useAtom(isCustomizedLogoUploadedAtom);
|
|
|
+};
|
|
|
+
|
|
|
// GROWI Cloud URI atom (no persistence needed as it's server-provided)
|
|
|
export const growiCloudUriAtom = atom<string | undefined>(undefined);
|
|
|
export const useGrowiCloudUri = (): UseAtom<typeof growiCloudUriAtom> => {
|
|
|
@@ -88,3 +110,22 @@ export const useForcedColorScheme = (): UseAtom<
|
|
|
> => {
|
|
|
return useAtom(forcedColorSchemeAtom);
|
|
|
};
|
|
|
+
|
|
|
+export const auditLogEnabledAtom = atom<boolean>(false);
|
|
|
+export const useAuditLogEnabled = (): UseAtom<typeof auditLogEnabledAtom> => {
|
|
|
+ return useAtom(auditLogEnabledAtom);
|
|
|
+};
|
|
|
+
|
|
|
+export const activityExpirationSecondsAtom = atom<number>(0);
|
|
|
+export const useActivityExpirationSeconds = (): UseAtom<
|
|
|
+ typeof activityExpirationSecondsAtom
|
|
|
+> => {
|
|
|
+ return useAtom(activityExpirationSecondsAtom);
|
|
|
+};
|
|
|
+
|
|
|
+export const auditLogAvailableActionsAtom = atom<SupportedActionType[]>([]);
|
|
|
+export const useAuditLogAvailableActions = (): UseAtom<
|
|
|
+ typeof auditLogAvailableActionsAtom
|
|
|
+> => {
|
|
|
+ return useAtom(auditLogAvailableActionsAtom);
|
|
|
+};
|