elements.js 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. import { env } from 'app/lib/platform/env'
  2. export const settingsElements = {
  3. context_selector: {
  4. default_item: '',
  5. logo: true,
  6. logo_mode: 'full',
  7. show_always: false,
  8. root_url: 'home'
  9. },
  10. cover: {
  11. use_background: true,
  12. // Every cover except profile ones: content entries, their form
  13. // previews and crops. Profile covers (persons, groups, events, ...)
  14. // use `profile_aspect_ratio`; `aspect_ratio_by_module` wins over both.
  15. // The crop takes the first `aspect-N/M` ratio of the class, so a
  16. // profile cover crops at 3:1.
  17. aspect_ratio: 'aspect-video',
  18. profile_aspect_ratio: 'aspect-video lg:aspect-3/1',
  19. allow_edit: true,
  20. allow_switch: true,
  21. // Skip CoverMorph collapse (expanded cover stays in flow). Do not
  22. // fork back to the old Cover component.
  23. fixed: false,
  24. scroll: false,
  25. hide_cover_for_context: false,
  26. back_button_url_for_profile: '/friends',
  27. view_by_module: {
  28. bx_events: 'min',
  29. bx_spaces: 'none',
  30. bx_jobs: 'max',
  31. },
  32. show_pic_by_module: {
  33. bx_spaces: true,
  34. },
  35. more_menu_in_navbar: {
  36. bx_groups: true,
  37. },
  38. // Web desktop, by module: hide the collapsed identity strip (avatar,
  39. // title, fans) so only the tab bar stays pinned under the header.
  40. hide_collapsed_bar_desktop: {},
  41. picture_size: 400,
  42. crop_max_width: 2000,
  43. aspect_ratio_by_module: {},
  44. skip_crop: {},
  45. // CoverMorph: Profile `unit_wo_info` sizes and title tokens to
  46. // interpolate between. Add variants here rather than one-off CSS.
  47. morph_avatar_expanded: '3xl',
  48. morph_avatar_expanded_mobile: '2xl',
  49. morph_avatar_collapsed: 'base',
  50. morph_title_expanded: 'text-2xl sm:text-3xl lg:text-4xl',
  51. morph_title_collapsed: 'text-base leading-6 lg:text-lg lg:leading-6',
  52. morph_bar: 'py-2.5',
  53. morph_transition: 'native:duration-300 web:duration-300 web:ease-out motion-reduce:transition-none',
  54. },
  55. comments: {
  56. hide_sort: false, //OLD appSetting('layout', 'hide_comments_sort')
  57. count_in_feed: 3, //OLD appSetting('layout', 'comments_count_in_feed')
  58. mentions: true, //OLD appSetting('layout', 'comments_mentions')
  59. in_reply: true, //OLD appSetting('layout', 'show_in_reply_comments')
  60. submit_comment_on_enter: false, // false: Cmd/Ctrl+Enter submits, Enter is a newline
  61. },
  62. carousel: {
  63. image_width: '', //appSetting('layout', 'carousel_image_width')
  64. image_aspect_ratio: ' aspect-square ', //appSetting('layout', 'carousel_image_aspect')
  65. },
  66. conductor: {
  67. show_nav_counters: true, // OLD appSetting('layout', 'show_nav_counters')
  68. show_nav_titles: false, // OLD appSetting('layout', 'show_nav_titles')
  69. hide_browse_filter: true, // OLD appSetting('layout', 'hide_browse_filter')
  70. sidebar_container: ' ns--sidebar-container-- h-full ne-- ',
  71. sidebar_inner_container: ' xl:mx-4 p-3 gap-3 overflow-y-auto flex flex-col bg-card/80 shadow-card-outline dark:shadow-card-outline-deep rounded-2xl mt-4',
  72. sidebar_title: 'sticky justify-between items-center z-10 gap-2 h-11 px-1 ',
  73. sidebar_position: ' z-50 ',
  74. bgrDecorator: true, // Enable/disable decorator background globally for conductor buttons
  75. add_menu_native:false,
  76. more_menu_container: 'hidden lg:block items-center mx-3'
  77. },
  78. entry: {
  79. default_view: '',
  80. default_info_icon: 'Info', //appSetting('layout', 'entity_info_icon')
  81. },
  82. tasks: {
  83. // Per-task row chrome. Forks override in customization/settings.js.
  84. item_wrapper: 'h-11 justify-center px-3 bg-transparent hover:bg-muted/40 transition-colors duration-200 rounded-lg',
  85. // Status group header (Todo / In Progress / …).
  86. section_title: 'items-center justify-start gap-2 px-3 h-11 bg-muted/60 rounded-lg',
  87. // Keys are normalizeTaskLabel() of the UNA priority caption.
  88. priority_icons: {
  89. urgent: 'Signal',
  90. high: 'SignalHigh',
  91. medium: 'SignalMedium',
  92. low: 'SignalLow',
  93. 'no priority': 'SignalZero',
  94. },
  95. priority_icon_fallback: 'Flag',
  96. // Estimate points → seconds. UNA stores 1 point = 1 hour.
  97. estimate_seconds_per_point: 3600,
  98. },
  99. async_workers: {
  100. list: ['CounterChecker'],
  101. interval: 10,
  102. },
  103. suggestion: {
  104. list: [
  105. /* {
  106. name: 'friends',
  107. request_url:
  108. '/api.php?r=system/browse_recommendations_friends/TemplServiceProfiles&params[]={user_id}&params[]=',
  109. title: 'Recommended friends',
  110. unitType: 'person_friends_suggestion',
  111. perLine: 3,
  112. },
  113. {
  114. name: 'groups',
  115. request_url:
  116. '/api.php?r=bx_groups/browse_recommendations_fans&params[]={user_id}',
  117. title: 'Recommended groups',
  118. unitType: 'person_friends_recommendations',
  119. perLine: 3,
  120. },*/
  121. ],
  122. },
  123. auth: {
  124. enabled: true,
  125. google: {
  126. web_client_id: env('GOOGLE_WEB_CLIENT_ID'),
  127. ios_client_id: '',
  128. android_client_id: '',
  129. },
  130. github: false,
  131. linkedin: false,
  132. x: false,
  133. passkey: false,
  134. saml: false,
  135. },
  136. editor: {
  137. engine: 'enriched',//enriched || tentap
  138. mention: {
  139. // Background-prefetched seed for the bare "@" suggestion list (cold start,
  140. // before the user has any local mention history). Set `prefetch_connections`
  141. // to false to disable. `connections_url` may be a single URL string or an
  142. // array of sources merged in order; `{user_id}` is replaced with the
  143. // logged-in profile id. Defaults (when omitted) are friends + recommendations.
  144. prefetch_connections: true,
  145. connections_url: [
  146. '/api.php?r=system/browse_friends/TemplServiceProfiles&params[]={user_id}&params[]=',
  147. '/api.php?r=system/browse_recommendations_friends/TemplServiceProfiles&params[]={user_id}&params[]=',
  148. ],
  149. // Mention styling — rendered as a plain colored link (no background/padding).
  150. // `render_class` styles mentions in rendered posts/comments on NATIVE (web posts
  151. // mirror this via the .bx-mention-link CSS in utilities.css). `editor_color` is
  152. // the in-editor mention text color (EnrichedTextInput htmlStyle, web + native).
  153. render_class: 'text-accent-foreground',
  154. editor_color: { light: 'rgba(37, 99, 235, 1)', dark: 'rgba(59, 130, 246, 1)' },
  155. },
  156. toolbar: {
  157. padding: 1, // Padding for toolbar buttons in pixels
  158. colors: {
  159. background: 'rgba(255, 255, 255, 0)',
  160. backgroundDark: 'rgba(0, 0, 0, 0)',
  161. icon: 'rgba(210, 215, 220, 1)',
  162. iconDark: 'rgba(55, 65, 80, 1)',
  163. },
  164. },
  165. css:'A.bx-mention-link, A.bx-tag{ color: rgba(37, 99, 235, 1)}',
  166. css_dark:'A.bx-mention-link, A.bx-tag{ color: rgba(59, 130, 246, 1)}}',
  167. // Paste images: upload to the form's default files field (asDefaultStorage
  168. // or first image/files input). `inline` also inserts <img> into the editor
  169. // (html=1|2 only; html=3 always attaches).
  170. // Per-form override: exact name or prefix (`bx_tasks` → `bx_tasks_entry_add`).
  171. paste_images: 'attachments', // off | attachments | inline
  172. paste_images_forms: {
  173. bx_tasks: 'inline',
  174. },
  175. },
  176. }