mirror of
https://github.com/QRouland/UTPass.git
synced 2026-01-10 19:36:57 +00:00
Initial Commit : 0.0.1
This commit is contained in:
116
qml/pages/Info.qml
Normal file
116
qml/pages/Info.qml
Normal file
@@ -0,0 +1,116 @@
|
||||
import QtQuick 2.4
|
||||
import Ubuntu.Components 1.3
|
||||
import "headers"
|
||||
import "../components"
|
||||
|
||||
Page {
|
||||
id: infoPage
|
||||
|
||||
header: StackHeader {
|
||||
id: infoHeader
|
||||
title: i18n.tr('Info')
|
||||
}
|
||||
|
||||
Flow {
|
||||
anchors.top: infoHeader.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
spacing: units.gu(3)
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: units.gu(1)
|
||||
}
|
||||
|
||||
Text {
|
||||
id: manifestTitle
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
height: units.gu(8)
|
||||
fontSizeMode: Text.Fit
|
||||
font.pixelSize: 144
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: units.gu(12)
|
||||
Image {
|
||||
source: "../../assets/logo.svg"
|
||||
width: units.gu(12)
|
||||
height: units.gu(12)
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
width: parent.width
|
||||
height: units.gu(3)
|
||||
text: i18n.tr("<b>Version</b>")
|
||||
fontSizeMode: Text.Fit
|
||||
font.pixelSize: 72
|
||||
}
|
||||
|
||||
Text {
|
||||
id: manifestVersion
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
width: parent.width
|
||||
height: units.gu(4)
|
||||
fontSizeMode: Text.Fit
|
||||
font.pixelSize: 72
|
||||
}
|
||||
|
||||
Text {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
width: parent.width
|
||||
height: units.gu(3)
|
||||
text: i18n.tr("<b>Maintainer</>")
|
||||
fontSizeMode: Text.Fit
|
||||
font.pixelSize: 72
|
||||
}
|
||||
|
||||
Text {
|
||||
id: manifestMaintener
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
width: parent.width
|
||||
height: units.gu(2)
|
||||
fontSizeMode: Text.Fit
|
||||
font.pixelSize: 72
|
||||
}
|
||||
}
|
||||
|
||||
Flow {
|
||||
spacing: 2
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
ExternalLink {
|
||||
url: "https://taiga.rdrive.ovh/project/utpass/issues"
|
||||
text: i18n.tr("Suggest improvement(s) or report a bug(s)")
|
||||
}
|
||||
ExternalLink {
|
||||
url: "https://git.rdrive.ovh/QRouland/UTPass"
|
||||
text: i18n.tr("Access to the source code")
|
||||
}
|
||||
Text {
|
||||
width: parent.width
|
||||
height: units.gu(2)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n.tr("Released under the terms of the GNU GPL v3")
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.open("GET", "../../manifest_.json", false)
|
||||
xhr.send()
|
||||
|
||||
var mJson = JSON.parse(xhr.responseText)
|
||||
|
||||
manifestTitle.text = "<b>" + mJson.title + "</b>"
|
||||
manifestVersion.text = mJson.version + "<br>" + mJson.framework + "@" + mJson.architecture
|
||||
manifestMaintener.text = mJson.maintainer
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user