Files
amnezia-client/client/ui/qml/Components/RenameServerDrawer.qml
T
vkamn 11355e1de0 feat: new design system (#3280)
* refactor: focus controller refactoring

* feat: update to new design system

* feat: update to new desing system

* chore: bump version
2026-10-14 11:13:36 +08:00

62 lines
1.4 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "../Controls2"
import "../Controls2/TextTypes"
import "../Config"
SheetType {
property string serverNameText
id: root
objectName: "serverNameEditDrawer"
expandedHeight: content.implicitHeight + 16 + 8 + PageController.safeAreaBottomMargin + PageController.imeHeight
ColumnLayout {
id: content
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: 16
anchors.leftMargin: 16
anchors.rightMargin: 16
spacing: 26
TextFieldType {
id: serverName
Layout.fillWidth: true
headerText: qsTr("Server name")
textField.text: root.serverNameText
textField.maximumLength: 30
checkEmptyText: true
}
ButtonType {
id: saveButton
Layout.fillWidth: true
text: qsTr("Save")
onClicked: {
if (serverName.textField.text === "") {
return
}
if (serverName.textField.text !== root.serverNameText) {
ServersUiController.editServerName(ServersUiController.processedServerId, serverName.textField.text);
}
root.close()
}
}
}
}