2023-03-31 12:26:49 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
import QtQml.Models 2.14
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Popups.Dialog 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
import AppLayouts.Chat.panels.communities 1.0
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
StatusDialog {
|
|
|
|
id: root
|
|
|
|
|
2023-05-30 15:18:45 +00:00
|
|
|
property alias acceptBtnText: acceptBtn.text
|
|
|
|
property alias alertText: contentTextItem.text
|
2023-03-31 12:26:49 +00:00
|
|
|
|
2023-05-30 15:18:45 +00:00
|
|
|
signal acceptClicked
|
2023-03-31 12:26:49 +00:00
|
|
|
signal cancelClicked
|
|
|
|
|
|
|
|
implicitWidth: 400 // by design
|
|
|
|
topPadding: Style.current.padding
|
|
|
|
bottomPadding: topPadding
|
|
|
|
contentItem: StatusBaseText {
|
2023-05-30 15:18:45 +00:00
|
|
|
id: contentTextItem
|
|
|
|
|
2023-03-31 12:26:49 +00:00
|
|
|
font.pixelSize: Style.current.primaryTextFontSize
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
lineHeight: 1.2
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: StatusDialogFooter {
|
|
|
|
spacing: Style.current.padding
|
|
|
|
rightButtons: ObjectModel {
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Cancel")
|
|
|
|
normalColor: "transparent"
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
root.cancelClicked()
|
|
|
|
close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
2023-05-30 15:18:45 +00:00
|
|
|
id: acceptBtn
|
|
|
|
|
2023-03-31 12:26:49 +00:00
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
|
|
|
|
onClicked: {
|
2023-05-30 15:18:45 +00:00
|
|
|
root.acceptClicked()
|
2023-03-31 12:26:49 +00:00
|
|
|
close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|