diff --git a/CMakeLists.txt b/CMakeLists.txt index bdf6504a..fa64eeb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,6 +73,7 @@ qt_add_qml_module(chat qml/ModelDownloaderDialog.qml qml/ThumbsDownDialog.qml qml/SettingsDialog.qml + qml/PopupDialog.qml RESOURCES icons/send_message.svg icons/stop_generating.svg diff --git a/main.qml b/main.qml index e5f2af46..4423868c 100644 --- a/main.qml +++ b/main.qml @@ -192,10 +192,11 @@ Window { } onClicked: { - if (Network.isActive) - Network.isActive = false - else - networkDialog.open(); + featureComingSoon.open() +// if (Network.isActive) +// Network.isActive = false +// else +// networkDialog.open() } } @@ -229,30 +230,16 @@ Window { } } - Dialog { + PopupDialog { id: copyMessage anchors.centerIn: parent - modal: false - opacity: 0.9 - Text { - horizontalAlignment: Text.AlignJustify - text: qsTr("Conversation copied to clipboard.") - color: "#d1d5db" - Accessible.role: Accessible.HelpBalloon - Accessible.name: text - Accessible.description: qsTr("Reveals a shortlived help balloon") - } - background: Rectangle { - anchors.fill: parent - color: "#202123" - border.width: 1 - border.color: "white" - radius: 10 - } + text: qsTr("Conversation copied to clipboard.") + } - exit: Transition { - NumberAnimation { duration: 500; property: "opacity"; from: 1.0; to: 0.0 } - } + PopupDialog { + id: featureComingSoon + anchors.centerIn: parent + text: qsTr("Feature coming soon!") } Button { diff --git a/qml/PopupDialog.qml b/qml/PopupDialog.qml new file mode 100644 index 00000000..60be8871 --- /dev/null +++ b/qml/PopupDialog.qml @@ -0,0 +1,32 @@ +import QtCore +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +Dialog { + id: copyMessage + anchors.centerIn: parent + modal: false + opacity: 0.9 + padding: 20 + property alias text: textField.text + Text { + id: textField + horizontalAlignment: Text.AlignJustify + color: "#d1d5db" + Accessible.role: Accessible.HelpBalloon + Accessible.name: text + Accessible.description: qsTr("Reveals a shortlived help balloon") + } + background: Rectangle { + anchors.fill: parent + color: "#202123" + border.width: 1 + border.color: "white" + radius: 10 + } + + exit: Transition { + NumberAnimation { duration: 500; property: "opacity"; from: 1.0; to: 0.0 } + } +} \ No newline at end of file