1
0
Fork 0
mirror of https://github.com/seiichiro0185/sailotp.git synced 2024-11-15 05:16:42 +00:00

Merge pull request #44 from ZeiP/about_fixes

Prettier styles for the about page
This commit is contained in:
seiichiro 2021-01-11 15:46:08 +01:00 committed by GitHub
commit 569a4432f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 170 additions and 108 deletions

View file

@ -47,13 +47,10 @@ Page {
width: parent.width width: parent.width
spacing: Theme.paddingSmall spacing: Theme.paddingSmall
TextArea { // Spacer
id: spacer Item {
anchors.horizontalCenter: parent.horizontalCenter width: parent.width
width: parent.width height: Theme.paddingLarge
readOnly: true
text: ""
height: Theme.paddingLarge*2
} }
Image { Image {
id: logo id: logo
@ -66,71 +63,96 @@ Page {
font.bold: true font.bold: true
text: "SailOTP " + Qt.application.version text: "SailOTP " + Qt.application.version
} }
TextArea { Label {
id: desc
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: parent.width width: parent.width
horizontalAlignment: TextEdit.Center horizontalAlignment: TextEdit.Center
readOnly: true text: qsTr("A simple Sailfish OTP generator")
text: qsTr("A Simple Sailfish OTP Generator\n(RFC 6238/4226 compatible)")
color: Theme.primaryColor color: Theme.primaryColor
} }
TextArea { Label {
id: copyright
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: parent.width width: parent.width
horizontalAlignment: TextEdit.Center horizontalAlignment: TextEdit.Center
readOnly: true font.pixelSize: Theme.fontSizeSmall
text: qsTr("Copyright: Stefan Brand\nLicense: BSD (3-clause)") text: qsTr("(RFC 6238/4226 compatible)")
color: Theme.primaryColor color: Theme.primaryColor
} }
// Spacer
Item {
width: parent.width
height: Theme.paddingMedium
}
Button { Button {
id: manual text: qsTr("Online Manual")
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: "<a href=\"https://www.seiichiro0185.org/sailfish:apps:sailotp:manual\">Online Manual</a>"
onClicked: { onClicked: {
Qt.openUrlExternally("https://www.seiichiro0185.org/sailfish:apps:sailotp:manual") Qt.openUrlExternally("https://www.seiichiro0185.org/sailfish:apps:sailotp:manual")
} }
} }
Button { Button {
id: homepage text: qsTr("Source Code & Issue Tracker")
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: "<a href=\"https://github.com/seiichiro0185/sailotp/\">Source Code & Issue Tracker</a>"
onClicked: { onClicked: {
Qt.openUrlExternally("https://github.com/seiichiro0185/sailotp/") Qt.openUrlExternally("https://github.com/seiichiro0185/sailotp/")
} }
} }
TextArea { // Spacer
id: acknowledgement Item {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width width: parent.width
font.pixelSize: Theme.fontSizeSmall height: Theme.paddingMedium
horizontalAlignment: TextEdit.Center
readOnly: true
text: "\n"+qsTr("SailOTP uses the following third party libs:")+"\n\nhttp://caligatio.github.io/jsSHA/\nhttps://code.google.com/archive/p/crypto-js/\nhttp://sourceforge.net/projects/qzxing/\nhttp://fukuchi.org/works/qrencode/"
color: Theme.primaryColor
} }
DetailItem {
TextArea {
id: contributors
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width width: parent.width
font.pixelSize: Theme.fontSizeSmall label: qsTr("Copyright")
horizontalAlignment: TextEdit.Center value: "Stefan Brand"
readOnly: true
text: qsTr("Contributors:")+"\n\nRobin Appelman: SteamGuard "+qsTr("Support")
color: Theme.primaryColor
} }
DetailItem {
TextArea { width: parent.width
id: translators label: qsTr("License")
value: qsTr("BSD (3-clause)")
}
Label {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: parent.width width: parent.width
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
horizontalAlignment: TextEdit.Center horizontalAlignment: TextEdit.Center
readOnly: true wrapMode: Text.WordWrap
text: qsTr("Translators:")+"\n\nChinese: BirdZhang\nFinnish: Johan Heikkilä\nFrench: Romain Tartière\nItalian: Tichy\nDutch: JSEHV\nRussian: moorchegue\nSpanish: p4moedo\nSwedish: Åke Engelbrektson\nEnglish: Stefan Brand\nGerman: Stefan Brand" text: qsTr("Contributors:")
color: Theme.primaryColor color: Theme.secondaryHighlightColor
}
DetailItem {
label: qsTr("SteamGuard support")
value: "Robin Appelman"
}
Label {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
font.pixelSize: Theme.fontSizeSmall
horizontalAlignment: Text.Center
wrapMode: Text.WordWrap
text: qsTr("Translators:")
color: Theme.secondaryHighlightColor
}
Label {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width * 0.8
font.pixelSize: Theme.fontSizeSmall
wrapMode: Text.WordWrap
text: "Chinese: BirdZhang\nFinnish: Johan Heikkilä\nFrench: Romain Tartière\nItalian: Tichy\nDutch: JSEHV\nRussian: moorchegue\nSpanish: p4moedo\nSwedish: Åke Engelbrektson\nEnglish: Stefan Brand\nGerman: Stefan Brand"
color: Theme.highlightColor
}
LinkedLabel {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
font.pixelSize: Theme.fontSizeSmall
horizontalAlignment: TextEdit.Center
plainText: "\n"+qsTr("SailOTP uses the following third party libs:")+'
http://caligatio.github.io/jsSHA/
https://code.google.com/archive/p/crypto-js/
http://sourceforge.net/projects/qzxing/
http://fukuchi.org/works/qrencode/'
color: Theme.secondaryHighlightColor
} }
} }
VerticalScrollDecorator { } VerticalScrollDecorator { }

