Remove link confirmation dialog

Fix #347
Fix #348
This commit is contained in:
Carl Schwan
2021-05-07 01:55:08 +02:00
parent 471b525151
commit 1e7d3046aa
4 changed files with 3 additions and 56 deletions

View File

@@ -126,12 +126,6 @@ Kirigami.ApplicationWindow {
showPassiveNotification(i18n("Warning: %1", message));
}
}
function onOpenLink(url) {
openLinkConfirmationComponent.createObject(QQC2.ApplicationWindow.overlay, {
url: url,
}).open();
}
}
function pushReplaceLayer(page, args) {
@@ -376,38 +370,4 @@ Kirigami.ApplicationWindow {
}
}
}
Component {
id: openLinkConfirmationComponent
Kirigami.OverlaySheet {
id: openLinkConfirmation
required property var url;
header: Kirigami.Heading {
text: i18n("Confirm opening a link")
}
parent: QQC2.ApplicationWindow.overlay
contentItem: ColumnLayout {
QQC2.Label {
text: i18n("Do you want to open the link to %1?", `<a href='${url}'>${url}</a>`)
wrapMode: Text.WordWrap
}
QQC2.CheckBox {
id: dontAskAgain
text: i18n("Don't ask again")
}
}
footer: QQC2.DialogButtonBox {
standardButtons: QQC2.DialogButtonBox.Ok | QQC2.DialogButtonBox.Cancel
onAccepted: {
Config.confirmLinksAction = !dontAskAgain.checked;
Config.save();
Qt.openUrlExternally(url);
openLinkConfirmation.close();
}
onRejected: openLinkConfirmation.close();
}
}
}
}