From b6d4b43fb730a830eb3e51ad86da4e77209334ef Mon Sep 17 00:00:00 2001 From: MrMirDan Date: Wed, 25 Feb 2026 11:53:23 +0200 Subject: [PATCH] update: xray server can be removed and rebooted --- client/images/controls/arrow-down.svg | 4 ++++ client/images/controls/arrow-up.svg | 4 ++++ client/resources.qrc | 2 ++ .../qml/Pages2/PageSettingsXRayServerInfo.qml | 18 ++++++++---------- 4 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 client/images/controls/arrow-down.svg create mode 100644 client/images/controls/arrow-up.svg diff --git a/client/images/controls/arrow-down.svg b/client/images/controls/arrow-down.svg new file mode 100644 index 000000000..e5410c468 --- /dev/null +++ b/client/images/controls/arrow-down.svg @@ -0,0 +1,4 @@ + + + + diff --git a/client/images/controls/arrow-up.svg b/client/images/controls/arrow-up.svg new file mode 100644 index 000000000..f7b8f28d1 --- /dev/null +++ b/client/images/controls/arrow-up.svg @@ -0,0 +1,4 @@ + + + + diff --git a/client/resources.qrc b/client/resources.qrc index e92661613..ef1bea88e 100644 --- a/client/resources.qrc +++ b/client/resources.qrc @@ -7,8 +7,10 @@ images/controls/amnezia.svg images/controls/app.svg images/controls/archive-restore.svg + images/controls/arrow-down.svg images/controls/arrow-left.svg images/controls/arrow-right.svg + images/controls/arrow-up.svg images/controls/bug.svg images/controls/check.svg images/controls/chevron-down.svg diff --git a/client/ui/qml/Pages2/PageSettingsXRayServerInfo.qml b/client/ui/qml/Pages2/PageSettingsXRayServerInfo.qml index e296f61af..fc1312f70 100644 --- a/client/ui/qml/Pages2/PageSettingsXRayServerInfo.qml +++ b/client/ui/qml/Pages2/PageSettingsXRayServerInfo.qml @@ -29,7 +29,7 @@ PageType { readonly property string title: qsTr("Configuration Last Update") readonly property string contentKey: "20 dec 2024 22:10" - readonly property string objectImageSource: "qrc:/images/controls/info.svg" // reload img + readonly property string objectImageSource: "qrc:/images/controls/refresh-cw.svg" readonly property bool isRichText: true } @@ -38,7 +38,7 @@ PageType { readonly property string title: qsTr("Send") readonly property string contentKey: "48,9 MB" - readonly property string objectImageSource: "qrc:/images/controls/history.svg" // arrow-up img + readonly property string objectImageSource: "qrc:/images/controls/arrow-up.svg" readonly property bool isRichText: false } @@ -47,7 +47,7 @@ PageType { readonly property string title: qsTr("Downloaded") readonly property string contentKey: "2,78 GB" - readonly property string objectImageSource: "qrc:/images/controls/monitor.svg" // arrow-down img + readonly property string objectImageSource: "qrc:/images/controls/arrow-down.svg" readonly property bool isRichText: false } @@ -121,10 +121,10 @@ PageType { spacing: 0 /* Connections { - target: ApiAccountInfoModel + target: ServersModel function onModelReset() { - delegateItem.rightText = ApiAccountInfoModel.data(contentKey) + delegateItem.rightText = ServersModel.data(contentKey) } } */ @@ -136,7 +136,7 @@ PageType { imageSource: objectImageSource leftText: title - rightText: contentKey // ApiAccountInfoModel.data(contentKey) + rightText: contentKey // ServersModel.data(contentKey) rightTextFormat: isRichText ? Text.RichText : Text.PlainText visible: rightText !== "" @@ -174,8 +174,7 @@ PageType { PageController.showNotificationMessage(qsTr("Cannot reload config during active connection")) } else { PageController.showBusyIndicator(true) - // TODO: server config reload function - PageController.showNotificationMessage(qsTr("Config reloaded")) + InstallController.rebootProcessedServer() PageController.showBusyIndicator(false) } } @@ -210,8 +209,7 @@ PageType { PageController.showNotificationMessage(qsTr("Cannot remove server during active connection")) } else { PageController.showBusyIndicator(true) - // TODO: server remove function - PageController.showNotificationMessage(qsTr("Server removed")) + InstallController.removeProcessedServer() PageController.showBusyIndicator(false) } }