From 13786f01c93e26e84152b0f0c146b391244c3838 Mon Sep 17 00:00:00 2001 From: Chris Josten Date: Tue, 2 Jan 2024 16:44:07 +0100 Subject: [PATCH] sailfish: add contributors list and update info page - Add list of contributors - Add link to GitHub repository - Update copyright year --- sailfish/CMakeLists.txt | 1 + .../qml/components/ContributorsSection.qml | 48 +++++++++++++++++++ sailfish/qml/pages/AboutPage.qml | 23 ++++++++- sailfish/translations/harbour-sailfin-de.ts | 13 +++-- sailfish/translations/harbour-sailfin-ru.ts | 9 +++- sailfish/translations/harbour-sailfin.ts | 2 +- 6 files changed, 87 insertions(+), 9 deletions(-) create mode 100644 sailfish/qml/components/ContributorsSection.qml diff --git a/sailfish/CMakeLists.txt b/sailfish/CMakeLists.txt index 96c569d..2b1b18d 100644 --- a/sailfish/CMakeLists.txt +++ b/sailfish/CMakeLists.txt @@ -25,6 +25,7 @@ set(sailfin_QML_SOURCES qml/components/music/SongDelegate.qml qml/components/videoplayer/VideoError.qml qml/components/videoplayer/VideoHud.qml + qml/components/ContributorsSection.qml qml/components/IconListItem.qml qml/components/ItemChildrenShowcase.qml qml/components/JItem.qml diff --git a/sailfish/qml/components/ContributorsSection.qml b/sailfish/qml/components/ContributorsSection.qml new file mode 100644 index 0000000..3e7d287 --- /dev/null +++ b/sailfish/qml/components/ContributorsSection.qml @@ -0,0 +1,48 @@ +import QtQuick 2.6 +import Sailfish.Silica 1.0 + +Column { + property string headerText + // The contributors model + property var contributors + width: parent.width + SectionHeader { + text: headerText + } + + ColumnView { + model: contributors + itemHeight: Theme.itemSizeLarge + + delegate: ListItem { + width: parent.width + contentHeight: Theme.itemSizeLarge + + onClicked: { + if (model.url) { + Qt.openUrlExternally(model.url) + } + } + + Column { + anchors { + verticalCenter: parent.verticalCenter + left: parent.left + right: parent.right + leftMargin: Theme.horizontalPageMargin + rightMargin: Theme.horizontalPageMargin + } + + Label { + text: model.name + } + + Label { + text: model.role + color: highlighted ? Theme.secondaryHighlightColor : Theme.secondaryColor + } + } + } + } + +} diff --git a/sailfish/qml/pages/AboutPage.qml b/sailfish/qml/pages/AboutPage.qml index 69ccb2c..5099792 100644 --- a/sailfish/qml/pages/AboutPage.qml +++ b/sailfish/qml/pages/AboutPage.qml @@ -53,9 +53,10 @@ Page { text: qsTr("

Sailfin version %1
" + "Copyright © Chris Josten 2020–%2

" + "

Sailfin is Free Software licensed under the LGPL-v2.1 or later, at your choice. " + + "You can view its source code on GitHub. " + "Parts of the code of Sailfin are from other libraries. View their licenses here.

") .arg(apiClient.version) - .arg(2021) + .arg(2024) textFormat: Text.StyledText color: Theme.secondaryHighlightColor linkColor: Theme.primaryColor @@ -67,10 +68,28 @@ Page { case "3rdparty": pageStack.push(Qt.resolvedUrl("LegalPage.qml")) break; + case "github": + Qt.openUrlExternally("https://github.com/heartfin/harbour-sailfin") + break; } } } - + ContributorsSection { + //: SectionHeader + headerText: qsTr("Contributors") + contributors: ListModel { + ListElement { + name: "Chris Josten" + role: "Developer" + url: "https://github.com/HenkKalkwater" + } + ListElement { + name: "Mikhail Barashkov" + role: "Russian translation" + url: "https://github.com/mbarashkov" + } + } + } } VerticalScrollDecorator {} } diff --git a/sailfish/translations/harbour-sailfin-de.ts b/sailfish/translations/harbour-sailfin-de.ts index 310217a..3cdf6c4 100644 --- a/sailfish/translations/harbour-sailfin-de.ts +++ b/sailfish/translations/harbour-sailfin-de.ts @@ -7,10 +7,6 @@ About Sailfin - - <p><b>Sailfin version %1</b><br/>Copyright © Chris Josten 2020–%2</p><p>Sailfin is Free Software licensed under the <a href='lgpl'>LGPL-v2.1</a> or later, at your choice. Parts of the code of Sailfin are from other libraries. <a href='3rdparty'>View their licenses here</a>.</p> - - Open externally @@ -19,6 +15,15 @@ LGPL 2.1 License + + <p><b>Sailfin version %1</b><br/>Copyright © Chris Josten 2020–%2</p><p>Sailfin is Free Software licensed under the <a href='lgpl'>LGPL-v2.1</a> or later, at your choice. You can <a href="github">view its source code on GitHub</a>. Parts of the code of Sailfin are from other libraries. <a href='3rdparty'>View their licenses here</a>.</p> + + + + Contributors + SectionHeader + + AddServerConnectingPage diff --git a/sailfish/translations/harbour-sailfin-ru.ts b/sailfish/translations/harbour-sailfin-ru.ts index 466169c..920ee83 100644 --- a/sailfish/translations/harbour-sailfin-ru.ts +++ b/sailfish/translations/harbour-sailfin-ru.ts @@ -16,11 +16,16 @@ Лицензия LGPL 2.1 - <p><b>Sailfin version %1</b><br/>Copyright © Chris Josten 2020–%2</p><p>Sailfin is Free Software licensed under the <a href='lgpl'>LGPL-v2.1</a> or later, at your choice. Parts of the code of Sailfin are from other libraries. <a href='3rdparty'>View their licenses here</a>.</p> + LGPL 2.1 License - LGPL 2.1 License + <p><b>Sailfin version %1</b><br/>Copyright © Chris Josten 2020–%2</p><p>Sailfin is Free Software licensed under the <a href='lgpl'>LGPL-v2.1</a> or later, at your choice. You can <a href="github">view its source code on GitHub</a>. Parts of the code of Sailfin are from other libraries. <a href='3rdparty'>View their licenses here</a>.</p> + + + + Contributors + SectionHeader diff --git a/sailfish/translations/harbour-sailfin.ts b/sailfish/translations/harbour-sailfin.ts index c41fcb0..60d8f96 100644 --- a/sailfish/translations/harbour-sailfin.ts +++ b/sailfish/translations/harbour-sailfin.ts @@ -5,7 +5,7 @@ AboutPage About Sailfin - About Sailfin1 + About Sailfin Open externally