Make the main view functional
This commit is contained in:
+16
-31
@@ -3,45 +3,30 @@ import fbx.application 1.0
|
|||||||
import "Views" as View
|
import "Views" as View
|
||||||
|
|
||||||
Application {
|
Application {
|
||||||
Column {
|
// Liste des labels et types
|
||||||
|
property var fields: [
|
||||||
|
{label: "Server", type: "text"},
|
||||||
|
{label: "User", type: "text"},
|
||||||
|
{label: "Password", type: "password"}
|
||||||
|
]
|
||||||
|
|
||||||
|
Row {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
// Logo left section
|
width: parent.width / 3 - 5
|
||||||
width: parent.width / 2 - 5
|
height: parent.height
|
||||||
|
|
||||||
|
View.Logo {}
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width / 3 * 2 - 5
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
color: "#000B25"
|
color: "#000B25"
|
||||||
|
|
||||||
Image {
|
View.Login {}
|
||||||
anchors.centerIn: parent
|
|
||||||
source: "icon.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
// Grid View section to log user and setup the server link
|
|
||||||
width: parent.width / 2 - 5
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
color: "blue"
|
|
||||||
|
|
||||||
Text {
|
|
||||||
color: "orange"
|
|
||||||
text: "Connect to Jellyfin"
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
GridView {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: parent.width; height: parent.height
|
|
||||||
|
|
||||||
model: View.Login {}
|
|
||||||
delegate: Column {
|
|
||||||
Text { text: name; anchors.horizontalCenter: parent.horizontalCenter }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+34
-9
@@ -1,13 +1,38 @@
|
|||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
|
|
||||||
ListModel {
|
Column {
|
||||||
ListElement {
|
anchors.fill: parent
|
||||||
name: "Server"
|
anchors.margins: 20
|
||||||
}
|
spacing: 15
|
||||||
ListElement {
|
|
||||||
name: "Username"
|
// Repeater pour générer les champs basés sur la liste des labels et types
|
||||||
}
|
Repeater {
|
||||||
ListElement {
|
model: fields
|
||||||
name: "Password"
|
|
||||||
|
Row {
|
||||||
|
width: parent.width
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: modelData.label + ":"
|
||||||
|
width: 100
|
||||||
|
color: "white"
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
// TextInput pour les champs Server et User, et mode Password pour Password
|
||||||
|
TextInput {
|
||||||
|
width: parent.width - 110
|
||||||
|
height: 30
|
||||||
|
font.pixelSize: 16
|
||||||
|
color: "white"
|
||||||
|
text: modelData.label
|
||||||
|
|
||||||
|
// Détermine le mode de saisie en fonction du type
|
||||||
|
echoMode: modelData.type === "password" ? TextInput.Password : TextInput.Normal
|
||||||
|
//echoMode: TextInput.Password
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import QtQuick 2.5
|
||||||
|
|
||||||
|
// Display the logo
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
|
||||||
|
color: "#000B25"
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
source: "../icon.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user