forked from Silverfish/proton-bridge
GODT-1560: Dependecy licenses update and link.
This commit is contained in:
@ -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"
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -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"`
|
||||
|
||||
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user