@@ -324,11 +324,26 @@ def create_tab_ui(self, layout, session, testnet, exchange, settings=None):
324324 funding_web_view = QWebEngineView ()
325325 page = QWebEnginePage (profile , funding_web_view ) # Створюємо сторінку з профілем
326326 funding_web_view .setPage (page ) # Призначаємо сторінку з профілем до QWebEngineView
327- funding_web_view .setMinimumHeight (300 ) # Залишаємо висоту
328- layout .addWidget (funding_web_view )
327+ funding_web_view .setMinimumHeight (150 ) # Зменшуємо висоту
329328 tab_data ["funding_web_view" ] = funding_web_view
330329 tab_data ["web_profile" ] = profile # Зберігаємо профіль у tab_data для подальшого використання
331330 self .update_tab_funding_web_view (tab_data )
331+ #
332+ # Додаємо Coinglass view
333+ coinglass_profile = QWebEngineProfile (f"CoinglassProfile_{ self .tab_count } " , self )
334+ coinglass_cache_path = os .path .join (os .getcwd (), "webcache" , f"coinglass_tab_{ self .tab_count } " )
335+ os .makedirs (coinglass_cache_path , exist_ok = True )
336+ coinglass_profile .setCachePath (coinglass_cache_path )
337+ coinglass_profile .setPersistentStoragePath (coinglass_cache_path )
338+ coinglass_profile .setPersistentCookiesPolicy (QWebEngineProfile .PersistentCookiesPolicy .AllowPersistentCookies )
339+
340+ coinglass_view = QWebEngineView ()
341+ coinglass_page = QWebEnginePage (coinglass_profile , coinglass_view )
342+ coinglass_view .setPage (coinglass_page )
343+ coinglass_view .setMinimumHeight (150 )
344+ coinglass_view .setUrl (QUrl ("https://www.coinglass.com/FundingRate" ))
345+ tab_data ["coinglass_view" ] = coinglass_view
346+ tab_data ["coinglass_profile" ] = coinglass_profile
332347#
333348 price_label = QLabel (self .translations [self .language ]["price_label" ])
334349 balance_label = QLabel (self .translations [self .language ]["balance_label" ])
@@ -381,7 +396,12 @@ def create_tab_ui(self, layout, session, testnet, exchange, settings=None):
381396
382397 hbox = QHBoxLayout ()
383398 hbox .addLayout (left_layout , 1 )
384- hbox .addWidget (funding_web_view , 1 )
399+
400+ right_layout = QVBoxLayout ()
401+ right_layout .addWidget (funding_web_view )
402+ right_layout .addWidget (coinglass_view )
403+
404+ hbox .addLayout (right_layout , 1 )
385405
386406 layout .addLayout (hbox )
387407 tab_data .update ({
@@ -952,7 +972,8 @@ def update_tab_funding_web_view(self, tab_data):
952972 tab_data ["funding_web_view" ].setUrl (QUrl (url ))
953973 tab_data ["funding_web_view" ].setVisible (True )
954974 else :
955- tab_data ["funding_web_view" ].setVisible (False ) # Ховаємо для Binance
975+ tab_data ["funding_web_view" ].setVisible (False )
976+ tab_data ["coinglass_view" ].setVisible (True ) # Завжди показувати Coinglass
956977#
957978 def closeEvent (self , event ):
958979 for tab_data in self .tab_data_list :
0 commit comments