GODT-1560: Dependecy licenses update and link.

This commit is contained in:
Jakub
2022-05-16 16:42:21 +02:00
parent 5033e9718c
commit d6d7ea592e
10 changed files with 203 additions and 58 deletions

View File

@ -815,6 +815,7 @@ Window {
property url logsPath: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0]
property url licensePath: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0]
property url releaseNotesLink: Qt.resolvedUrl("https://protonmail.com/download/bridge/early_releases.html")
property url dependencyLicensesLink: Qt.resolvedUrl("https://github.com/ProtonMail/proton-bridge/blob/master/COPYING_NOTES.md#dependencies")
property url landingPageLink: Qt.resolvedUrl("https://protonmail.com/bridge")
property string colorSchemeName: "light"

View File

@ -105,10 +105,11 @@ SettingsView {
horizontalAlignment: Text.AlignHCenter
text: qsTr("Proton Mail Bridge v%1<br>© 2021 Proton AG<br>%2 %3").
arg(root.backend.version).
arg(link(root.backend.licensePath, qsTr("License"))).
arg(link(root.backend.releaseNotesLink, qsTr("Release notes")))
text: qsTr("Proton Mail Bridge v%1<br>© 2021 Proton AG<br>%2 %3<br>%4").
arg(root.backend.version).
arg(link(root.backend.licensePath, qsTr("License"))).
arg(link(root.backend.dependencyLicensesLink, qsTr("Dependencies"))).
arg(link(root.backend.releaseNotesLink, qsTr("Release notes")))
onLinkActivated: Qt.openUrlExternally(link)
}

View File

@ -40,6 +40,7 @@ func (f *FrontendQt) setLogsPath() {
func (f *FrontendQt) setLicensePath() {
f.qml.SetLicensePath(core.QUrl_FromLocalFile(f.locations.GetLicenseFilePath()))
f.qml.SetDependencyLicensesLink(core.NewQUrl3(f.locations.GetDependencyLicensesLink(), core.QUrl__TolerantMode))
}
func (f *FrontendQt) setCurrentEmailClient() {

View File

@ -127,6 +127,7 @@ type QMLBackend struct {
_ core.QUrl `property:"logsPath"`
_ core.QUrl `property:"licensePath"`
_ core.QUrl `property:"releaseNotesLink"`
_ core.QUrl `property:"dependencyLicensesLink"`
_ core.QUrl `property:"landingPageLink"`
_ string `property:"colorSchemeName"`

View File

@ -101,6 +101,11 @@ func (l *Locations) getLicenseFilePath() string {
return ""
}
// GetDependencyLicensesLink returns link to page listing dependencies.
func (l *Locations) GetDependencyLicensesLink() string {
return "https://github.com/ProtonMail/proton-bridge/blob/master/COPYING_NOTES.md#dependencies"
}
// ProvideSettingsPath returns a location for user settings (e.g. ~/.config/<company>/<app>).
// It creates it if it doesn't already exist.
func (l *Locations) ProvideSettingsPath() (string, error) {