View file

@ -159,10 +159,12 @@ Page {
Row { Row {
id: searchRow id: searchRow
width: parent.width width: parent.width
TextField { SearchField {
id: searchField id: searchField
font.pixelSize: Theme.fontSizeMedium font.pixelSize: Theme.fontSizeMedium
width: parent.width - clearIcon.width width: parent.width
// This would be useful, but seems to break the button altogether. Perhaps it'll work later?
// canHide: true
EnterKey.enabled: false EnterKey.enabled: false
inputMethodHints: Qt.ImhNoPredictiveText // Qt.ImhPreferUppercase | Qt.ImhNoAutoUppercase inputMethodHints: Qt.ImhNoPredictiveText // Qt.ImhPreferUppercase | Qt.ImhNoAutoUppercase
placeholderText: qsTr("Search") placeholderText: qsTr("Search")
@ -172,12 +174,6 @@ Page {
} }
} }
} }
IconButton {
id: clearIcon
icon.source: "image://theme/icon-m-backspace"
onClicked: searchField.text = ""
enabled: searchField.text.length > 0
}
} }
} }

View file

@ -4,23 +4,29 @@
<context> <context>
<name>About</name> <name>About</name>
<message> <message>
<location filename="../qml/pages/About.qml" line="75"/> <location filename="../qml/pages/About.qml" line="87"/>
<source>A Simple Sailfish OTP Generator <source>Online Manual</source>
(RFC 6238/4226 compatible)</source> <translation>Ohje verkossa</translation>
<translation>Yksinkertainen OTP- eli kertasalasanasovellus Sailfishille
(RFC 6238-/4226-yhteensopiva)</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="84"/> <location filename="../qml/pages/About.qml" line="94"/>
<source>Copyright: Stefan Brand <source>Source Code &amp; Issue Tracker</source>
License: BSD (3-clause)</source> <translation>Lähdekoodi ja virheilmoitukset</translation>
<translation>Copyright: Stefan Brand
Lisenssi: BSD (3 lausekkeen)</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="110"/> <location filename="../qml/pages/About.qml" line="107"/>
<source>SailOTP uses the following third party libs:</source> <source>Copyright</source>
<translation>SailOTP käyttää seuraavia kolmannen osapuolen kirjastoja:</translation> <translation>Tekijänoikeus</translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="112"/>
<source>License</source>
<translation>Lisenssi</translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="113"/>
<source>BSD (3-clause)</source>
<translation>BSD (3 lauseen)</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="121"/> <location filename="../qml/pages/About.qml" line="121"/>
@ -28,12 +34,27 @@ Lisenssi: BSD (3 lausekkeen)</translation>
<translation>Projektiin osallistuneet:</translation> <translation>Projektiin osallistuneet:</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="121"/> <location filename="../qml/pages/About.qml" line="125"/>
<source>Support</source> <source>SteamGuard support</source>
<translation>Tuki</translation> <translation>SteamGuard-tuki</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="132"/> <location filename="../qml/pages/About.qml" line="150"/>
<source>SailOTP uses the following third party libs:</source>
<translation>SailOTP käyttää seuraavia kolmannen osapuolen kirjastoja:</translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="70"/>
<source>A simple Sailfish OTP generator</source>
<translation>Yksinkertainen OTP- eli kertasalasanasovellus Sailfishille</translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="78"/>
<source>(RFC 6238/4226 compatible)</source>
<translation>(RFC 6238/4226 -yhteensopiva)</translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="134"/>
<source>Translators:</source> <source>Translators:</source>
<translation>Kääntäjät:</translation> <translation>Kääntäjät:</translation>
</message> </message>
@ -281,54 +302,54 @@ Lisenssi: BSD (3 lausekkeen)</translation>
<translation>Vedä alaspäin lisätäksesi kertasalasanatunnuksen</translation> <translation>Vedä alaspäin lisätäksesi kertasalasanatunnuksen</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="168"/> <location filename="../qml/pages/MainView.qml" line="170"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation>Etsi</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="193"/> <location filename="../qml/pages/MainView.qml" line="189"/>
<source>Deleting</source> <source>Deleting</source>
<translation>Poistetaan</translation> <translation>Poistetaan</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="214"/> <location filename="../qml/pages/MainView.qml" line="210"/>
<location filename="../qml/pages/MainView.qml" line="288"/> <location filename="../qml/pages/MainView.qml" line="284"/>
<source>Token for </source> <source>Token for </source>
<translation>Kertasalasana palveluun </translation> <translation>Kertasalasana palveluun </translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="214"/> <location filename="../qml/pages/MainView.qml" line="210"/>
<location filename="../qml/pages/MainView.qml" line="288"/> <location filename="../qml/pages/MainView.qml" line="284"/>
<source> copied to clipboard</source> <source> copied to clipboard</source>
<translation> on kopioitu leikepöydälle</translation> <translation> on kopioitu leikepöydälle</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="284"/> <location filename="../qml/pages/MainView.qml" line="280"/>
<source>Copy to Clipboard</source> <source>Copy to Clipboard</source>
<translation>Kopioi leikepöydälle</translation> <translation>Kopioi leikepöydälle</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="292"/> <location filename="../qml/pages/MainView.qml" line="288"/>
<source>Show Token as QR-Code</source> <source>Show Token as QR-Code</source>
<translation>Näytä kertasalasana QR-koodina</translation> <translation>Näytä kertasalasana QR-koodina</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="297"/> <location filename="../qml/pages/MainView.qml" line="293"/>
<source>Move up</source> <source>Move up</source>
<translation>Siirrä ylöspäin</translation> <translation>Siirrä ylöspäin</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="302"/> <location filename="../qml/pages/MainView.qml" line="298"/>
<source>Move down</source> <source>Move down</source>
<translation>Siirrä alaspäin</translation> <translation>Siirrä alaspäin</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="307"/> <location filename="../qml/pages/MainView.qml" line="303"/>
<source>Edit</source> <source>Edit</source>
<translation>Muokkaa</translation> <translation>Muokkaa</translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="313"/> <location filename="../qml/pages/MainView.qml" line="309"/>
<source>Delete</source> <source>Delete</source>
<translation>Poista</translation> <translation>Poista</translation>
</message> </message>

