Added edit url button

This commit is contained in:
thezephyrsong
2026-06-17 13:06:39 +10:00
parent d599665f69
commit d2b6ec5c60
138 changed files with 1901 additions and 1972 deletions
+43 -1
View File
@@ -175,6 +175,19 @@ Page {
hoverEnabled: true
}
MenuItem {
id: changeUrlButton
text: qsTr("change url")
icon.name: "edit-link"
enabled: addon.status == Addon.Status.Ready || addon.status == Addon.Status.Error
hoverEnabled: true
onTriggered: {
urlDialog.addon = addon
urlDialog.newUrlText = addon.getUrl().toString()
urlDialog.visible = true
}
}
MenuItem {
id: repairButton
hoverEnabled: true
@@ -263,4 +276,33 @@ Page {
}
}
}
}
Dialog {
property Addon addon
property alias newUrlText: urlInput.text
id: urlDialog
parent: window.overlay
x: (parent.width - width) / 1.5
y: (parent.height - height) / 2
title: addon ? qsTr("Change URL for %1").arg(addon.name) : ""
standardButtons: Dialog.Save | Dialog.Cancel
onAccepted: {
if (addon && urlInput.text !== "") {
addon.setRemoteUrl(urlInput.text)
}
}
ColumnLayout {
anchors.fill: parent
Label {
text: "New Git Repository URL:"
}
TextField {
id: urlInput
Layout.fillWidth: true
selectByMouse: true
placeholderText: "https://github.com/user/repo.git"
}
}
}
}