File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,8 +75,6 @@ pub async fn handle_update_config(
7575 new_bot_config. client_secret = current_config. bot . client_secret . clone ( ) ;
7676 }
7777
78- new_bot_config. ip = current_config. bot . ip . clone ( ) ;
79-
8078 let new_config = Config {
8179 bot : new_bot_config,
8280 command : update. command ,
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ pub async fn render_logs_page(
5353 log. id,
5454 log. ticket_id,
5555 format!(
56- "http://{}:3002 /panel/tickets/{}" ,
56+ "{} /panel/tickets/{}" ,
5757 & config. bot. ip. clone( ) . unwrap( ) ,
5858 log. ticket_id
5959 ) ,
Original file line number Diff line number Diff line change @@ -833,6 +833,21 @@ fn bot_section(props: &BotSectionProps) -> Html {
833833 } )
834834 } }
835835 />
836+
837+ <TextInput
838+ label={ i18n. t( "panel.configuration.bot.ip" ) }
839+ value={ config. bot. ip. clone( ) . unwrap_or_default( ) }
840+ help={ Some ( i18n. t( "panel.configuration.bot.ip_help" ) ) }
841+ placeholder={ Some ( "0.0.0.0" . to_string( ) ) }
842+ on_change={ {
843+ let config = config. clone( ) ;
844+ Callback :: from( move |val: String | {
845+ let mut cfg = ( * config) . clone( ) ;
846+ cfg. bot. ip = if val. is_empty( ) { None } else { Some ( val) } ;
847+ config. set( cfg) ;
848+ } )
849+ } }
850+ />
836851 </div>
837852 }
838853}
Original file line number Diff line number Diff line change 5858 "redirect_url" : " Redirect URL" ,
5959 "timezone" : " Timezone" ,
6060 "logs_channel_id" : " Logs Channel ID (optional)" ,
61- "features_channel_id" : " Features Channel ID (optional)"
61+ "features_channel_id" : " Features Channel ID (optional)" ,
62+ "ip" : " Server IP Address" ,
63+ "ip_help" : " IP address for the API server (optional)"
6264 },
6365 "server_mode" : {
6466 "type" : " Mode Type" ,
Original file line number Diff line number Diff line change 5858 "redirect_url" : " URL de redirection" ,
5959 "timezone" : " Fuseau horaire" ,
6060 "logs_channel_id" : " ID du canal de logs (optionnel)" ,
61- "features_channel_id" : " ID du canal de features (optionnel)"
61+ "features_channel_id" : " ID du canal de features (optionnel)" ,
62+ "ip" : " Adresse IP du serveur" ,
63+ "ip_help" : " Adresse IP pour le serveur API (optionnel)"
6264 },
6365 "server_mode" : {
6466 "type" : " Type de mode" ,
You can’t perform that action at this time.
0 commit comments