Files
neochat/src/app/qml/ConfirmUrlDialog.qml
James Graham b6791485c4 Move remaining code to app module
There's still some stuff that could potentially go elsewhere but I think it's enough for now.
2025-04-18 09:26:17 +00:00

29 lines
648 B
QML

// 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();
}
}