2023-07-11 17:10:26 +02:00
|
|
|
|
import QtQuick 2.13
|
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
|
|
2025-01-21 17:17:08 -03:00
|
|
|
|
import StatusQ 0.1
|
2024-07-12 11:46:43 +02:00
|
|
|
|
import StatusQ.Controls 0.1
|
2025-01-21 17:17:08 -03:00
|
|
|
|
import StatusQ.Components 0.1
|
2023-07-11 17:10:26 +02:00
|
|
|
|
import StatusQ.Core 0.1
|
2024-07-12 11:46:43 +02:00
|
|
|
|
import StatusQ.Core.Backpressure 0.1
|
2023-07-11 17:10:26 +02:00
|
|
|
|
import StatusQ.Core.Theme 0.1
|
2025-01-21 17:17:08 -03:00
|
|
|
|
import StatusQ.Core.Utils 0.1
|
2024-07-12 11:46:43 +02:00
|
|
|
|
import StatusQ.Popups 0.1
|
2023-07-11 17:10:26 +02:00
|
|
|
|
|
2025-01-21 17:17:08 -03:00
|
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
|
|
2023-07-11 17:10:26 +02:00
|
|
|
|
import shared.panels 1.0
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
property var network
|
2025-01-24 18:21:29 -03:00
|
|
|
|
property var rpcProviders
|
2023-07-11 17:10:26 +02:00
|
|
|
|
property var networksModule
|
2024-02-12 14:13:36 +01:00
|
|
|
|
property var networkRPCChanged
|
2023-09-04 17:36:28 +02:00
|
|
|
|
signal evaluateRpcEndPoint(string url, bool isMainUrl)
|
2025-01-21 17:17:08 -03:00
|
|
|
|
signal updateNetworkValues(int chainId, string newMainRpcInput, string newFailoverRpcUrl)
|
2023-07-11 17:10:26 +02:00
|
|
|
|
|
|
|
|
|
enum EvaluationState {
|
|
|
|
|
UnTouched,
|
|
|
|
|
Pending,
|
|
|
|
|
Verified,
|
|
|
|
|
InvalidURL,
|
2023-09-04 17:36:28 +02:00
|
|
|
|
PingUnsuccessful,
|
2023-09-15 10:13:21 +02:00
|
|
|
|
SameAsOther,
|
2023-10-06 14:33:33 +02:00
|
|
|
|
NotSameChain,
|
2024-02-12 14:13:36 +01:00
|
|
|
|
Empty,
|
|
|
|
|
RestartRequired
|
2023-07-11 17:10:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
|
id: d
|
2025-01-21 17:17:08 -03:00
|
|
|
|
|
|
|
|
|
readonly property SortFilterProxyModel userRpcProvidersModel: SortFilterProxyModel {
|
2025-01-24 18:21:29 -03:00
|
|
|
|
sourceModel: root.rpcProviders
|
|
|
|
|
filters: [
|
|
|
|
|
ValueFilter { roleName: "chainId"; value: network.chainId },
|
|
|
|
|
ValueFilter { roleName: "providerType"; value: Constants.rpcProviderTypes.user }
|
|
|
|
|
]
|
2025-01-21 17:17:08 -03:00
|
|
|
|
}
|
|
|
|
|
readonly property int userRpcProvidersModelCount: d.userRpcProvidersModel.ModelCount.count ?? 0
|
|
|
|
|
|
|
|
|
|
property var mainRpcProvider
|
|
|
|
|
readonly property string mainRpcProviderUrl: !!d.mainRpcProvider ? d.mainRpcProvider.url : ""
|
|
|
|
|
property var fallbackRpcProvider
|
|
|
|
|
readonly property string fallbackRpcProviderUrl: !!d.fallbackRpcProvider ? d.fallbackRpcProvider.url : ""
|
|
|
|
|
|
|
|
|
|
function fetchProviders() {
|
|
|
|
|
mainRpcProvider = d.userRpcProvidersModelCount > 0 ? ModelUtils.get(d.userRpcProvidersModel, 0) : undefined
|
|
|
|
|
fallbackRpcProvider = d.userRpcProvidersModelCount > 1 ? ModelUtils.get(d.userRpcProvidersModel, 1) : undefined
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onUserRpcProvidersModelCountChanged: d.fetchProviders()
|
|
|
|
|
Component.onCompleted: d.fetchProviders()
|
|
|
|
|
|
2023-09-04 17:36:28 +02:00
|
|
|
|
property int evaluationStatusMainRpc: EditNetworkForm.UnTouched
|
2023-07-11 17:10:26 +02:00
|
|
|
|
property int evaluationStatusFallBackRpc: EditNetworkForm.UnTouched
|
2023-09-04 17:36:28 +02:00
|
|
|
|
property var evaluateRpcEndPoint: Backpressure.debounce(root, 400, function (value, isMainUrl) {
|
2023-07-18 16:02:03 +02:00
|
|
|
|
if(!Utils.isURL(value)) {
|
2023-09-04 17:36:28 +02:00
|
|
|
|
if(isMainUrl)
|
|
|
|
|
d.evaluationStatusMainRpc = EditNetworkForm.InvalidURL
|
|
|
|
|
else
|
2023-07-18 16:02:03 +02:00
|
|
|
|
d.evaluationStatusFallBackRpc = EditNetworkForm.InvalidURL
|
|
|
|
|
return
|
|
|
|
|
}
|
2023-09-04 17:36:28 +02:00
|
|
|
|
root.evaluateRpcEndPoint(value, isMainUrl)
|
2023-07-11 17:10:26 +02:00
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function getUrlStatusText(status, text) {
|
|
|
|
|
switch(status) {
|
|
|
|
|
case EditNetworkForm.Pending:
|
|
|
|
|
return qsTr("Checking RPC...")
|
|
|
|
|
case EditNetworkForm.InvalidURL:
|
|
|
|
|
return qsTr("What is %1? This isn’t a URL 😒").arg(text)
|
|
|
|
|
case EditNetworkForm.PingUnsuccessful:
|
|
|
|
|
return qsTr("RPC appears to be either offline or this is not a valid JSON RPC endpoint URL")
|
|
|
|
|
case EditNetworkForm.Verified:
|
|
|
|
|
return qsTr("RPC successfully reached")
|
2023-09-04 17:36:28 +02:00
|
|
|
|
case EditNetworkForm.SameAsOther:
|
2025-01-21 17:17:08 -03:00
|
|
|
|
return qsTr("JSON RPC URLs are the same")
|
2023-10-06 14:33:33 +02:00
|
|
|
|
case EditNetworkForm.NotSameChain:
|
|
|
|
|
return qsTr("Chain ID returned from JSON RPC doesn’t match %1").arg(network.chainName)
|
2024-02-12 14:13:36 +01:00
|
|
|
|
case EditNetworkForm.RestartRequired:
|
|
|
|
|
return qsTr("Restart required for changes to take effect")
|
2023-07-11 17:10:26 +02:00
|
|
|
|
default: return ""
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-05 17:27:30 +02:00
|
|
|
|
|
|
|
|
|
function getErrorMessageColor(status) {
|
|
|
|
|
switch(status) {
|
|
|
|
|
case EditNetworkForm.Pending:
|
|
|
|
|
return Theme.palette.baseColor1
|
|
|
|
|
case EditNetworkForm.SameAsOther:
|
2023-10-06 14:33:33 +02:00
|
|
|
|
case EditNetworkForm.NotSameChain:
|
2024-02-12 14:13:36 +01:00
|
|
|
|
case EditNetworkForm.RestartRequired:
|
2023-09-05 17:27:30 +02:00
|
|
|
|
return Theme.palette.warningColor1
|
|
|
|
|
case EditNetworkForm.Verified:
|
|
|
|
|
return Theme.palette.successColor1
|
|
|
|
|
default: return Theme.palette.dangerColor1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getErrorMessageAlignment(status) {
|
|
|
|
|
switch(status) {
|
|
|
|
|
case EditNetworkForm.Pending:
|
|
|
|
|
case EditNetworkForm.Verified:
|
|
|
|
|
case EditNetworkForm.SameAsOther:
|
2023-10-06 14:33:33 +02:00
|
|
|
|
case EditNetworkForm.NotSameChain:
|
2024-02-12 14:13:36 +01:00
|
|
|
|
case EditNetworkForm.RestartRequired:
|
2023-09-05 17:27:30 +02:00
|
|
|
|
return Text.AlignLeft
|
|
|
|
|
default: return Text.AlignRight
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-19 13:42:25 +02:00
|
|
|
|
|
2024-01-16 13:47:23 +01:00
|
|
|
|
function save() {
|
2024-07-10 13:07:34 +02:00
|
|
|
|
if (d.evaluationStatusMainRpc == EditNetworkForm.UnTouched && d.evaluationStatusFallBackRpc == EditNetworkForm.UnTouched) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-16 13:47:23 +01:00
|
|
|
|
let main = mainRpcInput.text
|
|
|
|
|
let fallback = failoverRpcUrlInput.text
|
2025-01-21 17:17:08 -03:00
|
|
|
|
root.updateNetworkValues(network.chainId, main, fallback)
|
2024-02-12 14:13:36 +01:00
|
|
|
|
root.networkRPCChanged[network.chainId] = true
|
2024-01-16 13:47:23 +01:00
|
|
|
|
}
|
2023-07-11 17:10:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
target: networksModule
|
2023-09-04 17:36:28 +02:00
|
|
|
|
function onChainIdFetchedForUrl(url, chainId, success, isMainUrl) {
|
2023-07-12 07:58:33 +02:00
|
|
|
|
let status = EditNetworkForm.PingUnsuccessful
|
|
|
|
|
if(success) {
|
2023-10-06 14:33:33 +02:00
|
|
|
|
if (network.chainId !== chainId) {
|
|
|
|
|
status = EditNetworkForm.NotSameChain
|
|
|
|
|
}
|
|
|
|
|
else if((isMainUrl && url === network.fallbackURL) ||
|
2023-09-04 17:36:28 +02:00
|
|
|
|
(!isMainUrl && url === network.rpcURL)) {
|
|
|
|
|
status = EditNetworkForm.SameAsOther
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
status = EditNetworkForm.Verified
|
2023-07-11 17:10:26 +02:00
|
|
|
|
}
|
2023-09-04 17:36:28 +02:00
|
|
|
|
if(isMainUrl)
|
|
|
|
|
d.evaluationStatusMainRpc = status
|
|
|
|
|
else
|
2024-07-10 13:07:34 +02:00
|
|
|
|
d.evaluationStatusFallBackRpc = status
|
2023-07-11 17:10:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
spacing: 20
|
|
|
|
|
|
|
|
|
|
StatusInput {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
label: qsTr("Network name")
|
2023-10-02 18:45:27 +06:00
|
|
|
|
input.edit.objectName: "editNetworkNameInput"
|
2023-07-11 17:10:26 +02:00
|
|
|
|
text: !!network ? network.chainName : ""
|
|
|
|
|
input.enabled: false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusInput {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
label: qsTr("Short name")
|
2023-10-02 18:45:27 +06:00
|
|
|
|
input.edit.objectName: "editNetworkShortNameInput"
|
2023-07-11 17:10:26 +02:00
|
|
|
|
text: !!network ? network.shortName : ""
|
|
|
|
|
input.enabled: false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusInput {
|
|
|
|
|
Layout.fillWidth: true
|
2023-10-02 18:45:27 +06:00
|
|
|
|
input.edit.objectName: "editNetworkChainIdInput"
|
2023-07-11 17:10:26 +02:00
|
|
|
|
label: qsTr("Chain ID")
|
|
|
|
|
text: !!network ? network.chainId : ""
|
|
|
|
|
input.enabled: false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusInput {
|
|
|
|
|
Layout.fillWidth: true
|
2023-10-02 18:45:27 +06:00
|
|
|
|
input.edit.objectName: "editNetworkSymbolInput"
|
2023-07-11 17:10:26 +02:00
|
|
|
|
label: qsTr("Native Token Symbol")
|
|
|
|
|
text: !!network ? network.nativeCurrencySymbol : ""
|
|
|
|
|
input.enabled: false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.preferredHeight: childrenRect.height
|
|
|
|
|
StatusInput {
|
|
|
|
|
id: mainRpcInput
|
2023-10-04 17:45:47 +06:00
|
|
|
|
objectName: "mainRpcInputObject"
|
2023-10-02 18:45:27 +06:00
|
|
|
|
input.edit.objectName: "editNetworkMainRpcInput"
|
2023-07-11 17:10:26 +02:00
|
|
|
|
width: parent.width
|
2025-01-21 17:17:08 -03:00
|
|
|
|
label: qsTr("User JSON RPC URL #1")
|
|
|
|
|
text: d.mainRpcProviderUrl
|
2023-07-11 17:10:26 +02:00
|
|
|
|
onTextChanged: {
|
2023-09-15 10:13:21 +02:00
|
|
|
|
if (text === "") {
|
|
|
|
|
d.evaluationStatusMainRpc = EditNetworkForm.Empty
|
|
|
|
|
return
|
2024-02-12 14:13:36 +01:00
|
|
|
|
} else {
|
2025-01-21 17:17:08 -03:00
|
|
|
|
if (d.mainRpcProviderUrl === text) {
|
2023-10-06 14:33:33 +02:00
|
|
|
|
d.evaluationStatusMainRpc = EditNetworkForm.UnTouched
|
2024-02-12 14:13:36 +01:00
|
|
|
|
if (root.networkRPCChanged[network.chainId]) {
|
|
|
|
|
d.evaluationStatusMainRpc = EditNetworkForm.RestartRequired
|
|
|
|
|
}
|
2023-10-06 14:33:33 +02:00
|
|
|
|
} else {
|
|
|
|
|
d.evaluationStatusMainRpc = EditNetworkForm.Pending
|
|
|
|
|
Qt.callLater(d.evaluateRpcEndPoint, text, true);
|
|
|
|
|
}
|
2023-07-11 17:10:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-05 17:27:30 +02:00
|
|
|
|
errorMessageCmp.horizontalAlignment: d.getErrorMessageAlignment(d.evaluationStatusMainRpc)
|
2023-09-04 17:36:28 +02:00
|
|
|
|
errorMessageCmp.visible: d.evaluationStatusMainRpc !== EditNetworkForm.UnTouched
|
2023-09-15 10:13:21 +02:00
|
|
|
|
|
2023-09-05 17:27:30 +02:00
|
|
|
|
errorMessageCmp.color: d.getErrorMessageColor(d.evaluationStatusMainRpc)
|
2025-01-21 17:17:08 -03:00
|
|
|
|
errorMessageCmp.text: d.getUrlStatusText(d.evaluationStatusMainRpc, text)
|
2023-07-11 17:10:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-16 13:47:23 +01:00
|
|
|
|
Item {
|
2023-07-11 17:10:26 +02:00
|
|
|
|
Layout.fillWidth: true
|
2024-01-16 13:47:23 +01:00
|
|
|
|
Layout.preferredHeight: childrenRect.height
|
|
|
|
|
StatusInput {
|
|
|
|
|
id: failoverRpcUrlInput
|
|
|
|
|
objectName: "failoverRpcUrlInputObject"
|
|
|
|
|
input.edit.objectName: "editNetworkFailoverRpcUrlInput"
|
|
|
|
|
width: parent.width
|
2025-01-21 17:17:08 -03:00
|
|
|
|
label: qsTr("User JSON RPC URL #2")
|
|
|
|
|
text: d.fallbackRpcProviderUrl
|
2024-01-16 13:47:23 +01:00
|
|
|
|
onTextChanged: {
|
|
|
|
|
if (text === "") {
|
|
|
|
|
d.evaluationStatusFallBackRpc = EditNetworkForm.Empty
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 17:17:08 -03:00
|
|
|
|
if (d.fallbackRpcProviderUrl === text) {
|
2023-10-06 14:33:33 +02:00
|
|
|
|
d.evaluationStatusFallBackRpc = EditNetworkForm.UnTouched
|
2024-02-12 14:13:36 +01:00
|
|
|
|
if (root.networkRPCChanged[network.chainId]) {
|
|
|
|
|
d.evaluationStatusFallBackRpc = EditNetworkForm.RestartRequired
|
|
|
|
|
}
|
2023-10-06 14:33:33 +02:00
|
|
|
|
} else {
|
|
|
|
|
d.evaluationStatusFallBackRpc = EditNetworkForm.Pending
|
|
|
|
|
Qt.callLater(d.evaluateRpcEndPoint, text, false);
|
|
|
|
|
}
|
2023-07-11 17:10:26 +02:00
|
|
|
|
}
|
2024-01-16 13:47:23 +01:00
|
|
|
|
errorMessageCmp.horizontalAlignment: d.getErrorMessageAlignment(d.evaluationStatusFallBackRpc)
|
|
|
|
|
errorMessageCmp.visible: d.evaluationStatusFallBackRpc !== EditNetworkForm.UnTouched
|
|
|
|
|
errorMessageCmp.text: d.getUrlStatusText(d.evaluationStatusFallBackRpc, text)
|
|
|
|
|
errorMessageCmp.color: d.getErrorMessageColor(d.evaluationStatusFallBackRpc)
|
2023-07-11 17:10:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusInput {
|
2023-10-02 18:45:27 +06:00
|
|
|
|
input.edit.objectName: "editNetworkExplorerInput"
|
2023-07-11 17:10:26 +02:00
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
label: qsTr("Block Explorer")
|
|
|
|
|
text: !!network ? network.blockExplorerURL : ""
|
|
|
|
|
input.enabled: false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusCheckBox {
|
|
|
|
|
id: warningCheckbox
|
2023-10-02 18:45:27 +06:00
|
|
|
|
objectName: "editNetworkAknowledgmentCheckbox"
|
2023-07-11 17:10:26 +02:00
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
text: qsTr("I understand that changing network settings can cause unforeseen issues, errors, security risks and potentially even loss of funds.")
|
|
|
|
|
checkState: Qt.Unchecked
|
|
|
|
|
font.pixelSize: 15
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Separator {}
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
|
StatusButton {
|
2023-10-02 18:45:27 +06:00
|
|
|
|
objectName: "editNetworkSaveButton"
|
2023-07-11 17:10:26 +02:00
|
|
|
|
text: qsTr("Save Changes")
|
2023-09-15 10:13:21 +02:00
|
|
|
|
enabled: (
|
2024-07-10 13:07:34 +02:00
|
|
|
|
d.evaluationStatusMainRpc === EditNetworkForm.Verified ||
|
|
|
|
|
d.evaluationStatusFallBackRpc === EditNetworkForm.Verified ||
|
|
|
|
|
d.evaluationStatusMainRpc === EditNetworkForm.SameAsOther ||
|
2023-09-15 10:13:21 +02:00
|
|
|
|
d.evaluationStatusFallBackRpc === EditNetworkForm.SameAsOther ||
|
2023-10-06 14:33:33 +02:00
|
|
|
|
d.evaluationStatusMainRpc === EditNetworkForm.Empty ||
|
|
|
|
|
d.evaluationStatusFallBackRpc === EditNetworkForm.Empty ||
|
|
|
|
|
d.evaluationStatusMainRpc === EditNetworkForm.NotSameChain ||
|
2024-02-12 14:13:36 +01:00
|
|
|
|
d.evaluationStatusFallBackRpc === EditNetworkForm.NotSameChain ||
|
|
|
|
|
d.evaluationStatusMainRpc === EditNetworkForm.RestartRequired ||
|
|
|
|
|
d.evaluationStatusFallBackRpc === EditNetworkForm.RestartRequired
|
2023-09-15 10:13:21 +02:00
|
|
|
|
) && warningCheckbox.checked
|
|
|
|
|
|
2023-09-19 13:42:25 +02:00
|
|
|
|
onClicked: {
|
2024-01-16 13:47:23 +01:00
|
|
|
|
Global.openPopup(confirmationDialogComponent)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Component {
|
|
|
|
|
id: confirmationDialogComponent
|
|
|
|
|
StatusModal {
|
|
|
|
|
headerSettings.title: qsTr("RPC URL change requires app restart")
|
|
|
|
|
contentItem: Item {
|
|
|
|
|
width: parent.width
|
|
|
|
|
implicitHeight: childrenRect.height
|
|
|
|
|
Column {
|
|
|
|
|
width: parent.width - 32
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2023-09-19 13:42:25 +02:00
|
|
|
|
|
2024-01-16 13:47:23 +01:00
|
|
|
|
Item {
|
|
|
|
|
width: parent.width
|
|
|
|
|
height: 16
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusBaseText {
|
2024-07-17 15:07:35 +07:00
|
|
|
|
objectName: "mustBeRestartedText"
|
2024-01-16 13:47:23 +01:00
|
|
|
|
text: qsTr("For new JSON RPC URLs to take effect, Status must be restarted. Are you ready to do this now?")
|
|
|
|
|
font.pixelSize: 15
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
width: parent.width
|
|
|
|
|
height: 16
|
|
|
|
|
}
|
2023-09-19 13:42:25 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-01-16 13:47:23 +01:00
|
|
|
|
|
|
|
|
|
rightButtons: [
|
|
|
|
|
StatusFlatButton {
|
|
|
|
|
id: laterButton
|
2024-07-17 15:07:35 +07:00
|
|
|
|
objectName: "laterButton"
|
2024-01-16 13:47:23 +01:00
|
|
|
|
text: qsTr("Save and restart later")
|
|
|
|
|
type: StatusBaseButton.Type.Normal
|
|
|
|
|
onClicked: {
|
|
|
|
|
close()
|
|
|
|
|
d.save()
|
2024-07-10 13:07:34 +02:00
|
|
|
|
d.evaluationStatusMainRpc = EditNetworkForm.RestartRequired
|
2024-01-16 13:47:23 +01:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
StatusButton {
|
|
|
|
|
id: saveButton
|
2024-07-17 15:07:35 +07:00
|
|
|
|
objectName: "saveButton"
|
2024-01-16 13:47:23 +01:00
|
|
|
|
type: StatusBaseButton.Type.Normal
|
|
|
|
|
text: qsTr("Save and restart Status")
|
|
|
|
|
focus: true
|
|
|
|
|
Keys.onReturnPressed: function(event) {
|
|
|
|
|
saveButton.clicked()
|
|
|
|
|
}
|
|
|
|
|
onClicked: {
|
|
|
|
|
close()
|
|
|
|
|
d.save()
|
|
|
|
|
Qt.quit()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2023-07-11 17:10:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|