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

47 lines
1.0 KiB
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
2020-06-15 12:51:04 +00:00
import "../../../../imports"
import "../../../../shared"
import "./"
ModalPopup {
function doRename(){
chatsModel.renameGroup(groupName.text)
popup.close();
}
2020-06-15 12:51:04 +00:00
id: popup
height: 210
2020-06-15 12:51:04 +00:00
//% "Group name"
title: qsTrId("group-name")
2020-06-15 12:51:04 +00:00
onOpened: {
groupName.forceActiveFocus(Qt.MouseFocusReason)
groupName.text = chatsModel.activeChannel.name
}
Input {
id: groupName
anchors.left: parent.left
anchors.leftMargin: Style.current.padding
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
//% "Group name"
placeholderText: qsTrId("group-name")
Keys.onEnterPressed: doRename()
Keys.onReturnPressed: doRename()
2020-06-15 12:51:04 +00:00
}
footer: StyledButton {
id: saveBtn
height: 44
anchors.bottom: parent.bottom
anchors.right: parent.right
//% "Save"
label: qsTrId("save")
onClicked : doRename()
}
2020-06-15 12:51:04 +00:00
}