import type { RuntimeTranslator } from '@/i18n/runtime'; import { type PolicySection } from './types'; import { CodeBlock } from '@/components/ui/code-block'; /** * ------------------------------------------------------------------ * 使用指南 (How To Use) * ------------------------------------------------------------------ */ export function createHowToUseSections(rt: RuntimeTranslator): PolicySection[] { return [ { value: 'quick-start', title: rt('1_quick_start_ef8fbb58'), content: (

{rt('a_guide_to_the_general_purpose_full_9cd8c987')}

), }, { value: 'auth-security', title: rt('2_authentication_and_security_settings_76967059'), content: (

{rt( 'the_platform_combines_authentication_methods_to_support_bc9f1772', )}

{rt('2_1_username_and_password_authentication_97184f8f')}

{rt('2_2_third_party_oidc_providers_f14083c8')}

{rt('users_can_link_external_accounts_from_their_c08d3f5a')}

  1. {rt('open_4540d74d')} {rt('settings_profile_32835b0d')}{' '} {rt('message_a173cce8')}
  2. {rt( 'under_linked_accounts_view_existing_connections_or_5151eb9b', )}
  3. {rt('after_linking_use_the_oidc_login_button_6095b15d')}
), children: [ { value: '2-1-login', title: rt('2_1_username_and_password_authentication_97184f8f'), }, { value: '2-2-oidc', title: rt('2_2_third_party_oidc_providers_f14083c8'), }, ], }, { value: 'access-token', title: rt('3_integrating_personal_access_tokens_af2647b5'), content: (

{rt('personal_access_tokens_allow_developers_and_third_9a242a0e')}

{rt('3_1_token_generation_and_storage_2b78c681')}

{rt('3_2_calling_apis_with_headers_fccd7b0d')}

{rt('use_your_saved_plaintext_token_with_either_3af53a05')}

{rt('method_1_authorization_bearer_header_2a9c2a6c')}

{rt('method_2_custom_x_access_token_header_4548169f')}

), children: [ { value: '3-1-generation', title: rt('3_1_token_generation_and_storage_2b78c681'), }, { value: '3-2-usage', title: rt('3_2_calling_apis_with_headers_fccd7b0d'), }, ], }, { value: 'config-system', title: rt('4_dynamic_system_configuration_b3bf8c49'), content: (

{rt('the_built_in_key_value_configuration_module_713f6d05')}

), }, { value: 'worker-scheduler', title: rt('5_background_tasks_and_scheduling_7142ce96'), content: (

{rt('cobra_provides_separate_commands_so_worker_services_1bbae2df')}

), }, { value: 'tracing-metrics', title: rt('6_distributed_tracing_and_structured_logs_e8971cad'), content: (

{rt( 'the_platform_integrates_monitoring_components_for_observability_2b1da50f', )}

), }, ]; }