1212from feeluown .i18n import t
1313from feeluown .gui .widgets .magicbox import KeySourceIn
1414from feeluown .gui .widgets .header import MidHeader
15- from feeluown .gui .components import LyricButton , WatchButton
15+ from feeluown .gui .components import LyricButton , NetworkStatusButton , WatchButton
1616
1717
1818class _ProviderCheckBox (QCheckBox ):
@@ -73,6 +73,16 @@ def __init__(self, app, *args, **kwargs):
7373 self ._layout .addStretch (0 )
7474
7575
76+ class NetworkSettings (QWidget ):
77+ def __init__ (self , * args , ** kwargs ):
78+ super ().__init__ (* args , ** kwargs )
79+
80+ self .network_status_button = NetworkStatusButton ()
81+ self ._layout = QHBoxLayout (self )
82+ self ._layout .addWidget (self .network_status_button )
83+ self ._layout .addStretch (0 )
84+
85+
7686class AISettings (QWidget ):
7787 def __init__ (self , app , * args , ** kwargs ):
7888 super ().__init__ (* args , ** kwargs )
@@ -85,7 +95,7 @@ def __init__(self, app, *args, **kwargs):
8595 self ._layout .addWidget (self ._prompt_editor )
8696 self ._layout .addWidget (self ._save_btn )
8797 self ._prompt_editor .setPlainText (self ._app .config .AI_RADIO_PROMPT )
88- self ._prompt_editor .setMaximumHeight (200 )
98+ self ._prompt_editor .setMaximumHeight (96 )
8999
90100 self ._save_btn .clicked .connect (self .save_prompt )
91101
@@ -116,6 +126,10 @@ def render(self):
116126 self ._layout .addWidget (toolbar )
117127 self ._layout .addWidget (MidHeader (t ("ai-radio-prompt" )))
118128 self ._layout .addWidget (AISettings (self ._app ))
129+ self ._layout .addWidget (MidHeader (t ("network" )))
130+ network_settings = NetworkSettings ()
131+ self .network_status_button = network_settings .network_status_button
132+ self ._layout .addWidget (network_settings )
119133 self ._layout .addWidget (MidHeader (t ("player" )))
120134 self ._layout .addWidget (PlayerSettings (self ._app ))
121135 self ._layout .addStretch (0 )
0 commit comments