mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Refactor groups configs in webapp and backend to new structure
This commit is contained in:
parent
16a7a1ec5f
commit
f10006563e
5
backend/src/branding/groupsBranding.ts
Normal file
5
backend/src/branding/groupsBranding.ts
Normal file
@ -0,0 +1,5 @@
|
||||
// this file is duplicated in backend/src/branding/groupsBranding' and 'webapp/branding/groupsBranding'
|
||||
// configurable values see: 'backend/src/constants/groupsDefault', 'webapp/constants/groupsDefault'
|
||||
// configurable values see: 'backend/src/constants/groups', 'webapp/constants/groups'
|
||||
|
||||
export const DUMMY = '' // to avoid import error ts(2306): File X is not a module.
|
||||
@ -1,3 +1,10 @@
|
||||
// this file is duplicated in `backend/src/constants/group` and `webapp/constants/group.js`
|
||||
export const DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 50 // with removed HTML tags
|
||||
export const DESCRIPTION_EXCERPT_HTML_LENGTH = 250 // with removed HTML tags
|
||||
// configurable values see: 'backend/src/constants/groupsDefault', 'webapp/constants/groupsDefault'
|
||||
// configurable values see: 'backend/src/constants/groups', 'webapp/constants/groups'
|
||||
|
||||
import * as groupsDefault from './groupsDefault'
|
||||
import * as groupsBranding from '../branding/groupsBranding'
|
||||
|
||||
export const { DESCRIPTION_WITHOUT_HTML_LENGTH_MIN, DESCRIPTION_EXCERPT_HTML_LENGTH } = {
|
||||
...groupsDefault,
|
||||
...groupsBranding,
|
||||
}
|
||||
|
||||
6
backend/src/constants/groupsDefault.ts
Normal file
6
backend/src/constants/groupsDefault.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// this file is duplicated in 'backend/src/constants/groupsDefault' and 'webapp/constants/groupsDefault'
|
||||
// configurable values see: 'backend/src/constants/groupsDefault', 'webapp/constants/groupsDefault'
|
||||
// configurable values see: 'backend/src/constants/groups', 'webapp/constants/groups'
|
||||
|
||||
export const DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 50 // with removed HTML tags
|
||||
export const DESCRIPTION_EXCERPT_HTML_LENGTH = 250 // with removed HTML tags
|
||||
5
webapp/branding/groupsBranding.js
Normal file
5
webapp/branding/groupsBranding.js
Normal file
@ -0,0 +1,5 @@
|
||||
// this file is duplicated in backend/src/branding/groupsBranding' and 'webapp/branding/groupsBranding'
|
||||
// configurable values see: 'backend/src/constants/groupsDefault', 'webapp/constants/groupsDefault'
|
||||
// configurable values see: 'backend/src/constants/groups', 'webapp/constants/groups'
|
||||
|
||||
export const DUMMY = '' // to avoid import error ts(2306): File X is not a module.
|
||||
@ -1,5 +1,12 @@
|
||||
// this file is duplicated in `backend/src/constants/group.js` and `webapp/constants/group.js`
|
||||
export const NAME_LENGTH_MIN = 3
|
||||
export const NAME_LENGTH_MAX = 50
|
||||
export const DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 50 // with removed HTML tags
|
||||
export const SHOW_GROUP_BUTTON_IN_HEADER = true
|
||||
// configurable values see: 'backend/src/constants/groupsDefault', 'webapp/constants/groupsDefault'
|
||||
// configurable values see: 'backend/src/constants/groups', 'webapp/constants/groups'
|
||||
|
||||
import * as groupsDefault from './groupsDefault'
|
||||
import * as groupsBranding from '../branding/groupsBranding'
|
||||
|
||||
export const {
|
||||
NAME_LENGTH_MIN,
|
||||
NAME_LENGTH_MAX,
|
||||
DESCRIPTION_WITHOUT_HTML_LENGTH_MIN,
|
||||
SHOW_GROUP_BUTTON_IN_HEADER,
|
||||
} = {...groupsDefault, ...groupsBranding}
|
||||
|
||||
8
webapp/constants/groupsDefault.js
Normal file
8
webapp/constants/groupsDefault.js
Normal file
@ -0,0 +1,8 @@
|
||||
// this file is duplicated in 'backend/src/constants/groupsDefault' and 'webapp/constants/groupsDefault'
|
||||
// configurable values see: 'backend/src/constants/groupsDefault', 'webapp/constants/groupsDefault'
|
||||
// configurable values see: 'backend/src/constants/groups', 'webapp/constants/groups'
|
||||
|
||||
export const NAME_LENGTH_MIN = 3
|
||||
export const NAME_LENGTH_MAX = 50
|
||||
export const DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 50 // with removed HTML tags
|
||||
export const SHOW_GROUP_BUTTON_IN_HEADER = true
|
||||
Loading…
x
Reference in New Issue
Block a user