From f6e7d3ccf13afc23b1a4a73d650c03a187314d03 Mon Sep 17 00:00:00 2001 From: vkamn Date: Thu, 9 Oct 2025 23:22:58 +0800 Subject: [PATCH] fix: minor ui fixes (#1917) * feat: improve storage processing * fix: minor ui fixes --- client/core/controllers/gatewayController.cpp | 5 +++-- client/ui/qml/Pages2/PageSettings.qml | 6 +++++- client/ui/qml/Pages2/PageSetupWizardViewConfig.qml | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/client/core/controllers/gatewayController.cpp b/client/core/controllers/gatewayController.cpp index 8bc0939cd..f626189e1 100644 --- a/client/core/controllers/gatewayController.cpp +++ b/client/core/controllers/gatewayController.cpp @@ -192,11 +192,12 @@ QStringList GatewayController::getProxyUrls(const QString &serviceType, const QS QStringList proxyStorageUrls; if (!serviceType.isEmpty()) { for (const auto &baseUrl : baseUrls) { - proxyStorageUrls.push_back(baseUrl + "-" + serviceType + "-" + userCountryCode + ".json"); + QByteArray path = ("endpoints-" + serviceType + "-" + userCountryCode).toUtf8(); + proxyStorageUrls.push_back(baseUrl + path.toBase64(QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals) + ".json"); } } for (const auto &baseUrl : baseUrls) { - proxyStorageUrls.push_back(baseUrl + ".json"); + proxyStorageUrls.push_back(baseUrl + "endpoints.json"); } for (const auto &proxyStorageUrl : proxyStorageUrls) { diff --git a/client/ui/qml/Pages2/PageSettings.qml b/client/ui/qml/Pages2/PageSettings.qml index 1b03c93d0..f6647d321 100644 --- a/client/ui/qml/Pages2/PageSettings.qml +++ b/client/ui/qml/Pages2/PageSettings.qml @@ -136,9 +136,13 @@ PageType { readonly property string leftImagePath: NewsModel.hasUnread ? "qrc:/images/controls/news-unread.svg" : "qrc:/images/controls/news.svg" property bool isVisible: ServersModel.hasServersFromGatewayApi readonly property var clickedHandler: function() { - if (!ServersModel.hasServersFromGatewayApi) return; + if (!ServersModel.hasServersFromGatewayApi) { + return; + } + PageController.showBusyIndicator(true) ApiNewsController.fetchNews(); PageController.goToPage(PageEnum.PageSettingsNewsNotifications) + PageController.showBusyIndicator(false) } } diff --git a/client/ui/qml/Pages2/PageSetupWizardViewConfig.qml b/client/ui/qml/Pages2/PageSetupWizardViewConfig.qml index bffa66a20..ebdb02eaa 100644 --- a/client/ui/qml/Pages2/PageSetupWizardViewConfig.qml +++ b/client/ui/qml/Pages2/PageSetupWizardViewConfig.qml @@ -35,6 +35,7 @@ PageType { target: ImportController function onImportErrorOccurred(error, goToPageHome) { + PageController.showBusyIndicator(false) if (goToPageHome) { PageController.goToStartPage() } else { @@ -43,6 +44,7 @@ PageType { } function onImportFinished() { + PageController.showBusyIndicator(false) if (!ConnectionController.isConnected) { ServersModel.setDefaultServerIndex(ServersModel.getServersCount() - 1); ServersModel.processedIndex = ServersModel.defaultIndex @@ -216,6 +218,7 @@ PageType { if (cloakingCheckBoxItem.checked) { ImportController.processNativeWireGuardConfig() } + PageController.showBusyIndicator(true) ImportController.importConfig() } }