From b7b2297635f6cc927ab63af1b623a2c8f2555bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0koda?= Date: Fri, 23 Oct 2020 10:05:26 +0200 Subject: [PATCH] Release notes --- Makefile | 27 ++- internal/frontend/cli-ie/frontend.go | 5 - internal/frontend/cli-ie/updates.go | 4 - internal/frontend/cli/frontend.go | 6 +- internal/frontend/cli/updates.go | 4 - .../frontend/qml/BridgeUI/DialogYesNo.qml | 2 - internal/frontend/qml/BridgeUI/HelpView.qml | 3 +- internal/frontend/qml/BridgeUI/MainWindow.qml | 25 +-- .../frontend/qml/BridgeUI/VersionInfo.qml | 127 ------------- internal/frontend/qml/BridgeUI/qmldir | 1 - internal/frontend/qml/Gui.qml | 5 - .../qml/ImportExportUI/DialogYesNo.qml | 1 - .../frontend/qml/ImportExportUI/HelpView.qml | 3 +- .../qml/ImportExportUI/MainWindow.qml | 31 +--- .../qml/ImportExportUI/VersionInfo.qml | 125 ------------- .../frontend/qml/ProtonUI/DialogUpdate.qml | 9 +- .../frontend/qml/ProtonUI/InformationBar.qml | 6 +- internal/frontend/qml/tst_Gui.qml | 4 +- internal/frontend/qml/tst_GuiIE.qml | 5 +- internal/frontend/qt-ie/ui.go | 5 +- internal/frontend/qt/translate.ts | 13 -- internal/frontend/qt/ui.go | 5 +- internal/frontend/resources.qrc | 2 - release-notes/bridge.md | 61 ++++++ release-notes/import-export.md | 26 +++ utils/release-notes.sh | 24 --- utils/release_notes.css | 174 ++++++++++++++++++ utils/release_notes.sh | 40 ++++ 28 files changed, 340 insertions(+), 403 deletions(-) delete mode 100644 internal/frontend/qml/BridgeUI/VersionInfo.qml delete mode 100644 internal/frontend/qml/ImportExportUI/VersionInfo.qml create mode 100644 release-notes/bridge.md create mode 100644 release-notes/import-export.md delete mode 100755 utils/release-notes.sh create mode 100644 utils/release_notes.css create mode 100755 utils/release_notes.sh diff --git a/Makefile b/Makefile index 062c6293..efea918f 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ TARGET_OS?=${GOOS} .PHONY: build build-ie build-nogui build-ie-nogui build-launcher build-launcher-ie versioner # Keep version hardcoded so app build works also without Git repository. -BRIDGE_APP_VERSION?=1.5.5-git -IE_APP_VERSION?=1.2.3-git +BRIDGE_APP_VERSION?=1.5.5+git +IE_APP_VERSION?=1.2.3+git APP_VERSION:=${BRIDGE_APP_VERSION} SRC_ICO:=logo.ico SRC_ICNS:=Bridge.icns @@ -186,7 +186,7 @@ install-go-mod-outdated: ## Checks, mocks and docs -.PHONY: check-has-go add-license change-copyright-year test bench coverage mocks lint-license lint-golang lint updates doc +.PHONY: check-has-go add-license change-copyright-year test bench coverage mocks lint-license lint-golang lint updates doc release-notes check-has-go: @which go || (echo "Install Go-lang!" && exit 1) @@ -256,18 +256,22 @@ updates: install-go-mod-outdated doc: godoc -http=:6060 +release-notes: release-notes/bridge.html release-notes/import-export.html + +release-notes/bridge.html: + ./utils/release_notes.sh Bridge + +release-notes/import-export.html: + ./utils/release_notes.sh Import-Export + .PHONY: gofiles # Following files are for the whole app so it makes sense to have them in bridge package. # (Options like cmd or internal were considered and bridge package is the best place for them.) -gofiles: ./internal/bridge/credits.go ./internal/bridge/release_notes.go ./internal/importexport/credits.go ./internal/importexport/release_notes.go +gofiles: ./internal/bridge/credits.go ./internal/importexport/credits.go ./internal/bridge/credits.go: ./utils/credits.sh go.mod cd ./utils/ && ./credits.sh bridge -./internal/bridge/release_notes.go: ./utils/release-notes.sh ./release-notes/notes-bridge.txt ./release-notes/bugs-bridge.txt - cd ./utils/ && ./release-notes.sh bridge ./internal/importexport/credits.go: ./utils/credits.sh go.mod cd ./utils/ && ./credits.sh importexport -./internal/importexport/release_notes.go: ./utils/release-notes.sh ./release-notes/notes-importexport.txt ./release-notes/bugs-importexport.txt - cd ./utils/ && ./release-notes.sh importexport ## Run and debug @@ -319,3 +323,10 @@ clean: clean-vendor rm -rf cmd/Import-Export/deploy rm -f build last.log mem.pprof main.go rm -rf logo.ico icon.rc icon_windows.syso internal/frontend/qt/icon_windows.syso + rm -f release-notes/bridge.html + rm -f release-notes/import-export.html + +.PHONY: generate +generate: + go generate ./... + $(MAKE) add-license diff --git a/internal/frontend/cli-ie/frontend.go b/internal/frontend/cli-ie/frontend.go index 8123c04d..eedc9e53 100644 --- a/internal/frontend/cli-ie/frontend.go +++ b/internal/frontend/cli-ie/frontend.go @@ -102,11 +102,6 @@ func New( //nolint[funlen] Aliases: []string{"man"}, Func: fe.printManual, }) - fe.AddCmd(&ishell.Cmd{Name: "release-notes", - Help: "print release notes. (aliases: notes, fixed-bugs, bugs, ver, version)", - Aliases: []string{"notes", "fixed-bugs", "bugs", "ver", "version"}, - Func: fe.printLocalReleaseNotes, - }) fe.AddCmd(&ishell.Cmd{Name: "credits", Help: "print used resources.", Func: fe.printCredits, diff --git a/internal/frontend/cli-ie/updates.go b/internal/frontend/cli-ie/updates.go index e4e8dc19..332b58fe 100644 --- a/internal/frontend/cli-ie/updates.go +++ b/internal/frontend/cli-ie/updates.go @@ -28,10 +28,6 @@ func (f *frontendCLI) checkUpdates(c *ishell.Context) { f.Println("Your version is up to date.") } -func (f *frontendCLI) printLocalReleaseNotes(c *ishell.Context) { - f.Println("TODO") -} - func (f *frontendCLI) printCredits(c *ishell.Context) { for _, pkg := range strings.Split(importexport.Credits, ";") { f.Println(pkg) diff --git a/internal/frontend/cli/frontend.go b/internal/frontend/cli/frontend.go index b67fa723..ed3c3ff7 100644 --- a/internal/frontend/cli/frontend.go +++ b/internal/frontend/cli/frontend.go @@ -138,11 +138,7 @@ func New( //nolint[funlen] Aliases: []string{"man"}, Func: fe.printManual, }) - fe.AddCmd(&ishell.Cmd{Name: "release-notes", - Help: "print release notes. (aliases: notes, fixed-bugs, bugs, ver, version)", - Aliases: []string{"notes", "fixed-bugs", "bugs", "ver", "version"}, - Func: fe.printLocalReleaseNotes, - }) + fe.AddCmd(&ishell.Cmd{Name: "credits", Help: "print used resources.", Func: fe.printCredits, diff --git a/internal/frontend/cli/updates.go b/internal/frontend/cli/updates.go index 45969516..01c84845 100644 --- a/internal/frontend/cli/updates.go +++ b/internal/frontend/cli/updates.go @@ -28,10 +28,6 @@ func (f *frontendCLI) checkUpdates(c *ishell.Context) { f.Println("Your version is up to date.") } -func (f *frontendCLI) printLocalReleaseNotes(c *ishell.Context) { - f.Println("TODO") -} - func (f *frontendCLI) printCredits(c *ishell.Context) { for _, pkg := range strings.Split(bridge.Credits, ";") { f.Println(pkg) diff --git a/internal/frontend/qml/BridgeUI/DialogYesNo.qml b/internal/frontend/qml/BridgeUI/DialogYesNo.qml index d7a8d1ba..ca1470bf 100644 --- a/internal/frontend/qml/BridgeUI/DialogYesNo.qml +++ b/internal/frontend/qml/BridgeUI/DialogYesNo.qml @@ -340,8 +340,6 @@ Dialog { winMain.dialogAddUser .visible = false winMain.dialogChangePort .visible = false winMain.dialogCredits .visible = false - winMain.dialogVersionInfo .visible = false - // dialogFirstStart should reappear again after closing global root.visible = true } diff --git a/internal/frontend/qml/BridgeUI/HelpView.qml b/internal/frontend/qml/BridgeUI/HelpView.qml index c853b345..e422df80 100644 --- a/internal/frontend/qml/BridgeUI/HelpView.qml +++ b/internal/frontend/qml/BridgeUI/HelpView.qml @@ -138,8 +138,7 @@ Item { fontSize : Style.main.fontSize textUnderline : true onClicked : { - go.getLocalVersionInfo() - winMain.dialogVersionInfo.show() + Qt.openUrlExternally(go.releaseNotesLink) } } } diff --git a/internal/frontend/qml/BridgeUI/MainWindow.qml b/internal/frontend/qml/BridgeUI/MainWindow.qml index f7388cfa..6006141e 100644 --- a/internal/frontend/qml/BridgeUI/MainWindow.qml +++ b/internal/frontend/qml/BridgeUI/MainWindow.qml @@ -38,7 +38,6 @@ Window { property alias dialogUpdate : dialogUpdate property alias dialogFirstStart : dialogFirstStart property alias dialogGlobal : dialogGlobal - property alias dialogVersionInfo : dialogVersionInfo property alias dialogConnectionTroubleshoot : dialogConnectionTroubleshoot property alias bubbleNote : bubbleNote property alias addAccountTip : addAccountTip @@ -66,7 +65,6 @@ Window { !dialogUpdate .visible && !dialogFirstStart .visible && !dialogGlobal .visible && - !dialogVersionInfo .visible && !bubbleNote .visible Accessible.role: Accessible.Grouping @@ -350,13 +348,13 @@ Window { Check release notes to learn what is new in %2.
Use your package manager to update or download and install the new version manually from

%3', - "Message for update in Linux").arg("releaseNotes").arg(go.newversion).arg(dialogUpdate.manualLinks) + "Message for update in Linux").arg(go.releaseNotesLink).arg(go.newversion).arg(dialogUpdate.manualLinks) } else { return qsTr('A new version of Bridge is available.
Check release notes to learn what is new in %2.
You can continue with the update or download and install the new version manually from

%3', - "Message for update in Win/Mac").arg("releaseNotes").arg(go.newversion).arg(go.landingPage) + "Message for update in Win/Mac").arg(go.releaseNotesLink).arg(go.newversion).arg(go.landingPage) } } } @@ -373,25 +371,6 @@ Window { id: dialogTlsCert } - Dialog { - id: dialogVersionInfo - property bool checkVersionOnClose : false - title: qsTr("Information about", "title of release notes page") + " v" + go.newversion - VersionInfo { } - onShow : { - // Hide information bar with old version - if (infoBar.state=="oldVersion") { - infoBar.state="upToDate" - dialogVersionInfo.checkVersionOnClose = true - } - } - onHide : { - // Reload current version based on online status - if (dialogVersionInfo.checkVersionOnClose) go.runCheckVersion(false) - dialogVersionInfo.checkVersionOnClose = false - } - } - DialogYesNo { id: dialogGlobal question : "" diff --git a/internal/frontend/qml/BridgeUI/VersionInfo.qml b/internal/frontend/qml/BridgeUI/VersionInfo.qml deleted file mode 100644 index 6be6571e..00000000 --- a/internal/frontend/qml/BridgeUI/VersionInfo.qml +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2021 Proton Technologies AG -// -// This file is part of ProtonMail Bridge. -// -// ProtonMail Bridge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// ProtonMail Bridge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . - -// credits - -import QtQuick 2.8 -import BridgeUI 1.0 -import ProtonUI 1.0 - -Item { - Rectangle { - id: wrapper - anchors.centerIn: parent - width: 2*Style.main.width/3 - height: Style.main.height - 6*Style.dialog.titleSize - color: "transparent" - - Flickable { - anchors.fill : wrapper - contentWidth : wrapper.width - contentHeight : content.height - flickableDirection : Flickable.VerticalFlick - clip : true - - - Column { - id: content - anchors.top: parent.top - anchors.horizontalCenter: parent.horizontalCenter - width: wrapper.width - spacing: Style.dialog.spacing - - AccessibleText { - visible: go.changelog != "" - anchors { - left: parent.left - } - font.bold: true - font.pointSize: Style.main.fontSize * Style.pt - color: Style.main.text - text: qsTr("Release notes", "list of release notes for this version of the app") + ":" - } - - AccessibleSelectableText { - anchors { - left: parent.left - leftMargin: Style.main.leftMargin - } - font { - pointSize : Style.main.fontSize * Style.pt - } - width: wrapper.width - anchors.leftMargin - onLinkActivated: { - Qt.openUrlExternally(link) - } - wrapMode: Text.Wrap - color: Style.main.text - text: go.changelog - } - - AccessibleText { - visible: go.bugfixes != "" - anchors { - left: parent.left - } - font.bold: true - font.pointSize: Style.main.fontSize * Style.pt - color: Style.main.text - text: qsTr("Fixed bugs", "list of bugs fixed for this version of the app") + ":" - } - - AccessibleSelectableText { - visible: go.bugfixes!="" - anchors { - left: parent.left - leftMargin: Style.main.leftMargin - } - font { - pointSize : Style.main.fontSize * Style.pt - } - width: wrapper.width - anchors.leftMargin - onLinkActivated: { - Qt.openUrlExternally(link) - } - wrapMode: Text.Wrap - color: Style.main.text - text: go.bugfixes - } - - Rectangle{id:spacer; color:Style.transparent; width: Style.main.dummy; height: buttonClose.height} - - ButtonRounded { - id: buttonClose - anchors.horizontalCenter: content.horizontalCenter - text: qsTr("Close") - onClicked: { - dialogVersionInfo.hide() - } - } - - - AccessibleSelectableText { - anchors.horizontalCenter: content.horizontalCenter - font { - pointSize : Style.main.fontSize * Style.pt - } - color: Style.main.textDisabled - text: "\n Current: "+go.fullversion - } - } - } - } -} diff --git a/internal/frontend/qml/BridgeUI/qmldir b/internal/frontend/qml/BridgeUI/qmldir index e7b9b66e..44ca5cce 100644 --- a/internal/frontend/qml/BridgeUI/qmldir +++ b/internal/frontend/qml/BridgeUI/qmldir @@ -12,4 +12,3 @@ ManualWindow 1.0 ManualWindow.qml OutgoingNoEncPopup 1.0 OutgoingNoEncPopup.qml SettingsView 1.0 SettingsView.qml StatusFooter 1.0 StatusFooter.qml -VersionInfo 1.0 VersionInfo.qml diff --git a/internal/frontend/qml/Gui.qml b/internal/frontend/qml/Gui.qml index 5882e839..d57bfe7d 100644 --- a/internal/frontend/qml/Gui.qml +++ b/internal/frontend/qml/Gui.qml @@ -306,10 +306,5 @@ Item { gui.winMain.showAndRise() } go.runCheckVersion(false) - - if (go.isFreshVersion) { - go.getLocalVersionInfo() - gui.winMain.dialogVersionInfo.show() - } } } diff --git a/internal/frontend/qml/ImportExportUI/DialogYesNo.qml b/internal/frontend/qml/ImportExportUI/DialogYesNo.qml index c1c8e18f..f7abd3e5 100644 --- a/internal/frontend/qml/ImportExportUI/DialogYesNo.qml +++ b/internal/frontend/qml/ImportExportUI/DialogYesNo.qml @@ -314,7 +314,6 @@ Dialog { // hide all other dialogs winMain.dialogAddUser .visible = false winMain.dialogCredits .visible = false - //winMain.dialogVersionInfo .visible = false // dialogFirstStart should reappear again after closing global root.visible = true } diff --git a/internal/frontend/qml/ImportExportUI/HelpView.qml b/internal/frontend/qml/ImportExportUI/HelpView.qml index e3518387..47b7b076 100644 --- a/internal/frontend/qml/ImportExportUI/HelpView.qml +++ b/internal/frontend/qml/ImportExportUI/HelpView.qml @@ -130,8 +130,7 @@ Item { MouseArea { anchors.fill: parent onClicked : { - go.getLocalVersionInfo() - winMain.dialogVersionInfo.show() + Qt.openUrlExternally(go.releaseNotesLink) } cursorShape: Qt.PointingHandCursor } diff --git a/internal/frontend/qml/ImportExportUI/MainWindow.qml b/internal/frontend/qml/ImportExportUI/MainWindow.qml index f446b0c5..613c41c7 100644 --- a/internal/frontend/qml/ImportExportUI/MainWindow.qml +++ b/internal/frontend/qml/ImportExportUI/MainWindow.qml @@ -34,7 +34,6 @@ Window { property alias dialogAddUser : dialogAddUser property alias dialogGlobal : dialogGlobal property alias dialogCredits : dialogCredits - property alias dialogVersionInfo : dialogVersionInfo property alias dialogUpdate : dialogUpdate property alias popupMessage : popupMessage property alias popupFolderEdit : popupFolderEdit @@ -61,7 +60,6 @@ Window { property bool activeContent : !dialogAddUser .visible && !dialogCredits .visible && - !dialogVersionInfo .visible && !dialogGlobal .visible && !dialogUpdate .visible && !dialogImport .visible && @@ -278,13 +276,13 @@ Window { Check release notes to learn what is new in %3.
Use your package manager to update or download and install new the version manually from

%4', - "Message for update in Linux").arg(go.programTitle).arg("releaseNotes").arg(go.newversion).arg(go.landingPage) + "Message for update in Linux").arg(go.programTitle).arg(go.releaseNotesLink).arg(go.newversion).arg(go.landingPage) } else { return qsTr('A new version of %1 is available.
Check release notes to learn what is new in %3.
You can continue with update or download and install new the version manually from

%4', - "Message for update in Win/Mac").arg(go.programTitle).arg("releaseNotes").arg(go.newversion).arg(go.landingPage) + "Message for update in Win/Mac").arg(go.programTitle).arg(go.releaseNotesLink).arg(go.newversion).arg(go.landingPage) } } } @@ -327,31 +325,6 @@ Window { Credits { } } - Dialog { - id: dialogVersionInfo - anchors { - top : infoBar.bottom - bottomMargin: innerWindowBorder - leftMargin: innerWindowBorder - rightMargin: innerWindowBorder - } - property bool checkVersion : false - title: qsTr("Information about", "title of release notes page") + " v" + go.newversion - VersionInfo { } - onShow : { - // Hide information bar with olde version - if ( infoBar.state=="oldVersion" ) { - infoBar.state="upToDate" - dialogVersionInfo.checkVersion = true - } - } - onHide : { - // Reload current version based on online status - if (dialogVersionInfo.checkVersion) go.runCheckVersion(false) - dialogVersionInfo.checkVersion = false - } - } - DialogYesNo { id: dialogGlobal question : "" diff --git a/internal/frontend/qml/ImportExportUI/VersionInfo.qml b/internal/frontend/qml/ImportExportUI/VersionInfo.qml deleted file mode 100644 index 7296e2df..00000000 --- a/internal/frontend/qml/ImportExportUI/VersionInfo.qml +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2021 Proton Technologies AG -// -// This file is part of ProtonMail Bridge. -// -// ProtonMail Bridge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// ProtonMail Bridge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with ProtonMail Bridge. If not, see . - -// credits - -import QtQuick 2.8 -import ProtonUI 1.0 -import ImportExportUI 1.0 - -Item { - id: root - Rectangle { - id: wrapper - anchors.centerIn: parent - width: 2*Style.main.width/3 - height: Style.main.height - 6*Style.dialog.titleSize - color: "transparent" - - Flickable { - anchors.fill : wrapper - contentWidth : wrapper.width - contentHeight : content.height - flickableDirection : Flickable.VerticalFlick - clip : true - - - Column { - id: content - anchors.top: parent.top - anchors.horizontalCenter: parent.horizontalCenter - width: wrapper.width - spacing: 5 - - Text { - visible: go.changelog != "" - anchors { - left: parent.left - } - font.bold: true - font.pointSize: Style.main.fontSize * Style.pt - color: Style.main.text - text: qsTr("Release notes:") - } - - Text { - anchors { - left: parent.left - leftMargin: Style.main.leftMargin - } - font.pointSize: Style.main.fontSize * Style.pt - width: wrapper.width - anchors.leftMargin - wrapMode: Text.Wrap - color: Style.main.text - text: go.changelog - } - - Text { - visible: go.bugfixes != "" - anchors { - left: parent.left - } - font.bold: true - font.pointSize: Style.main.fontSize * Style.pt - color: Style.main.text - text: qsTr("Fixed bugs:") - } - - Repeater { - anchors.fill: parent - model: go.bugfixes.split(";") - - Text { - visible: go.bugfixes!="" - anchors { - left: parent.left - leftMargin: Style.main.leftMargin - } - font.pointSize: Style.main.fontSize * Style.pt - width: wrapper.width - anchors.leftMargin - wrapMode: Text.Wrap - color: Style.main.text - text: modelData - } - } - - Rectangle{id:spacer; color:"transparent"; width:10; height: buttonClose.height} - - - ButtonRounded { - id: buttonClose - anchors.horizontalCenter: content.horizontalCenter - text: "Close" - onClicked: { - root.parent.hide() - } - } - - - AccessibleSelectableText { - anchors.horizontalCenter: content.horizontalCenter - font { - pointSize : Style.main.fontSize * Style.pt - } - color: Style.main.textDisabled - text: "\n Current: "+go.fullversion - } - } - } - } -} - diff --git a/internal/frontend/qml/ProtonUI/DialogUpdate.qml b/internal/frontend/qml/ProtonUI/DialogUpdate.qml index e6643c77..fc78c19b 100644 --- a/internal/frontend/qml/ProtonUI/DialogUpdate.qml +++ b/internal/frontend/qml/ProtonUI/DialogUpdate.qml @@ -62,13 +62,8 @@ Dialog { onLinkActivated : { console.log("clicked link:", link) - if (link == "releaseNotes"){ - root.hide() - winMain.dialogVersionInfo.show() - } else { - root.hide() - Qt.openUrlExternally(link) - } + root.hide() + Qt.openUrlExternally(link) } MouseArea { diff --git a/internal/frontend/qml/ProtonUI/InformationBar.qml b/internal/frontend/qml/ProtonUI/InformationBar.qml index 1aeb90c8..3e77463a 100644 --- a/internal/frontend/qml/ProtonUI/InformationBar.qml +++ b/internal/frontend/qml/ProtonUI/InformationBar.qml @@ -61,14 +61,14 @@ Rectangle { id: message font.pointSize: root.fontSize * Style.pt } - + ClickIconText { anchors.verticalCenter : message.verticalCenter text : "("+go.newversion+" " + qsTr("release notes", "display the release notes from the new version")+")" - visible : root.state=="oldVersion" && ( go.changelog!="" || go.bugfixes!="") + visible : root.state=="oldVersion" iconText : "" onClicked : { - dialogVersionInfo.show() + Qt.openUrlExternally(go.releaseNotesLink) } fontSize : root.fontSize } diff --git a/internal/frontend/qml/tst_Gui.qml b/internal/frontend/qml/tst_Gui.qml index 4acbb395..0afd738e 100644 --- a/internal/frontend/qml/tst_Gui.qml +++ b/internal/frontend/qml/tst_Gui.qml @@ -274,9 +274,7 @@ Window { property string landingPage : "https://landing.page" //property string downloadLink: "https://landing.page/download/link" property string downloadLink: "https://protonmail.com/download/beta/protonmail-bridge-1.1.5-1.x86_64.rpm;https://www.protonmail.com/downloads/beta/Desktop-Bridge-link1.exe;https://www.protonmail.com/downloads/beta/Desktop-Bridge-link1.exe;https://www.protonmail.com/downloads/beta/Desktop-Bridge-link1.exe;" - //property string changelog : "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." - property string changelog : "• Support of encryption to external PGP recipients using contacts created on beta.protonmail.com (see https://protonmail.com/blog/pgp-vulnerability-efail/ to understand the vulnerabilities that may be associated with sending to other PGP clients)\n• Notification that outgoing email will be delivered as non-encrypted.\n• NOTE: Due to a change of the keychain format, you will need to add your account(s) to the Bridge after installing this version" - property string bugfixes : "• Support accounts with same user names\n• Support sending vCalendar event" + property string releaseNotesLink : "https://protonmail.com/download/bridge/release_notes.html" property string credits : "here;goes;list;;of;;used;packages;" property real progress: 0.3 diff --git a/internal/frontend/qml/tst_GuiIE.qml b/internal/frontend/qml/tst_GuiIE.qml index 8c685d33..8f9d1635 100644 --- a/internal/frontend/qml/tst_GuiIE.qml +++ b/internal/frontend/qml/tst_GuiIE.qml @@ -833,10 +833,7 @@ Window { property string programTitle : "ProtonMail Import-Export app" property string newversion : "q0.1.0" property string landingPage : "https://landing.page" - property string changelog : "• Lorem ipsum dolor sit amet\n• consetetur sadipscing elitr,\n• sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,\n• sed diam voluptua.\n• At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." - //property string changelog : "" - property string bugfixes : "• lorem ipsum dolor sit amet;• consetetur sadipscing elitr;• sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat;• sed diam voluptua;• at vero eos et accusam et justo duo dolores et ea rebum;• stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet" - //property string bugfixes : "" + property string releaseNotesLink : "https://protonmail.com/download/ie/release_notes.html" property real progress: 0.0 property int progressFails: 0 diff --git a/internal/frontend/qt-ie/ui.go b/internal/frontend/qt-ie/ui.go index f8b59a38..0c435983 100644 --- a/internal/frontend/qt-ie/ui.go +++ b/internal/frontend/qt-ie/ui.go @@ -53,8 +53,7 @@ type GoQMLInterface struct { _ string `property:"fullversion"` _ string `property:"downloadLink"` _ string `property:"landingPage"` - _ string `property:"changelog"` - _ string `property:"bugfixes"` + _ string `property:"releaseNotesLink"` // translations _ string `property:"wrongCredentials"` @@ -171,6 +170,8 @@ func (s *GoQMLInterface) SetFrontend(f *FrontendQt) { s.SetProgramTitle(f.programName) s.ConnectOpenLicenseFile(f.openLicenseFile) + s.SetReleaseNotesLink("https://protonmail.com/download/ie/release_notes.html") + s.ConnectGetLocalVersionInfo(f.getLocalVersionInfo) s.ConnectIsNewVersionAvailable(f.isNewVersionAvailable) s.ConnectGetBackendVersion(func() string { diff --git a/internal/frontend/qt/translate.ts b/internal/frontend/qt/translate.ts index acae0f76..468ad908 100644 --- a/internal/frontend/qt/translate.ts +++ b/internal/frontend/qt/translate.ts @@ -653,17 +653,4 @@ - - VersionInfo - - - Release notes: - - - - - Fixed bugs: - - - diff --git a/internal/frontend/qt/ui.go b/internal/frontend/qt/ui.go index dbffa3db..6d3e5bfc 100644 --- a/internal/frontend/qt/ui.go +++ b/internal/frontend/qt/ui.go @@ -49,8 +49,7 @@ type GoQMLInterface struct { _ string `property:"fullversion"` _ string `property:"downloadLink"` _ string `property:"landingPage"` - _ string `property:"changelog"` - _ string `property:"bugfixes"` + _ string `property:"releaseNotesLink"` // Translations. _ string `property:"wrongCredentials"` @@ -181,6 +180,8 @@ func (s *GoQMLInterface) SetFrontend(f *FrontendQt) { s.SetGoos(runtime.GOOS) s.SetProgramTitle(f.programName) + s.SetReleaseNotesLink("https://protonmail.com/download/bridge/release_notes.html") + s.ConnectGetBackendVersion(func() string { return f.programVer }) diff --git a/internal/frontend/resources.qrc b/internal/frontend/resources.qrc index dff9f49f..4fe85937 100644 --- a/internal/frontend/resources.qrc +++ b/internal/frontend/resources.qrc @@ -71,7 +71,6 @@ ./qml/BridgeUI/OutgoingNoEncPopup.qml ./qml/BridgeUI/SettingsView.qml ./qml/BridgeUI/StatusFooter.qml - ./qml/BridgeUI/VersionInfo.qml ./qml/ImportExportUI/qmldir @@ -104,7 +103,6 @@ ./qml/ImportExportUI/SelectFolderMenu.qml ./qml/ImportExportUI/SelectLabelsMenu.qml ./qml/ImportExportUI/SettingsView.qml - ./qml/ImportExportUI/VersionInfo.qml ./share/icons/folder_open.png ./share/icons/envelope_open.png diff --git a/release-notes/bridge.md b/release-notes/bridge.md new file mode 100644 index 00000000..cf8ae251 --- /dev/null +++ b/release-notes/bridge.md @@ -0,0 +1,61 @@ +## v1.4.5 +- 2020-10-22 + +### New + +Improving Performance + + * Bulletproofing against any potential data loss and/or duplication + * Performance improvements for handling attachments and non-standard formatting + * Better stability of the message parser + +Outgoing messages support + + * Additional foreign encoding support for outgoing messages + * Complete refactor of the way messages are parsed to simplify code maintenance + * Improved User-Agent detection + +Added MacOS Big Sur compatibility + +Added persistent anonymous API cookies + +### Fixed + +Fixed rare mail loss when moving from Spam folder + +Limited log size + +Fixed Linux font issues (mouse hover) + +## v1.3.3 +- 2020-08-12 + +### New + +Improvements to Alternative Routing + + * Version two of this feature is now more resilient to unstable internet connections, which results in a smoother experience using this feature. + * Includes fixes to previous implementation of Alternative Routing when first starting the application or when turning it off. + +Email parsing improvements + + * Improved detection of email encodings embedded in html/xml in addition to message header; add a fallback option if encoding is not specified and decoding as UTF8 fails (ISO-8859-1) + * tweaked logic of parsing "References" header. + +User interaction improvements + + * Some smaller improvements in specific cases to make the interaction with Proton Bridge clearer for the user + +Code updates & maintenance + + * Migrated to GopenPGP v2 + * updates to GoIMAPv1 + * increased bbolt version to 1.3.5 and various improvements regarding extensibility and maintainability for upcoming work. + +General stability improvements + + * Improvements to the behavior of the application under various unstable internet conditions. + +### Fixed + +Fixed a slew of smaller bugs and some conditions which could cause the application to crash. \ No newline at end of file diff --git a/release-notes/import-export.md b/release-notes/import-export.md new file mode 100644 index 00000000..806779a0 --- /dev/null +++ b/release-notes/import-export.md @@ -0,0 +1,26 @@ +## v1.1.2 +- 2020-09-23 + +### New + +Improving performance + + * Speed up import by implementing parallel processing (parallel fetch, encrypt and upload of messages) + * Optimising the initial fetch of messages from external accounts + +Better message parsing + + * Better handling of attachments and non-standard formatting + * Improved stability of the message parser + +Improved metrics + + * Added persistent anonymous API cookies + + +### Fixed + +Fixed issues causing failing of import + + * Import from mbox files with long lines + * Improvements to import from Yahoo accounts \ No newline at end of file diff --git a/utils/release-notes.sh b/utils/release-notes.sh deleted file mode 100755 index 319c2f8f..00000000 --- a/utils/release-notes.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2021 Proton Technologies AG -# -# This file is part of ProtonMail Bridge. -# -# ProtonMail Bridge is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ProtonMail Bridge is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ProtonMail Bridge. If not, see . - -PACKAGE=$1 - -# Generate release notes information -cat ../utils/license_header.txt > ../internal/$PACKAGE/release_notes.go -echo -e "// Code generated by `echo $0` at '`date`'. DO NOT EDIT.\n\npackage ${PACKAGE}\n\nconst ReleaseNotes = \``cat ../release-notes/notes-${PACKAGE}.txt`\n\`\n\nconst ReleaseFixedBugs = \``cat ../release-notes/bugs-${PACKAGE}.txt`\n\`" >> ../internal/$PACKAGE/release_notes.go diff --git a/utils/release_notes.css b/utils/release_notes.css new file mode 100644 index 00000000..83fbad37 --- /dev/null +++ b/utils/release_notes.css @@ -0,0 +1,174 @@ +/* CUSTOM CSS */ +html, body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", system-ui, "Ubuntu", "Droid Sans", sans-serif; + font-size: 14px; + padding: 0 26px; + line-height: 1.6 22px; + word-wrap: break-word; +} + +body { + border: 1px dashed #aaa; + max-width: 1024px; + margin: auto; + margin-top: 2em; + margin-bottom: 2em; + padding-bottom: 1em; +} + +h1 { + font-weight: 400; + color: #666; + font-size: 2em; + text-align: center; + +} + +h2 { + font-size: 2.6em; + font-weight: 400; + color: #666; + margin-bottom: 0; +} + +h3 { + font-size: 1.6em; + font-weight: 400; + color: #222; + margin: 0; + padding: 0; +} + +p { + padding: 1em 2em 0 2em; + margin: 0; +} + +a { + color: rgb(0, 116, 224); + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +ul { + list-style-type: square; + list-style-position: inside; + margin: 0; + padding: 0 3em 1em 3em; +} + +li { + padding-top: 1em; + color: #666; +} + +section[id^="new"] h3::before { + content: ""; + display: inline-block; + margin-right: 0.3em; + width: 1em; + height: 1em; + background-size: 1em; + background-position: center; + background-repeat: no-repeat; + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj4KPHBhdGggZD0iTTUyOC4xIDE3MS41TDM4MiAxNTAuMiAzMTYuNyAxNy44Yy0xMS43LTIzLjYtNDUuNi0yMy45LTU3LjQgMEwxOTQgMTUwLjIgNDcuOSAxNzEuNWMtMjYuMiAzLjgtMzYuNyAzNi4xLTE3LjcgNTQuNmwxMDUuNyAxMDMtMjUgMTQ1LjVjLTQuNSAyNi4zIDIzLjIgNDYgNDYuNCAzMy43TDI4OCA0MzkuNmwxMzAuNyA2OC43YzIzLjIgMTIuMiA1MC45LTcuNCA0Ni40LTMzLjdsLTI1LTE0NS41IDEwNS43LTEwM2MxOS0xOC41IDguNS01MC44LTE3LjctNTQuNnpNMzg4LjYgMzEyLjNsMjMuNyAxMzguNEwyODggMzg1LjRsLTEyNC4zIDY1LjMgMjMuNy0xMzguNC0xMDAuNi05OCAxMzktMjAuMiA2Mi4yLTEyNiA2Mi4yIDEyNiAxMzkgMjAuMi0xMDAuNiA5OHoiIGZpbGw9IiMyMjIiLz4KPC9zdmc+Cg==") +} + +section[id^="fixed"] h3::before { + content: ""; + display: inline-block; + margin-right: 0.3em; + width: 1em; + height: 1em; + background-size: 1em; + background-position: center; + background-repeat: no-repeat; + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNjYuNTIzIDM2Ni41MjMiPg0KPHBhdGggZmlsbD0iIzIyMiIgZD0iTTM1OC4zNzksODQuNjQ5Yy0xLjY2Ni0zLjc2Ni01LjA3OC02LjQ2OS05LjEyNS03LjIyOGMtNC4wNTMtMC43NjItOC4yMTEsMC41MjMtMTEuMTI3LDMuNDI5bC00Ni4xNDgsNDUuOTY2LGMtNi45ODYsNi45ODctMTYuMjc5LDEwLjgzNS0yNi4xNjIsMTAuODM2Yy05Ljg4MSwwLTE5LjE3Mi0zLjg0OC0yNi4xNi0xMC44MzdjLTYuOTg4LTYuOTg4LTEwLjgzNy0xNi4yNzgtMTAuODM4LTI2LjE2MSxjMC05Ljg4MywzLjg1LTE5LjE3MywxMC44MjItMjYuMTQ4bDQ2LjEwNy00NS45NzRjMi45MjItMi45MTIsNC4yMTktNy4wNzksMy40NjUtMTEuMTM1Yy0wLjc1NC00LjA1Ni0zLjQ2MS03LjQ3OS03LjIzMi05LjE0NixjLTEyLjEyMS01LjM2Mi0yNS41OTQtOC4xOTctMzguOTY1LTguMTk4Yy0yNC44MzgsMC4wMDEtNDcuODgxLDkuMzYyLTY0Ljg3OSwyNi4zNjFMMTYyLjkzOSw0MS42MSxjLTI2LjM0OCwyNi4zNDgtMzQuMTQ2LDY1LjE3OS0yMC43Miw5OS4yMDdMMTcuMjgxLDI2NS43NTVDNi4xMzgsMjc2LjksMC4wMDEsMjkxLjcxNCwwLDMwNy40NzMsYy0wLjAwMSwxNS43NTksNi4xMzYsMzAuNTc0LDE3LjI3OSw0MS43MTljMTEuMTQ1LDExLjE0NCwyNS45NjEsMTcuMjc5LDQxLjcxOSwxNy4yNzljMTUuNzU5LTAuMDAxLDMwLjU3NC02LjEzNyw0MS43MTktMTcuMjc5LEwyMjUuNjY4LDIyNC4yNGMxMC43MTksNC4xOTEsMjIuMjM4LDYuMzc5LDMzLjc5Nyw2LjM3OWMyNC43MDUsMCw0Ny45My05LjYxOSw2NS4zOTYtMjcuMDg4bDE1LjE5NS0xNS4xOTQsQzM2Ni42NzgsMTYxLjcxNCwzNzQuMDM5LDEyMC4wNDYsMzU4LjM3OSw4NC42NDl6IE0yNTkuNDY1LDIwNS42MTljLTEwLjgwMS0wLjAwMi0yMS40NzctMi41NDEtMzEuMDAyLTcuNDgxLGMtNS4yOTUtMi43NDQtMTEuMzk2LTEuMDc5LTE1LjUxOCwzLjI5M0w4My4wMzgsMzMxLjUxMmMtNi40MjIsNi40MjMtMTQuOTYsOS45NTgtMjQuMDQxLDkuOTU4cy0xNy42MTktMy41MzYtMjQuMDQxLTkuOTU3LGMtNi40Mi02LjQyMi05Ljk1Ny0xNC45NTktOS45NTctMjQuMDRzMy41MzctMTcuNjE5LDkuOTU5LTI0LjA0MWwxMzAuMDYtMTI5LjkyNWM0LjQ4NS00LjI2Miw2LjA0MS0xMC4yMjYsMy4yOTQtMTUuNTIxLGMtMTMuNTk2LTI2LjIyMy04LjU5OC01Ny43OTUsMTIuMzA1LTc4LjY5OGwxNS4xOTctMTUuMTk2YzEyLjI3Ny0xMi4yNzgsMjkuMDQxLTE5LjA0LDQ3LjIwMS0xOS4wNCxjMy4zNzMsMCw2Ljc1MiwwLjI0MywxMC4wOTYsMC43MTlsLTMxLjEzNSwzMS4wNDVjLTExLjcxMSwxMS43MS0xOC4xNTgsMjcuMjc5LTE4LjE1OCw0My44MzksYzAuMDAyLDE2LjU2MSw2LjQ0OSwzMi4xMywxOC4xNiw0My44MzljMTEuNzA5LDExLjcxMSwyNy4yNzksMTguMTYsNDMuODQsMTguMTU5YzE2LjU2MS0wLjAwMiwzMi4xMjktNi40NSw0My44Mi0xOC4xNDEsbDMxLjIxNS0zMS4wOTNjMi45NjUsMjAuOTMxLTMuNjAyLDQyLjM2NC0xOC40NzUsNTcuMjM4bC0xNS4xOTUsMTUuMTk2QzI5NC40MzgsMTk4LjU5OCwyNzcuNDksMjA1LjYxOSwyNTkuNDY1LDIwNS42MTl6Ii8+DQo8cGF0aCBmaWxsPSIjMjIyIiBkPSJNNjEuODk0LDI4NS4wNzhjLTUuMjA5LDAtMTAuMTA2LDIuMDI3LTEzLjc4OSw1LjcxMWMtMy42ODIsMy42ODQtNS43MTEsOC41OC01LjcxMSwxMy43ODlzMi4wMjgsMTAuMTA0LDUuNzExLDEzLjc4OSxjMy42ODMsMy42ODMsOC41OCw1LjcxMSwxMy43ODksNS43MTFjNS4yMDktMC4wMDIsMTAuMTA1LTIuMDI4LDEzLjc4OS01LjcxM2MzLjY4NC0zLjY4Myw1LjcxMS04LjU4LDUuNzExLTEzLjc4NyxjMC01LjIwOS0yLjAyOC0xMC4xMDYtNS43MTEtMTMuNzg5QzcxLjk5OSwyODcuMTA0LDY3LjEwMywyODUuMDc4LDYxLjg5NCwyODUuMDc4eiIvPg0KPC9zdmc+DQo=") +} + +.level2 { + border-top: 1px dashed #999; + padding-bottom: 2em; +} + +.level2::after { + content: ""; + clear: both; + display: table; + } + +.level2>h2 { + float: left; + width: 20%; + text-align: center; +} + +.level2>ul { + float: left; + width: 20%; + text-align: center; + clear: both; + padding: 0; + list-style-type: none; +} + +.level2>ul>li { + border-radius: 5px; + border: 1px solid #ccc; + color: #444; + padding: 0.5em; + font-size: 0.8em; + font-family: 'Courier New', Courier, monospace; + margin-top: 0.5em; +} + +.level3 { + float: right; + width: 70%; +} + +.level3>h3 { + margin-top: 1em; +} + +.level3:first-of-type>h3 { + margin-top: -1.5em; +} + + +@media only screen and (max-width: 600px) { + .level2>h2 { + float: none; + text-align: left; + width: 30%; + display: inline-block; + + } + + .level2>ul { + float: none; + display: inline-block; + width: 69%; + text-align: right; + margin: 0; + } + + .level2>ul>li { + display: inline-block; + } + + .level3 { + clear: both; + float: none; + width: auto; + } + + .level3:first-of-type>h3 { + margin-top: 1em; + + } + +} \ No newline at end of file diff --git a/utils/release_notes.sh b/utils/release_notes.sh new file mode 100755 index 00000000..a1d72fdb --- /dev/null +++ b/utils/release_notes.sh @@ -0,0 +1,40 @@ +// Copyright (c) 2020 Proton Technologies AG +// +// This file is part of ProtonMail Bridge. +// +// ProtonMail Bridge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// ProtonMail Bridge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with ProtonMail Bridge. If not, see . + +#!/bin/bash + +# Generate HTML release notes +# hosted at https://protonmail.com/download/{ie,bridge}/release_notes.html + +# Load props +APP_NAME=$1 +if [ "$APP_NAME" == "" ]; then + APP_NAME="Bridge" +fi + +APP_TYPE=$(echo "$APP_NAME"|tr [A-Z] [a-z]) +INFILE="release-notes/${APP_TYPE}.md" +OUTFILE="release-notes/${APP_TYPE}.html" + +# Check dependencies +if ! which -s pandoc; then + echo "PANDOC NOT FOUND!\nPlease install pandoc in order to build release notes." + exit 1 +fi + +# Build release notes +pandoc $INFILE -f markdown -t html -s -o $OUTFILE -c utils/release_notes.css --self-contained --section-divs --metadata title="Release notes - ProtonMail $APP_NAME"