feat(GODT-2772): placeholder for missing help content.

This commit is contained in:
Xavier Michelon
2023-08-25 13:43:03 +02:00
parent 32f2c72575
commit c849762445
6 changed files with 77 additions and 26 deletions

View File

@ -110,6 +110,7 @@
<file>qml/Proton/WebFrame.qml</file>
<file>qml/QuestionItem.qml</file>
<file>qml/Resources/bug_report_flow.json</file>
<file>qml/Resources/ComingSoon.html</file>
<file>qml/SettingsItem.qml</file>
<file>qml/SettingsView.qml</file>
<file>qml/SetupWizard/ClientListItem.qml</file>

View File

@ -43,6 +43,28 @@ QtObject {
target: Backend
}
WebFrameWindow {
id: webFrameWindow
colorScheme: ProtonStyle.currentStyle
flags: Qt.Tool
transientParent: mainWindow
Connections {
function onShowWebFrameOverlay(url) {
mainWindow.showWebFrameOverlay(url);
}
function onShowWebFrameWindow(url) {
webFrameWindow.url = url;
webFrameWindow.show();
webFrameWindow.raise();
if (!webFrameWindow.active) {
webFrameWindow.requestActivate();
}
}
target: Backend
}
}
}
property Notifications _notifications: Notifications {
id: notifications
@ -69,24 +91,6 @@ QtObject {
Backend.setNormalTrayIcon();
}
}
property WebFrameWindow _webFrameWindow: WebFrameWindow {
id: webFrameWindow
colorScheme: ProtonStyle.currentStyle
transientParent: mainWindow
flags: Qt.Tool
Connections {
function onShowWebFrameWindow(url) {
webFrameWindow.url = url;
webFrameWindow.showNormal();
}
function onShowWebFrameOverlay(url) {
mainWindow.showWebFrameOverlay(url)
}
target: Backend
}
}
property var title: Backend.appname
function bound(num, lowerLimit, upperLimit) {

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Coming soon</title>
<style>
html {
}
body {
background-color: #888;
font-family: sans-serif;
}
p {
font-weight: bold;
margin-top: 100px;
text-align: center;
}
</style>
</head>
<body>
<p>
The content of this page is under construction.
</p>
</body>
</html>

View File

@ -77,6 +77,10 @@ Rectangle {
colorScheme: root.colorScheme
icon.source: "/qml/icons/ic-external-link.svg"
text: qsTr("Open Guide")
onClicked: function () {
Backend.showWebFrameWindow(wizard.setupGuideLink());
}
}
}
}

View File

@ -26,7 +26,7 @@ Item {
function showAppleMailAutoconfigCertificateInstall() {
showAppleMailAutoconfigCommon();
descriptionLabel.text = qsTr("Apple Mail configuration is mostly automated, but in order to work, Bridge needs to install a certificate in your keychain.");
linkLabel1.setLink("https://proton.me/support/bridge", qsTr("Why is this certificate needed?"));
linkLabel1.setCallback(showUnderConstruction, qsTr("Why is this certificate needed?"));
}
function showAppleMailAutoconfigCommon() {
titleLabel.text = "";
@ -39,7 +39,7 @@ Item {
function showAppleMailAutoconfigProfileInstall() {
showAppleMailAutoconfigCommon();
descriptionLabel.text = qsTr("The final step before you can start using Apple Mail is to install the Bridge server profile in the system preferences.\n\nAdding a server profile is necessary to ensure that your Mac can receive and send Proton Mails.");
linkLabel1.setLink("https://proton.me/support/bridge", qsTr("Why is there a yellow warning sign?"));
linkLabel1.setCallback(showUnderConstruction, qsTr("Why is there a yellow warning sign?"));
linkLabel2.setCallback(wizard.showClientParams, qsTr("Configure Apple Mail manually"));
}
function showClientSelector() {
@ -63,12 +63,15 @@ Item {
function showOnboarding() {
titleLabel.text = (Backend.users.count === 0) ? qsTr("Welcome to\nProton Mail Bridge") : qsTr("Add a Proton Mail account");
descriptionLabel.text = qsTr("Bridge is the gateway between your Proton account and your email client. It runs in the background and encrypts and decrypts your messages seamlessly. ");
linkLabel1.setLink("https://proton.me/support/bridge", qsTr("Why do I need Bridge?"));
linkLabel1.setCallback(showUnderConstruction, qsTr("Why do I need Bridge?"));
linkLabel2.clear();
root.iconSource = "/qml/icons/img-welcome.svg";
root.iconHeight = 148;
root.iconWidth = 265;
}
function showUnderConstruction() {
Backend.showWebFrameOverlay("qrc:/qml/Resources/ComingSoon.html");
}
Connections {
function onLogin2FARequested() {

View File

@ -44,11 +44,6 @@ Item {
signal bugReportRequested
signal wizardEnded
function showBugReport() {
closeWizard()
bugReportRequested()
}
function _showClientConfig() {
showClientConfig(root.user, root.address);
}
@ -85,12 +80,28 @@ Item {
function closeWizard() {
wizardEnded();
}
function setupGuideLink() {
switch (client) {
case SetupWizard.Client.AppleMail:
return "https://proton.me/support/protonmail-bridge-clients-apple-mail";
case SetupWizard.Client.MicrosoftOutlook:
return (Backend.goos === "darwin") ? "https://proton.me/support/protonmail-bridge-clients-macos-outlook-2019" : "https://proton.me/support/protonmail-bridge-clients-windows-outlook-2019";
case SetupWizard.Client.MozillaThunderbird:
return "https://proton.me/support/protonmail-bridge-clients-windows-thunderbird";
default:
return "https://proton.me/support/protonmail-bridge-configure-client";
}
}
function showAppleMailAutoConfig() {
backAction = _showClientConfig;
rootStackLayout.currentIndex = SetupWizard.RootStack.TwoPanesView;
rightContent.currentIndex = SetupWizard.ContentStack.ClientConfigAppleMail;
clientConfigAppleMail.showAutoconfig(); // This will trigger signals that will display the appropriate left content.
}
function showBugReport() {
closeWizard();
bugReportRequested();
}
function showClientConfig(user, address) {
backAction = null;
root.user = user;