status-desktop/ui/app/AppLayouts/Chat/popups/RenameGroupPopup.qml

38 lines
770 B
QML
Raw Normal View History

2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import utils 1.0
import shared.controls 1.0
import StatusQ.Controls 0.1
import StatusQ.Popups.Dialog 0.1
StatusDialog {
id: root
2020-06-15 12:51:04 +00:00
property string activeChannelName
signal doRename(string groupName)
width: 400
title: qsTr("Group name")
standardButtons: Dialog.Save
2020-06-15 12:51:04 +00:00
onOpened: {
groupName.forceActiveFocus(Qt.MouseFocusReason)
groupName.text = root.activeChannelName
2020-06-15 12:51:04 +00:00
}
onAccepted: root.doRename(groupName.text)
2020-06-15 12:51:04 +00:00
Input {
id: groupName
anchors.fill: parent
placeholderText: qsTr("Group name")
Keys.onEnterPressed: doRename(groupName.text)
Keys.onReturnPressed: doRename(groupName.text)
}
2020-06-15 12:51:04 +00:00
}