- new design on login page (especially landscape mode)

- fixed crash that occurred when switching pages too fast (events and foodplan form)
- release 1.0.0
This commit is contained in:
Dorian Zedler 2019-02-16 22:38:13 +01:00
parent 1b26b1edda
commit 381d239d89
9 changed files with 261 additions and 197 deletions

View file

@ -4,10 +4,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## unreleased
## [1.0.0]
### Behoben
- Absturz, der bei schnellem wechsel zwischen Seiten (Vertretungsplan, Essensplan) auftrat
### Geändert
- neue Vertretungsplan api implementiert
- neues Anmeldesystem des Vertretungsplanes implementiert
- neue Essensplan api implementiert
- Anmeldebidschirm neu gestaltet (vorallem im Querformat)
### Hinzugefügt
- "Registriern" Taste auf dem Anmeldebidschirm
## [0.9.x] - 2018-12-30
### Geändert

View file

@ -29,6 +29,7 @@ Page {
title: qsTr("Vertretungsplan")
property int status: -1
property bool locked: root.status === -1
signal opened()

View file

@ -27,6 +27,7 @@ Page {
id: root
property bool teacherMode: _cppAppSettings.loadSetting("teacherMode") === "true"
property bool locked: false
title: "Vertretungsplan Filter"

View file

@ -27,6 +27,7 @@ Page {
title: qsTr("Speiseplan")
property int status: -1
property bool locked: root.status === -1
signal opened()

View file

@ -24,6 +24,8 @@ import "../Components"
Page {
id: root
property bool locked: false
signal opened()
onOpened: {}

View file

@ -25,6 +25,7 @@ Page {
signal refresh()
property int status: -1
property bool locked: false
BusyIndicator {
anchors.centerIn: parent

View file

@ -27,6 +27,7 @@ Page {
title: "Einstellungen"
signal opened()
property bool locked: false
onOpened: {}

View file

@ -33,194 +33,277 @@ Page {
}
}
Image {
id: bigLogo
source: "qrc:/graphics/images/FannyIcon.png"
Grid {
id: mainGrid
columns: app.landscape() ? 2:1
rows: app.landscape() ? 1:2
spacing: 0
anchors {
top: parent.top
left: parent.left
right: parent.right
margins: window.height * 0.01
}
anchors.fill: parent
height: window.height * 0.2
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
}
width: parent.width
height: parent.height
Label {
id: infoText
text: "<html>Bitte melde dich mit den Anmeldedaten der Fanny-Webseite an.
<a href='http://www.fanny-leicht.de/j34/index.php/aktuelles/vertretungsplan'>Weitere Informationen</a></html>"
wrapMode: Text.Wrap
onLinkActivated: {
Qt.openUrlExternally(link)
}
Column {
id: logoInfoCol
anchors {
top: bigLogo.bottom
left: parent.left
right: parent.right
leftMargin: window.width * 0.05
rightMargin: window.width * 0.05
}
}
width: app.landscape() ? root.width * 0.5:root.width
height: app.landscape() ? root.height:root.height * 0.3
Column {
spacing: ( height - 100 ) * 0.1
Image {
id: bigLogo
source: "qrc:/graphics/images/FannyIcon.png"
anchors {
left: parent.left
right: parent.right
top: infoText.bottom
bottom: parent.bottom
topMargin: root.height * 0.02
bottomMargin: root.height * 0.2
}
TextField {
id: tiuname
placeholderText: "Benutzername"
Keys.onReturnPressed: login(tiuname.text, tipasswd.text, cBperm.checked)
anchors {
left: parent.left
leftMargin: root.width * 0.05
right: parent.right
rightMargin: root.width * 0.05
}
}
TextField {
id: tipasswd
placeholderText: "Passwort"
Keys.onReturnPressed: login(tiuname.text, tipasswd.text, cBperm.checked)
anchors {
left: parent.left
leftMargin: root.width * 0.05
right: parent.right
rightMargin: root.width * 0.05
}
MouseArea {
id: passwordHideShow
anchors {
top: parent.top
bottom: parent.bottom
left: parent.left
right: parent.right
}
width: visibleIcon.width
onClicked: {
if(state === "visible"){
state = "invisible"
}
else {
state = "visible"
}
height: parent.height * 0.6
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
}
Label {
id: infoText
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width * 0.8
height: parent.height * 0.2
fontSizeMode: Text.Fit;
minimumPixelSize: 10;
font.pixelSize: 72
text: "<html>Bitte melde dich mit den Anmeldedaten der <a href='http://www.fanny-leicht.de/'>Fanny-Webseite</a> an.
<a href='http://www.fanny-leicht.de/j34/index.php/aktuelles/vertretungsplan'>Weitere Informationen</a></html>"
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
onLinkActivated: {
Qt.openUrlExternally(link)
}
state: "invisible"
}
states: [
State {
name: "invisible"
PropertyChanges {
target: visibleIcon
scale: 0
}
PropertyChanges {
target: invisibleIcon
scale: 1
}
PropertyChanges {
target: tipasswd
echoMode: TextInput.Password
}
},
State {
name: "visible"
PropertyChanges {
target: visibleIcon
scale: 1
}
PropertyChanges {
target: invisibleIcon
scale: 0
}
PropertyChanges {
target: tipasswd
echoMode: TextInput.Normal
}
}
]
}
Image {
id: visibleIcon
Column {
id: formCol
spacing: height * 0.01
width: app.landscape() ? root.width * 0.5:root.width
height: app.landscape() ? root.height:root.height * 0.7
property int rowHeight: height / 6 - spacing * 2 > 60 ? 60: height / 6 - spacing * 2
Rectangle {
id: spacer
height: formCol.spacing
color: "transparent"
}
TextField {
id: tiuname
anchors {
left: parent.left
leftMargin: root.width * 0.05
right: parent.right
rightMargin: root.width * 0.05
}
height: formCol.rowHeight
placeholderText: "Benutzername"
Keys.onReturnPressed: login(tiuname.text, tipasswd.text, cBperm.checked)
}
TextField {
id: tipasswd
placeholderText: "Passwort"
Keys.onReturnPressed: login(tiuname.text, tipasswd.text, cBperm.checked)
height: formCol.rowHeight
anchors {
left: parent.left
leftMargin: root.width * 0.05
right: parent.right
rightMargin: root.width * 0.05
}
MouseArea {
id: passwordHideShow
anchors {
top: parent.top
bottom: parent.bottom
right: parent.right
bottomMargin: parent.height * 0.25
topMargin: anchors.bottomMargin
}
fillMode: Image.PreserveAspectFit
smooth: true
mipmap: true
source: "qrc:/graphics/icons/view.png"
width: visibleIcon.width
onClicked: {
if(state === "visible"){
state = "invisible"
}
else {
state = "visible"
}
}
state: "invisible"
states: [
State {
name: "invisible"
PropertyChanges {
target: visibleIcon
scale: 0
}
PropertyChanges {
target: invisibleIcon
scale: 1
}
PropertyChanges {
target: tipasswd
echoMode: TextInput.Password
}
},
State {
name: "visible"
PropertyChanges {
target: visibleIcon
scale: 1
}
PropertyChanges {
target: invisibleIcon
scale: 0
}
PropertyChanges {
target: tipasswd
echoMode: TextInput.Normal
}
}
]
Image {
id: visibleIcon
anchors {
top: parent.top
bottom: parent.bottom
right: parent.right
bottomMargin: parent.height * 0.25
topMargin: anchors.bottomMargin
}
fillMode: Image.PreserveAspectFit
smooth: true
mipmap: true
source: "qrc:/graphics/icons/view.png"
}
Image {
id: invisibleIcon
anchors {
top: parent.top
bottom: parent.bottom
right: parent.right
bottomMargin: parent.height * 0.25
topMargin: anchors.bottomMargin
}
fillMode: Image.PreserveAspectFit
smooth: true
mipmap: true
source: "qrc:/graphics/icons/hide.png"
}
}
}
CheckDelegate {
id: cBperm
text: qsTr("Angemeldet bleiben")
checked: true
anchors.horizontalCenter: parent.horizontalCenter
height: formCol.rowHeight
}
FancyButton {
id: loginButton
anchors {
horizontalCenter: parent.horizontalCenter
left: parent.left
margins: root.width * 0.05
}
Image {
id: invisibleIcon
height: formCol.rowHeight
anchors {
top: parent.top
bottom: parent.bottom
right: parent.right
text: qsTr("Anmelden")
enabled: tiuname.length > 0 & tipasswd.length > 0
onClicked: root.login(tiuname.text, tipasswd.text, cBperm.checked)
}
bottomMargin: parent.height * 0.25
topMargin: anchors.bottomMargin
}
fillMode: Image.PreserveAspectFit
smooth: true
mipmap: true
source: "qrc:/graphics/icons/hide.png"
FancyButton {
id: registerBt
anchors {
horizontalCenter: parent.horizontalCenter
left: parent.left
margins: window.width * 0.05
}
height: formCol.rowHeight
text: qsTr("Registrieren")
enabled: true
onClicked: Qt.openUrlExternally("http://www.fanny-leicht.de/j34/index.php/login?view=registration")
}
Label {
id: laStatus
text: qsTr("")
font.pixelSize: height * 0.3
color: "red"
anchors.horizontalCenter: parent.horizontalCenter
height: formCol.rowHeight
}
}
CheckDelegate {
id: cBperm
text: qsTr("Angemeldet bleiben")
checked: true
anchors.horizontalCenter: parent.horizontalCenter
}
Dialog {
id: busyDialog
modal: true
closePolicy: "NoAutoClose"
focus: true
title: "Bitte warten..."
x: (app.width - width) / 2
y: (app.height - height) / 2
width: Math.min(window.width, window.height) / 3 * 2
height: 150
contentHeight: contentColumn.height
Column {
id: contentColumn
spacing: 20
RowLayout {
width: parent.width
BusyIndicator {
id: busyIndicator
visible: true
x: 22
y: 38
}
FancyButton {
id: loginButton
anchors {
horizontalCenter: parent.horizontalCenter
left: parent.left
margins: window.width * 0.05
Label {
width: busyDialog.availableWidth
text: "Anmelden..."
wrapMode: Label.Wrap
font.pixelSize: 12
}
}
}
text: qsTr("Anmelden")
enabled: tiuname.length > 0 & tipasswd.length > 0
onClicked: login(tiuname.text, tipasswd.text, cBperm.checked)
}
Label {
id: laStatus
text: qsTr("")
font.pixelSize: 20
color: "red"
anchors.horizontalCenter: parent.horizontalCenter
}
}
@ -234,8 +317,6 @@ Page {
// change the text to "Anmelden.."
loginButton.text = "Anmelden.."
console.log(username, password, permanent)
// trigger the login fucntion of the cpp backend and store the return code
var ret = serverConn.login(username, password, permanent);
@ -260,36 +341,4 @@ Page {
}
}
Dialog {
id: busyDialog
modal: true
closePolicy: "NoAutoClose"
focus: true
title: "Bitte warten..."
x: (app.width - width) / 2
y: (app.height - height) / 2
width: Math.min(window.width, window.height) / 3 * 2
height: 150
contentHeight: contentColumn.height
Column {
id: contentColumn
spacing: 20
RowLayout {
width: parent.width
BusyIndicator {
id: busyIndicator
visible: true
x: 22
y: 38
}
Label {
width: busyDialog.availableWidth
text: "Anmelden..."
wrapMode: Label.Wrap
font.pixelSize: 12
}
}
}
}
}

View file

@ -31,7 +31,9 @@ Page {
sequences: ["Esc", "Back"]
enabled: formStack.depth > 1
onActivated: {
formStack.pop()
if(!formStack.currentItem.locked){
formStack.pop()
}
}
}
@ -145,10 +147,8 @@ Page {
width: height
onClicked: {
if (formStack.depth > 1) {
if(!formStack.currentItem.locked){
formStack.pop()
} else {
drawer.open()
}
}