47 lines
1 KiB
QML
47 lines
1 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Window 2.15
|
|
import QtQuick.Layouts 2.15
|
|
import QtQuick.Controls 2.15
|
|
|
|
Window {
|
|
SystemPalette { id: activeColors; colorGroup: SystemPalette.Active }
|
|
SystemPalette { id: inactiveColors; colorGroup: SystemPalette.Inactive }
|
|
SystemPalette { id: disabledColors; colorGroup: SystemPalette.Disabled }
|
|
|
|
function getColors() {
|
|
return root.active ? activeColors : inactiveColors;
|
|
}
|
|
|
|
id: root
|
|
width: 640
|
|
height: 480
|
|
visible: true
|
|
color: getColors().window
|
|
|
|
title: qsTr("Alisa - License Managment")
|
|
|
|
property string authToken: ""
|
|
|
|
StackView {
|
|
id: stackView
|
|
anchors.fill: parent
|
|
initialItem: loginPageComponent
|
|
}
|
|
|
|
Component {
|
|
id: loginPageComponent
|
|
LoginScreen {
|
|
onLoginSuccess: {
|
|
authToken = token
|
|
stackView.push(mainPageComponent)
|
|
}
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: mainPageComponent
|
|
MainPage {
|
|
authToken: authToken
|
|
}
|
|
}
|
|
}
|