mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
be03b04ef0
- 修复了虚拟牌点数相加的bug - 修复cleaner出错直接爆炸 - QML的代码将宽度控制到80以内
96 lines
1.8 KiB
QML
96 lines
1.8 KiB
QML
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
|
|
ColumnLayout {
|
|
// anchors.centerIn: parent
|
|
|
|
RowLayout {
|
|
anchors.rightMargin: 8
|
|
spacing: 16
|
|
Text {
|
|
text: luatr("Username")
|
|
}
|
|
Text {
|
|
text: Self.screenName
|
|
font.pixelSize: 18
|
|
}
|
|
}
|
|
|
|
Timer {
|
|
id: opTimer
|
|
interval: 1000
|
|
}
|
|
|
|
RowLayout {
|
|
anchors.rightMargin: 8
|
|
spacing: 16
|
|
Text {
|
|
text: luatr("Avatar")
|
|
}
|
|
TextField {
|
|
id: avatarName
|
|
maximumLength: 64
|
|
font.pixelSize: 18
|
|
text: Self.avatar
|
|
Layout.fillWidth: true
|
|
}
|
|
Button {
|
|
text: luatr("Update Avatar")
|
|
enabled: avatarName.text !== "" && !opTimer.running
|
|
onClicked: {
|
|
mainWindow.busy = true;
|
|
opTimer.start();
|
|
ClientInstance.notifyServer(
|
|
"UpdateAvatar",
|
|
JSON.stringify([avatarName.text])
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
RowLayout {
|
|
anchors.rightMargin: 8
|
|
spacing: 16
|
|
Text {
|
|
text: luatr("Old Password")
|
|
}
|
|
TextField {
|
|
id: oldPassword
|
|
echoMode: TextInput.Password
|
|
passwordCharacter: "*"
|
|
Layout.rightMargin: 16
|
|
Layout.fillWidth: true
|
|
}
|
|
}
|
|
|
|
RowLayout {
|
|
anchors.rightMargin: 8
|
|
spacing: 16
|
|
Text {
|
|
text: luatr("New Password")
|
|
}
|
|
TextField {
|
|
id: newPassword
|
|
echoMode: TextInput.Password
|
|
passwordCharacter: "*"
|
|
Layout.fillWidth: true
|
|
}
|
|
Button {
|
|
text: luatr("Update Password")
|
|
enabled: oldPassword.text !== "" && newPassword.text !== ""
|
|
&& !opTimer.running
|
|
onClicked: {
|
|
mainWindow.busy = true;
|
|
opTimer.start();
|
|
ClientInstance.notifyServer(
|
|
"UpdatePassword",
|
|
JSON.stringify([oldPassword.text, newPassword.text])
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|