@@ -44,9 +44,9 @@ pub fn main_window(app: &AppState) -> Element<'_, AppMsg> {
4444 column ( )
4545 . width ( Length :: FillPortion ( 1 ) )
4646 . height ( Length :: Fill )
47+ . spacing ( 35 )
4748 . align_x ( Horizontal :: Center )
4849 . push ( network_adapter ( app) )
49- . push ( port ( app) )
5050 . push ( audio ( app) )
5151 . push ( vertical_space ( ) )
5252 . push ( connection_type ( app) ) ,
@@ -159,25 +159,6 @@ fn network_adapter(app: &AppState) -> Element<'_, AppMsg> {
159159 . into ( )
160160}
161161
162- fn port ( app : & AppState ) -> Element < ' _ , AppMsg > {
163- column ( )
164- . spacing ( 20 )
165- . align_x ( Horizontal :: Center )
166- . push ( text:: title4 ( fl ! ( "port" ) ) )
167- . push (
168- row ( )
169- . width ( Length :: Fill )
170- . spacing ( 5 )
171- . push (
172- text_input ( "" , & app. port_input )
173- . on_input ( AppMsg :: PortTextInput )
174- . width ( Length :: Fixed ( 150.0 ) ) ,
175- )
176- . push ( button:: text ( fl ! ( "save" ) ) . on_press ( AppMsg :: PortSave ) ) ,
177- )
178- . into ( )
179- }
180-
181162fn connection_type ( app : & AppState ) -> Element < ' _ , AppMsg > {
182163 let connection_mode = & app. config . data ( ) . connection_mode ;
183164
@@ -299,6 +280,22 @@ pub fn settings_window(app: &AppState) -> Element<'_, ConfigMsg> {
299280 . push ( horizontal_space ( ) ) ,
300281 ) ,
301282 )
283+ . push (
284+ settings:: section ( ) . title ( fl ! ( "title_connection" ) ) . add (
285+ row ( )
286+ . width ( Length :: Fill )
287+ . align_y ( Vertical :: Center )
288+ . spacing ( 5 )
289+ . push ( text ( fl ! ( "port" ) ) )
290+ . push ( horizontal_space ( ) )
291+ . push (
292+ text_input ( "" , & app. port_input )
293+ . on_input ( ConfigMsg :: PortTextInput )
294+ . width ( Length :: Fixed ( 150.0 ) ) ,
295+ )
296+ . push ( button:: text ( fl ! ( "save" ) ) . on_press ( ConfigMsg :: PortSave ) ) ,
297+ ) ,
298+ )
302299 . push (
303300 settings:: section ( )
304301 . title ( fl ! ( "denoise" ) )
0 commit comments