elements.js 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. // The card keeps its side margin wherever the column shows: from lg on wiki pages, so
  72. // the panel doesn't clip its outline shadow (the conductor's column starts at xl).
  73. sidebar_inner_container: ' 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',
  74. sidebar_title: 'sticky justify-between items-center z-10 gap-2 h-11 px-1 ',
  75. // Sidebar title (section icon + name) of conductor and wiki pages (ui/molecules/sidebar-title).
  76. sidebar_title_name: 'items-center mr-auto min-w-0 hidden lg:flex gap-2',
  77. sidebar_title_icon: 'h-8 w-8 items-center justify-center flex',
  78. sidebar_title_icon_class: 'text-card-foreground shrink-0',
  79. sidebar_title_icon_size: 29,
  80. sidebar_title_text: 'text-xl tracking-tight truncate font-bold leading-9 text-card-foreground',
  81. // Section nav under the title. The negative margin and the items' 8px inset put the
  82. // icons 4px inside sidebar_inner_container's padding, in line with the title icon.
  83. sidebar_nav: 'gap-0.5 -mx-1 -mb-1',
  84. sidebar_position: ' z-50 ',
  85. bgrDecorator: true, // Enable/disable decorator background globally for conductor buttons
  86. add_menu_native:false,
  87. more_menu_container: 'hidden lg:block items-center mx-3'
  88. },
  89. entry: {
  90. default_view: '',
  91. default_info_icon: 'Info', //appSetting('layout', 'entity_info_icon')
  92. },
  93. tasks: {
  94. // Per-task row chrome. Forks override in customization/settings.js.
  95. item_wrapper: 'h-11 justify-center px-3 bg-transparent hover:bg-muted/40 transition-colors duration-200 rounded-lg',
  96. // Status group header (Todo / In Progress / …).
  97. section_title: 'items-center justify-start gap-2 px-3 h-11 bg-muted/60 rounded-lg',
  98. // Keys are normalizeTaskLabel() of the UNA priority caption.
  99. priority_icons: {
  100. urgent: 'Signal',
  101. high: 'SignalHigh',
  102. medium: 'SignalMedium',
  103. low: 'SignalLow',
  104. 'no priority': 'SignalZero',
  105. },
  106. priority_icon_fallback: 'Flag',
  107. // Estimate points → seconds. UNA stores 1 point = 1 hour.
  108. estimate_seconds_per_point: 3600,
  109. },
  110. async_workers: {
  111. list: ['CounterChecker'],
  112. interval: 10,
  113. },
  114. suggestion: {
  115. list: [
  116. /* {
  117. name: 'friends',
  118. request_url:
  119. '/api.php?r=system/browse_recommendations_friends/TemplServiceProfiles&params[]={user_id}&params[]=',
  120. title: 'Recommended friends',
  121. unitType: 'person_friends_suggestion',
  122. perLine: 3,
  123. },
  124. {
  125. name: 'groups',
  126. request_url:
  127. '/api.php?r=bx_groups/browse_recommendations_fans&params[]={user_id}',
  128. title: 'Recommended groups',
  129. unitType: 'person_friends_recommendations',
  130. perLine: 3,
  131. },*/
  132. ],
  133. },
  134. auth: {
  135. enabled: true,
  136. google: {
  137. web_client_id: env('GOOGLE_WEB_CLIENT_ID'),
  138. ios_client_id: '',
  139. android_client_id: '',
  140. },
  141. github: false,
  142. linkedin: false,
  143. x: false,
  144. passkey: false,
  145. saml: false,
  146. },
  147. editor: {
  148. engine: 'enriched',//enriched || tentap
  149. mention: {
  150. // Background-prefetched seed for the bare "@" suggestion list (cold start,
  151. // before the user has any local mention history). Set `prefetch_connections`
  152. // to false to disable. `connections_url` may be a single URL string or an
  153. // array of sources merged in order; `{user_id}` is replaced with the
  154. // logged-in profile id. Defaults (when omitted) are friends + recommendations.
  155. prefetch_connections: true,
  156. connections_url: [
  157. '/api.php?r=system/browse_friends/TemplServiceProfiles&params[]={user_id}&params[]=',
  158. '/api.php?r=system/browse_recommendations_friends/TemplServiceProfiles&params[]={user_id}&params[]=',
  159. ],
  160. // Mention styling — rendered as a plain colored link (no background/padding).
  161. // `render_class` styles mentions in rendered posts/comments on NATIVE (web posts
  162. // mirror this via the .bx-mention-link CSS in utilities.css). `editor_color` is
  163. // the in-editor mention text color (EnrichedTextInput htmlStyle, web + native).
  164. render_class: 'text-accent-foreground',
  165. editor_color: { light: 'rgba(37, 99, 235, 1)', dark: 'rgba(59, 130, 246, 1)' },
  166. },
  167. toolbar: {
  168. padding: 1, // Padding for toolbar buttons in pixels
  169. colors: {
  170. background: 'rgba(255, 255, 255, 0)',
  171. backgroundDark: 'rgba(0, 0, 0, 0)',
  172. icon: 'rgba(210, 215, 220, 1)',
  173. iconDark: 'rgba(55, 65, 80, 1)',
  174. },
  175. },
  176. css:'A.bx-mention-link, A.bx-tag{ color: rgba(37, 99, 235, 1)}',
  177. css_dark:'A.bx-mention-link, A.bx-tag{ color: rgba(59, 130, 246, 1)}}',
  178. // Paste images: upload to the form's default files field (asDefaultStorage
  179. // or first image/files input). `inline` also inserts <img> into the editor
  180. // (html=1|2 only; html=3 always attaches).
  181. // Per-form override: exact name or prefix (`bx_tasks` → `bx_tasks_entry_add`).
  182. paste_images: 'attachments', // off | attachments | inline
  183. paste_images_forms: {
  184. bx_tasks: 'inline',
  185. },
  186. },
  187. }