AicsKnowledgeBase_client/AicsKnowledgeBase/qml/LoginPage.qml

129 lines
3.5 KiB
QML

import QtQuick
import FluentUI
import QtQuick.Controls
import QtQuick.Window
import QtQuick.Layouts
import org.wangwenx190.FramelessHelper
FluWindow{
width: 640
height: 480
visible: true
title: qsTr("Hello World")
color: "transparent"
property alias titleVisible: title_bar.titleVisible
property bool appBarVisible: true
FluAppBar {
id: title_bar
title: window.title
visible: window.appBarVisible
anchors {
top: parent.top
left: parent.left
right: parent.right
}
darkText: lang.dark_mode
}
Item{
id:container
anchors{
top: title_bar.bottom
left: parent.left
right: parent.right
bottom: parent.bottom
}
clip: true
}
FramelessHelper{
id:framless_helper
onReady: {
setTitleBarItem(title_bar)
moveWindowToDesktopCenter()
setHitTestVisible(title_bar.minimizeButton())
setHitTestVisible(title_bar.maximizeButton())
setHitTestVisible(title_bar.closeButton())
setWindowFixedSize(fixSize)
title_bar.maximizeButton.visible = !fixSize
if (blurBehindWindowEnabled)
window.backgroundVisible = false
window.show()
}
}
function setHitTestVisible(com){
framless_helper.setHitTestVisible(com)
}
function setTitleBarItem(com){
framless_helper.setTitleBarItem(com)
}
Row{
anchors.fill: parent
Item{
id: introdutcitonItem
height: parent.height
width: parent.width * 0.5
Image {
anchors.fill: parent
source: "qrc:/AicsKnowledgeBase/res/login_background.webp"
}
}
Item{
id: loginItem
height: parent.height
width: parent.width * 0.5
FluPivot{
anchors.fill: parent
anchors.margins: 20
FluPivotItem{
title: "Sign in"
contentItem:Column{
anchors.fill: parent
anchors.margins: 20
anchors.centerIn: parent
spacing: 12
FluTextBox{
placeholderText: "Account"
id: account
}
FluPasswordBox{
placeholderText: "Password"
id: password
}
Row{
spacing: 25
FluCheckBox{
text: "Remember me"
}
FluTextButton{
text: "Forgot your password?"
}
}
FluFilledButton{
text: "Sign in"
anchors.horizontalCenter: parent.horizontalCenter
normalColor: "green"
}
}
}
FluPivotItem{
title: "Register"
// Rectangle{
// anchors.fill: parent
// color: "blue"
// }
}
}
}
}
}