View file

@ -4,34 +4,57 @@
<context> <context>
<name>About</name> <name>About</name>
<message> <message>
<location filename="../qml/pages/About.qml" line="75"/> <location filename="../qml/pages/About.qml" line="87"/>
<source>A Simple Sailfish OTP Generator <source>Online Manual</source>
(RFC 6238/4226 compatible)</source> <translation type="unfinished"></translation>
<translation></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="84"/> <location filename="../qml/pages/About.qml" line="94"/>
<source>Copyright: Stefan Brand <source>Source Code &amp; Issue Tracker</source>
License: BSD (3-clause)</source> <translation type="unfinished"></translation>
<translation></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="110"/> <location filename="../qml/pages/About.qml" line="107"/>
<source>SailOTP uses the following third party libs:</source> <source>Copyright</source>
<translation></translation> <translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="112"/>
<source>License</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="113"/>
<source>BSD (3-clause)</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="121"/> <location filename="../qml/pages/About.qml" line="121"/>
<source>Contributors:</source> <source>Contributors:</source>
<translation>Contributor:</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="121"/> <location filename="../qml/pages/About.qml" line="125"/>
<source>Support</source> <source>SteamGuard support</source>
<translation>support</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/About.qml" line="132"/> <location filename="../qml/pages/About.qml" line="150"/>
<source>SailOTP uses the following third party libs:</source>
<translation></translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="70"/>
<source>A simple Sailfish OTP generator</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="78"/>
<source>(RFC 6238/4226 compatible)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/About.qml" line="134"/>
<source>Translators:</source> <source>Translators:</source>
<translation>Translators:</translation> <translation>Translators:</translation>
</message> </message>
@ -279,54 +302,54 @@ License: BSD (3-clause)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="168"/> <location filename="../qml/pages/MainView.qml" line="170"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="193"/> <location filename="../qml/pages/MainView.qml" line="189"/>
<source>Deleting</source> <source>Deleting</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="214"/> <location filename="../qml/pages/MainView.qml" line="210"/>
<location filename="../qml/pages/MainView.qml" line="288"/> <location filename="../qml/pages/MainView.qml" line="284"/>
<source>Token for </source> <source>Token for </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="214"/> <location filename="../qml/pages/MainView.qml" line="210"/>
<location filename="../qml/pages/MainView.qml" line="288"/> <location filename="../qml/pages/MainView.qml" line="284"/>
<source> copied to clipboard</source> <source> copied to clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="284"/> <location filename="../qml/pages/MainView.qml" line="280"/>
<source>Copy to Clipboard</source> <source>Copy to Clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="292"/> <location filename="../qml/pages/MainView.qml" line="288"/>
<source>Show Token as QR-Code</source> <source>Show Token as QR-Code</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="297"/> <location filename="../qml/pages/MainView.qml" line="293"/>
<source>Move up</source> <source>Move up</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="302"/> <location filename="../qml/pages/MainView.qml" line="298"/>
<source>Move down</source> <source>Move down</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="307"/> <location filename="../qml/pages/MainView.qml" line="303"/>
<source>Edit</source> <source>Edit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/MainView.qml" line="313"/> <location filename="../qml/pages/MainView.qml" line="309"/>
<source>Delete</source> <source>Delete</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>