feat(GODT-2772): converted setup wizard help link to button with context menu.

This commit is contained in:
Xavier Michelon
2023-08-18 17:02:17 +02:00
parent 65846ff40f
commit 6f420f9098
4 changed files with 67 additions and 29 deletions

View File

@ -111,6 +111,7 @@
<file>qml/SetupWizard/ClientConfigAppleMail.qml</file>
<file>qml/SetupWizard/ClientConfigParameters.qml</file>
<file>qml/SetupWizard/ClientConfigSelector.qml</file>
<file>qml/SetupWizard/HelpButton.qml</file>
<file>qml/SetupWizard/SetupWizard.qml</file>
<file>qml/SetupWizard/Login.qml</file>
<file>qml/SetupWizard/Onboarding.qml</file>

View File

@ -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();
}
}
}
}

View File

@ -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 <https://www.gnu.org/licenses/>.
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");
}
}
}
}

View File

@ -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
}
}