Add menu for "About" to InitializationPage

Also puts the account specific info from "AboutPage" into a Loader to make it optional without much effort.
This commit is contained in:
John Gibbon 2020-11-26 11:18:17 +01:00
parent 4712d3dc0d
commit 12136a0e7e
13 changed files with 98 additions and 38 deletions

View file

@ -156,11 +156,17 @@ Page {
} }
} }
Loader {
active: !!aboutPage.userInformation.phone_number
width: parent.width
sourceComponent: Component {
Column {
Text { Text {
x: Theme.horizontalPageMargin x: Theme.horizontalPageMargin
width: parent.width - ( 2 * Theme.horizontalPageMargin ) width: parent.width - ( 2 * Theme.horizontalPageMargin )
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: qsTr("Logged in as %1").arg(Emoji.emojify(aboutPage.userInformation.first_name + " " + aboutPage.userInformation.last_name, Theme.fontSizeSmall)) text: qsTr("Logged in as %1").arg(Emoji.emojify(aboutPage.userInformation.first_name + " " + aboutPage.userInformation.last_name + typeof aboutPage.userInformation + JSON.stringify(aboutPage.userInformation), Theme.fontSizeSmall))
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
wrapMode: Text.Wrap wrapMode: Text.Wrap
color: Theme.primaryColor color: Theme.primaryColor
@ -191,6 +197,9 @@ Page {
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
} }
} }
}
}
}
Button { Button {
id: flickrTosButton id: flickrTosButton

View file

@ -105,6 +105,13 @@ Page {
Behavior on contentHeight { NumberAnimation {} } Behavior on contentHeight { NumberAnimation {} }
anchors.fill: parent anchors.fill: parent
PullDownMenu {
MenuItem {
text: qsTr("About Fernschreiber")
onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
}
}
Column { Column {
id: content id: content
width: parent.width width: parent.width

View file

@ -825,6 +825,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation>Nutzen Sie das internationale Format, z.B. %1</translation> <translation>Nutzen Sie das internationale Format, z.B. %1</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation>Über Fernschreiber</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>

View file

@ -825,6 +825,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation>Use the international format, e.g. %1</translation> <translation>Use the international format, e.g. %1</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation>About Fernschreiber</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>
@ -869,7 +873,7 @@
</message> </message>
<message> <message>
<source>Pin Message</source> <source>Pin Message</source>
<translation type="unfinished"></translation> <translation>Pin Message</translation>
</message> </message>
</context> </context>
<context> <context>
@ -883,11 +887,11 @@
<name>MessageOverlayFlickable</name> <name>MessageOverlayFlickable</name>
<message> <message>
<source>You</source> <source>You</source>
<translation type="unfinished">You</translation> <translation>You</translation>
</message> </message>
<message> <message>
<source>This message was forwarded. Original author: %1</source> <source>This message was forwarded. Original author: %1</source>
<translation type="unfinished"></translation> <translation>This message was forwarded. Original author: %1</translation>
</message> </message>
</context> </context>
<context> <context>
@ -947,15 +951,15 @@
<name>PinnedMessageItem</name> <name>PinnedMessageItem</name>
<message> <message>
<source>You</source> <source>You</source>
<translation type="unfinished">You</translation> <translation>You</translation>
</message> </message>
<message> <message>
<source>Pinned Message</source> <source>Pinned Message</source>
<translation type="unfinished"></translation> <translation>Pinned Message</translation>
</message> </message>
<message> <message>
<source>Message unpinned</source> <source>Message unpinned</source>
<translation type="unfinished"></translation> <translation>Message unpinned</translation>
</message> </message>
</context> </context>
<context> <context>
@ -1200,7 +1204,7 @@
</message> </message>
<message> <message>
<source>Notification turns on the display</source> <source>Notification turns on the display</source>
<translation type="unfinished"></translation> <translation>Notification turns on the display</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -815,6 +815,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation>Usar el formato internacional %1</translation> <translation>Usar el formato internacional %1</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation>Acerca de</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>

View file

@ -826,6 +826,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation>Käytä kansainvälistä muotoa, esimerkiksi %1</translation> <translation>Käytä kansainvälistä muotoa, esimerkiksi %1</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation>Tietoa Fernschreiberista</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>

View file

@ -815,6 +815,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation>A Fernschreiber névjegye</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>

View file

@ -825,6 +825,10 @@
<source>Loading...</source> <source>Loading...</source>
<translation>Carica...</translation> <translation>Carica...</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation>Informazioni su Fernschreiber</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>

View file

@ -835,6 +835,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation>Użyj międzynarodowego formatu, %1</translation> <translation>Użyj międzynarodowego formatu, %1</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation>O Fernschreiber</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>

View file

@ -835,6 +835,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation>Используйте международный формат, например %1</translation> <translation>Используйте международный формат, например %1</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>

View file

@ -825,6 +825,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation>Använd internationellt format, t.ex. %1</translation> <translation>Använd internationellt format, t.ex. %1</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation>Om Fernschreiber</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>

View file

@ -815,6 +815,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation>使 %1</translation> <translation>使 %1</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation> Fernschreiber</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>

View file

@ -825,6 +825,10 @@
<source>Use the international format, e.g. %1</source> <source>Use the international format, e.g. %1</source>
<translation>Use the international format, e.g. %1</translation> <translation>Use the international format, e.g. %1</translation>
</message> </message>
<message>
<source>About Fernschreiber</source>
<translation>About Fernschreiber</translation>
</message>
</context> </context>
<context> <context>
<name>LocationPreview</name> <name>LocationPreview</name>