diff --git a/packages/nicolium/src/pages/dashboard/frontend-config.tsx b/packages/nicolium/src/pages/dashboard/frontend-config.tsx index a8cc97236..fdd1b20cb 100644 --- a/packages/nicolium/src/pages/dashboard/frontend-config.tsx +++ b/packages/nicolium/src/pages/dashboard/frontend-config.tsx @@ -47,51 +47,12 @@ const messages = defineMessages({ id: 'frontend_config.crypto_donate_panel_limit.meta_fields.limit_placeholder', defaultMessage: 'Number of items to display in the crypto homepage widget', }, - rawJSONLabel: { - id: 'frontend_config.raw_json_label', - defaultMessage: 'Advanced: Edit raw JSON data', - }, - rawJSONHint: { - id: 'frontend_config.raw_json_hint', - defaultMessage: - 'Edit the settings data directly. Changes made directly to the JSON file will override the form fields above. Click "Save" to apply your changes.', - }, rawJSONInvalid: { id: 'frontend_config.raw_json_invalid', defaultMessage: 'is invalid' }, - displayFqnLabel: { - id: 'frontend_config.display_fqn_label', - defaultMessage: 'Display domain (eg @user@domain) for local accounts.', - }, - greentextLabel: { - id: 'frontend_config.greentext_label', - defaultMessage: '>render greentext', - }, - mediaPreviewLabel: { - id: 'frontend_config.media_preview_label', - defaultMessage: 'Prefer preview media for thumbnails', - }, - mediaPreviewHint: { - id: 'frontend_config.media_preview_hint', - defaultMessage: - 'Some backends provide an optimized version of media for display in timelines. However, these preview images may be too small without additional configuration.', - }, tileServerLabel: { id: 'frontend_config.tile_server_label', defaultMessage: 'Map tile server' }, tileServerAttributionLabel: { id: 'frontend_config.tile_server_attribution_label', defaultMessage: 'Map tiles attribution', }, - redirectRootNoLoginLabel: { - id: 'frontend_config.redirect_root_no_login_label', - defaultMessage: 'Redirect homepage', - }, - redirectRootNoLoginHint: { - id: 'frontend_config.redirect_root_no_login_hint', - defaultMessage: 'Path to redirect the homepage when a user is not logged in.', - }, - sentryDsnLabel: { id: 'frontend_config.sentry_dsn_label', defaultMessage: 'Sentry DSN' }, - sentryDsnHint: { - id: 'frontend_config.sentry_dsn_hint', - defaultMessage: 'DSN URL for error reporting. Works with Sentry and GlitchTip.', - }, }); type ValueGetter = (e: React.ChangeEvent) => T2; @@ -350,7 +311,14 @@ const FrontendConfigEditor: React.FC = () => { - + + } + > e.target.checked)} @@ -358,11 +326,17 @@ const FrontendConfigEditor: React.FC = () => { ( - {children} - ), - })} + label={ + ( + {children} + ), + }} + /> + } > { + } + hint={ + + } > { + } + hint={ + + } > { + } + hint={ + + } > { draggable /> - + + } + > { /> - + + } + > { /> - + + } + > { draggable /> - + + } + > { + } expanded={jsonEditorExpanded} onToggle={toggleJSONEditor} > + } errors={jsonValid ? undefined : [intl.formatMessage(messages.rawJSONInvalid)]} >