AicsKnowledgeBase_client/AicsKnowledgeBase/qml/LoginWindow.qml

115 lines
4.0 KiB
QML

import QtQuick
import FluentUI
import QtQuick.Controls
import QtQuick.Window
import QtQuick.Layouts
import org.wangwenx190.FramelessHelper
import AicsKB.HttpClient
AppFluWindow {
id: window
height: 420
title: "智能客服知识库"
width: 640
Row {
anchors.fill: parent
Rectangle {
id: introdutcitonItem
height: parent.height
width: parent.width * 0.5
color: "#f3fbff"
//color: "transparent"
Image {
anchors.fill: parent
fillMode: Image.PreserveAspectFit
source: "qrc:/AicsKnowledgeBase/res/login_background.webp"
}
}
Rectangle{
width: parent.width * 0.5
height: parent.height
color: "#f3f3f3"
ColumnLayout {
id: loginRect
anchors.fill: parent
FluPivot {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
Layout.margins: 20
height: 200
FluPivotItem {
id: loginItem
title: "登录"
function login(s) {
showSuccess(s)
}
contentItem: Column {
anchors.margins: {
top: 10
}
anchors.top: parent.top
spacing: 12
FluTextBox {
anchors.left: parent.left
anchors.right: parent.right
id: account
placeholderText: "用户名"
}
FluPasswordBox {
anchors.left: parent.left
anchors.right: parent.right
id: password
placeholderText: "密码"
}
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
FluCheckBox {
Layout.alignment: Qt.AlignLeft
//anchors.left: parent.left
text: "记住密码"
}
FluTextButton {
Layout.alignment: Qt.AlignRight
//anchors.right: parent.right
text: "忘记密码?"
}
}
FluFilledButton {
anchors.horizontalCenter: parent.horizontalCenter
//normalColor: FluColors.Green.normal
//normalColor: "#ffffff"
text: "登录"
onClicked: {
FluApp.navigate("/");
window.close();
//HttpClient.doGetRequest(
// "https://quic.aiortc.org/",
// loginItem, "login")
}
}
}
}
// FluPivotItem {
// title: "注册"
// Rectangle{
// anchors.fill: parent
// color: "blue"
// }
//}
}
}
}
}
}