Move remaining code to app module
There's still some stuff that could potentially go elsewhere but I think it's enough for now.
This commit is contained in:
28
src/app/qml/ConfirmUrlDialog.qml
Normal file
28
src/app/qml/ConfirmUrlDialog.qml
Normal file
@@ -0,0 +1,28 @@
|
||||
// SPDX-FileCopyrightText: 2024 Tobias Fella <tobias.fella@kde.org>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
Kirigami.PromptDialog {
|
||||
id: root
|
||||
|
||||
property url link
|
||||
|
||||
title: i18nc("@title:dialog", "Open URL")
|
||||
subtitle: xi18nc("@info", "Do you want to open <link>%1</link>?", root.link)
|
||||
dialogType: Kirigami.PromptDialog.Warning
|
||||
|
||||
standardButtons: QQC2.DialogButtonBox.Open | QQC2.DialogButtonBox.Cancel
|
||||
|
||||
onAccepted: {
|
||||
Qt.openUrlExternally(root.link);
|
||||
root.close();
|
||||
}
|
||||
|
||||
onRejected: {
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user