mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
feat(GODT-2772): client selector left pane tweaks.
This commit is contained in:
@ -28,7 +28,7 @@ Item {
|
||||
property var notifications
|
||||
property var user
|
||||
|
||||
signal showClientConfigurator(var user, string address)
|
||||
signal showClientConfigurator(var user, string address, bool justLoggedIn)
|
||||
signal showLogin(var username)
|
||||
|
||||
Rectangle {
|
||||
@ -129,7 +129,7 @@ Item {
|
||||
onClicked: {
|
||||
if (!root.user)
|
||||
return;
|
||||
root.showClientConfigurator(root.user, user.addresses[0]);
|
||||
root.showClientConfigurator(root.user, user.addresses[0], false);
|
||||
}
|
||||
}
|
||||
SettingsItem {
|
||||
@ -171,7 +171,7 @@ Item {
|
||||
onClicked: {
|
||||
if (!root.user)
|
||||
return;
|
||||
root.showClientConfigurator(root.user, addressSelector.displayText);
|
||||
root.showClientConfigurator(root.user, addressSelector.displayText, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ Item {
|
||||
|
||||
signal closeWindow
|
||||
signal quitBridge
|
||||
signal showClientConfigurator(var user, string address)
|
||||
signal showClientConfigurator(var user, string address, bool justLoggedIn)
|
||||
signal showLogin(var username)
|
||||
|
||||
function selectUser(userID) {
|
||||
@ -336,8 +336,8 @@ Item {
|
||||
return Backend.users.get(accounts.currentIndex);
|
||||
}
|
||||
|
||||
onShowClientConfigurator: function (user, address) {
|
||||
root.showClientConfigurator(user, address);
|
||||
onShowClientConfigurator: function (user, address, justLoggedIn) {
|
||||
root.showClientConfigurator(user, address, justLoggedIn);
|
||||
}
|
||||
onShowLogin: function (username) {
|
||||
root.showLogin(username);
|
||||
|
||||
@ -52,9 +52,9 @@ ApplicationWindow {
|
||||
root.requestActivate();
|
||||
}
|
||||
}
|
||||
function showClientConfigurator(user, address) {
|
||||
function showClientConfigurator(user, address, justLoggedIn) {
|
||||
contentLayout.currentIndex = 1;
|
||||
setupWizard.showClientConfig(user, address);
|
||||
setupWizard.showClientConfig(user, address, justLoggedIn);
|
||||
}
|
||||
function showHelp() {
|
||||
Backend.showWebFrameWindow("https://proton.me/support/bridge");
|
||||
@ -103,7 +103,7 @@ ApplicationWindow {
|
||||
if (user.setupGuideSeen) {
|
||||
return;
|
||||
}
|
||||
root.showClientConfigurator(user, user.addresses[0]);
|
||||
root.showClientConfigurator(user, user.addresses[0], false);
|
||||
}
|
||||
|
||||
target: Backend.users
|
||||
@ -158,8 +158,8 @@ ApplicationWindow {
|
||||
root.close();
|
||||
Backend.quit();
|
||||
}
|
||||
onShowClientConfigurator: function (user, address) {
|
||||
root.showClientConfigurator(user, address);
|
||||
onShowClientConfigurator: function (user, address, justLoggedIn) {
|
||||
root.showClientConfigurator(user, address, justLoggedIn);
|
||||
}
|
||||
onShowLogin: function (username) {
|
||||
root.showLogin(username);
|
||||
|
||||
@ -15,8 +15,7 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.impl
|
||||
import QtWebEngine
|
||||
|
||||
import QtWebView
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@ -55,15 +54,11 @@ Item {
|
||||
border.color: root.colorScheme.border_norm
|
||||
border.width: overlay ? ProtonStyle.web_view_overley_border_width : 0
|
||||
|
||||
WebEngineView {
|
||||
WebView {
|
||||
id: webView
|
||||
anchors.fill: parent
|
||||
anchors.margins: ProtonStyle.web_view_overley_border_width
|
||||
url: root.url
|
||||
|
||||
onContextMenuRequested: function (request) {
|
||||
request.accepted = true; // This prevent the default context menu from being presented.
|
||||
}
|
||||
}
|
||||
}
|
||||
Button {
|
||||
|
||||
@ -42,9 +42,9 @@ Item {
|
||||
linkLabel1.setCallback(showUnderConstruction, qsTr("Why is there a yellow warning sign?"));
|
||||
linkLabel2.setCallback(wizard.showClientParams, qsTr("Configure Apple Mail manually"));
|
||||
}
|
||||
function showClientSelector() {
|
||||
function showClientSelector(newAccount = true) {
|
||||
titleLabel.text = "";
|
||||
descriptionLabel.text = qsTr("Bridge is now connected to Proton, and has already started downloading your messages. Let’s now connect your email client to Bridge.");
|
||||
descriptionLabel.text = newAccount ? qsTr("Bridge is now connected to Proton, and has already started downloading your messages. Let’s now connect your email client to Bridge.") : qsTr("Let’s connect your email client to Bridge.");
|
||||
linkLabel1.clear();
|
||||
linkLabel2.clear();
|
||||
iconSource = "/qml/icons/img-client-config-selector.svg";
|
||||
|
||||
@ -45,7 +45,7 @@ Item {
|
||||
signal wizardEnded
|
||||
|
||||
function _showClientConfig() {
|
||||
showClientConfig(root.user, root.address);
|
||||
showClientConfig(root.user, root.address, false);
|
||||
}
|
||||
function clientIconSource() {
|
||||
switch (client) {
|
||||
@ -102,12 +102,12 @@ Item {
|
||||
closeWizard();
|
||||
bugReportRequested();
|
||||
}
|
||||
function showClientConfig(user, address) {
|
||||
function showClientConfig(user, address, justLoggedIn) {
|
||||
backAction = null;
|
||||
root.user = user;
|
||||
root.address = address;
|
||||
rootStackLayout.currentIndex = SetupWizard.RootStack.TwoPanesView;
|
||||
leftContent.showClientSelector();
|
||||
leftContent.showClientSelector(justLoggedIn);
|
||||
rightContent.currentIndex = SetupWizard.ContentStack.ClientConfigSelector;
|
||||
}
|
||||
function showClientConfigEnd() {
|
||||
@ -144,7 +144,7 @@ Item {
|
||||
}
|
||||
let user = Backend.users.get(userIndex);
|
||||
let address = user ? user.addresses[0] : "";
|
||||
showClientConfig(user, address);
|
||||
showClientConfig(user, address, true);
|
||||
}
|
||||
|
||||
target: Backend
|
||||
|
||||
Reference in New Issue
Block a user