Qml/ModPage: show description
This commit is contained in:
parent
446ca73a91
commit
42943a4bd5
1 changed files with 23 additions and 4 deletions
|
|
@ -83,9 +83,28 @@ Kirigami.Page {
|
|||
anchors.top: header.bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
Controls.Label {
|
||||
anchors.centerIn: parent
|
||||
text: `Hello from ${mod.name}`
|
||||
|
||||
// Description
|
||||
ColumnLayout {
|
||||
Kirigami.Heading {
|
||||
// TODO: this should be a short description of some sort
|
||||
text: mod.name
|
||||
type: Kirigami.Heading.Type.Primary
|
||||
}
|
||||
Controls.Label {
|
||||
readonly property bool hasDescription: mod.longDescription || mod.description
|
||||
text: {
|
||||
if (hasDescription) {
|
||||
if (mod.longDescription) {
|
||||
text = mod.longDescription
|
||||
} else {
|
||||
text = mod.description
|
||||
}
|
||||
} else {
|
||||
text = "The description for this mod is not available"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue