diff --git a/internal/frontend/bridge-gui/bridge-gui/Resources.qrc b/internal/frontend/bridge-gui/bridge-gui/Resources.qrc index 675d2f54..db266b0d 100644 --- a/internal/frontend/bridge-gui/bridge-gui/Resources.qrc +++ b/internal/frontend/bridge-gui/bridge-gui/Resources.qrc @@ -111,6 +111,7 @@ qml/SetupWizard/ClientConfigAppleMail.qml qml/SetupWizard/ClientConfigParameters.qml qml/SetupWizard/ClientConfigSelector.qml + qml/SetupWizard/HelpButton.qml qml/SetupWizard/SetupWizard.qml qml/SetupWizard/Login.qml qml/SetupWizard/Onboarding.qml diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/ClientConfigParameters.qml b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/ClientConfigParameters.qml index 3dbc38d2..039571de 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/ClientConfigParameters.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/ClientConfigParameters.qml @@ -108,19 +108,5 @@ Rectangle { onClicked: wizard.closeWizard() } } - LinkLabel { - id: reportProblemLink - anchors.bottom: parent.bottom - anchors.bottomMargin: 48 - anchors.right: parent.right - colorScheme: wizard.colorScheme - horizontalAlignment: Text.AlignRight - text: link("#", qsTr("Report problem")) - - onLinkActivated: { - wizard.closeWizard(); - wizard.showBugReport(); - } - } } } diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/HelpButton.qml b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/HelpButton.qml new file mode 100644 index 00000000..b0c241ea --- /dev/null +++ b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/HelpButton.qml @@ -0,0 +1,63 @@ +// Copyright (c) 2023 Proton AG +// This file is part of Proton Mail Bridge. +// Proton Mail 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. +// Proton Mail 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 Proton Mail Bridge. If not, see . +import QtQml +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtQuick.Controls.impl +import Proton + +Button { + id: root + + property var wizard + + anchors.bottom: parent.bottom + anchors.bottomMargin: 24 + anchors.right: parent.right + anchors.rightMargin: 24 + colorScheme: wizard.colorScheme + height: 36 + horizontalPadding: 0 + icon.source: "/qml/icons/ic-question-circle.svg" + width: 36 + + onClicked: { + menu.popup(-menu.width + root.width, -menu.height); + } + + Menu { + id: menu + colorScheme: root.colorScheme + modal: true + + MenuItem { + id: getHelpItem + colorScheme: root.colorScheme + text: qsTr("Get help") + + onClicked: { + console.error("Get help"); + } + } + MenuItem { + id: reportAProblemItem + colorScheme: root.colorScheme + text: qsTr("Report a problem") + + onClicked: { + console.error("Report a problem"); + } + } + } +} \ No newline at end of file diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/SetupWizard.qml b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/SetupWizard.qml index 1c5117a6..b418aa7a 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/SetupWizard.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/SetupWizard.qml @@ -216,21 +216,6 @@ Item { wizard: root } } - LinkLabel { - id: reportProblemLink - anchors.bottom: parent.bottom - anchors.bottomMargin: 48 - anchors.horizontalCenter: parent.horizontalCenter - colorScheme: root.colorScheme - horizontalAlignment: Text.AlignRight - text: link("#", qsTr("Report problem")) - width: 444 - - onLinkActivated: { - closeWizard(); - showBugReport(); - } - } } } @@ -242,5 +227,8 @@ Item { wizard: root } } + HelpButton { + wizard: root + } }