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

add missed keys and definitions

Yuki Takei 1 год назад
Родитель
Сommit
78bf5c71f2

+ 2 - 2
apps/app/src/pages/utils/commons.ts

@@ -22,7 +22,7 @@ export type CommonProps = {
   namespacesRequired: string[], // i18next
   namespacesRequired: string[], // i18next
   currentPathname: string,
   currentPathname: string,
   appTitle: string,
   appTitle: string,
-  siteUrl: string,
+  siteUrl: string | undefined,
   confidential: string,
   confidential: string,
   customTitleTemplate: string,
   customTitleTemplate: string,
   csrfToken: string,
   csrfToken: string,
@@ -31,7 +31,7 @@ export type CommonProps = {
   isMaintenanceMode: boolean,
   isMaintenanceMode: boolean,
   redirectDestination: string | null,
   redirectDestination: string | null,
   isDefaultLogo: boolean,
   isDefaultLogo: boolean,
-  growiCloudUri: string,
+  growiCloudUri: string | undefined,
   isAccessDeniedForNonAdminUser?: boolean,
   isAccessDeniedForNonAdminUser?: boolean,
   currentUser?: IUserHasId,
   currentUser?: IUserHasId,
   forcedColorScheme?: ColorScheme,
   forcedColorScheme?: ColorScheme,

+ 1 - 1
apps/app/src/server/service/app.ts

@@ -73,7 +73,7 @@ export default class AppService implements S2sMessageHandlable {
   }
   }
 
 
   getAppTitle() {
   getAppTitle() {
-    return configManager.getConfig('crowi', 'app:title') || 'GROWI';
+    return configManager.getConfig('crowi', 'app:title') ?? 'GROWI';
   }
   }
 
 
   /**
   /**

+ 17 - 4
apps/app/src/server/service/config-manager/config-definition.ts

@@ -4,6 +4,7 @@ import type OpenAI from 'openai';
 
 
 import { ActionGroupSize } from '~/interfaces/activity';
 import { ActionGroupSize } from '~/interfaces/activity';
 import { AttachmentMethodType } from '~/interfaces/attachment';
 import { AttachmentMethodType } from '~/interfaces/attachment';
+import type { IPageDeleteConfigValue, IPageDeleteConfigValueToProcessValidation } from '~/interfaces/page-delete-config';
 import { RehypeSanitizeType } from '~/interfaces/services/rehype-sanitize';
 import { RehypeSanitizeType } from '~/interfaces/services/rehype-sanitize';
 import { GrowiServiceType } from '~/interfaces/system';
 import { GrowiServiceType } from '~/interfaces/system';
 
 
@@ -32,6 +33,8 @@ export const CONFIG_KEYS = [
   'app:isV5Compatible',
   'app:isV5Compatible',
   'app:isMaintenanceMode',
   'app:isMaintenanceMode',
   'app:confidential',
   'app:confidential',
+  'app:title',
+  'app:timezone',
   'app:globalLang',
   'app:globalLang',
   'app:fileUpload',
   'app:fileUpload',
   'app:fileUploadType',
   'app:fileUploadType',
@@ -173,6 +176,7 @@ export const CONFIG_KEYS = [
   'customize:script',
   'customize:script',
   'customize:noscript',
   'customize:noscript',
   'customize:title',
   'customize:title',
+  'customize:isDefaultLogo',
   'customize:highlightJsStyle',
   'customize:highlightJsStyle',
   'customize:highlightJsStyleBorder',
   'customize:highlightJsStyleBorder',
   'customize:theme',
   'customize:theme',
@@ -337,6 +341,12 @@ export const CONFIG_DEFINITIONS = {
   'app:confidential': defineConfig<string | undefined>({
   'app:confidential': defineConfig<string | undefined>({
     defaultValue: undefined,
     defaultValue: undefined,
   }),
   }),
+  'app:title': defineConfig<string | undefined>({
+    defaultValue: undefined,
+  }),
+  'app:timezone': defineConfig<number | undefined>({
+    defaultValue: undefined,
+  }),
   'app:globalLang': defineConfig<string>({
   'app:globalLang': defineConfig<string>({
     defaultValue: 'en_US',
     defaultValue: 'en_US',
   }),
   }),
@@ -604,16 +614,16 @@ export const CONFIG_DEFINITIONS = {
   'security:list-policy:hideRestrictedByGroup': defineConfig<boolean>({
   'security:list-policy:hideRestrictedByGroup': defineConfig<boolean>({
     defaultValue: false,
     defaultValue: false,
   }),
   }),
-  'security:pageDeletionAuthority': defineConfig<string | undefined>({
+  'security:pageDeletionAuthority': defineConfig<IPageDeleteConfigValueToProcessValidation | undefined>({
     defaultValue: undefined,
     defaultValue: undefined,
   }),
   }),
-  'security:pageCompleteDeletionAuthority': defineConfig<string | undefined>({
+  'security:pageCompleteDeletionAuthority': defineConfig<IPageDeleteConfigValueToProcessValidation | undefined>({
     defaultValue: undefined,
     defaultValue: undefined,
   }),
   }),
-  'security:pageRecursiveDeletionAuthority': defineConfig<string | undefined>({
+  'security:pageRecursiveDeletionAuthority': defineConfig<IPageDeleteConfigValue | undefined>({
     defaultValue: undefined,
     defaultValue: undefined,
   }),
   }),
-  'security:pageRecursiveCompleteDeletionAuthority': defineConfig<string | undefined>({
+  'security:pageRecursiveCompleteDeletionAuthority': defineConfig<IPageDeleteConfigValue | undefined>({
     defaultValue: undefined,
     defaultValue: undefined,
   }),
   }),
   'security:isAllGroupMembershipRequiredForPageCompleteDeletion': defineConfig<boolean>({
   'security:isAllGroupMembershipRequiredForPageCompleteDeletion': defineConfig<boolean>({
@@ -817,6 +827,9 @@ export const CONFIG_DEFINITIONS = {
   'customize:title': defineConfig<string | undefined>({
   'customize:title': defineConfig<string | undefined>({
     defaultValue: undefined,
     defaultValue: undefined,
   }),
   }),
+  'customize:isDefaultLogo': defineConfig<boolean>({
+    defaultValue: true,
+  }),
   'customize:highlightJsStyle': defineConfig<string>({
   'customize:highlightJsStyle': defineConfig<string>({
     defaultValue: 'github',
     defaultValue: 'github',
   }),
   }),