mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
feat(GODT-2767): wired bug report link + use enum for wizard stack layout.
This commit is contained in:
@ -42,6 +42,9 @@ Item {
|
||||
}
|
||||
console.error("User with ID ", userID, " was not found in the account list");
|
||||
}
|
||||
function showBugReport() {
|
||||
rightContent.showBugReport();
|
||||
}
|
||||
function showHelp() {
|
||||
rightContent.showHelpView();
|
||||
}
|
||||
@ -52,6 +55,7 @@ Item {
|
||||
rightContent.showGeneralSettings();
|
||||
}
|
||||
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
@ -47,7 +47,7 @@ ApplicationWindow {
|
||||
}
|
||||
function showSetup(user, address) {
|
||||
contentLayout.currentIndex = 1;
|
||||
setupWizard.startClientCOnfig(user, address)
|
||||
setupWizard.startClientConfig(user, address)
|
||||
}
|
||||
function showSignIn(username) {
|
||||
contentLayout.currentIndex = 1;
|
||||
@ -161,7 +161,7 @@ ApplicationWindow {
|
||||
Backend.quit();
|
||||
}
|
||||
onShowSetupGuide: function (user, address) {
|
||||
setupWizard.startClientConfig(user, address);
|
||||
root.showSetup(user, address);
|
||||
}
|
||||
onShowSignIn: function(username) {
|
||||
root.showSignIn(username)
|
||||
@ -177,6 +177,9 @@ ApplicationWindow {
|
||||
onWizardEnded: {
|
||||
contentLayout.currentIndex = 0
|
||||
}
|
||||
onShowBugReport: {
|
||||
contentWrapper.showBugReport();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -120,6 +120,7 @@ Rectangle {
|
||||
|
||||
onLinkActivated: {
|
||||
wizard.closeWizard();
|
||||
wizard.showBugReport();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,6 +27,19 @@ Item {
|
||||
Generic
|
||||
}
|
||||
|
||||
enum RootStack {
|
||||
TwoPanesView = 0,
|
||||
ClientConfigParameters = 1
|
||||
}
|
||||
|
||||
enum ContentStack {
|
||||
Onboarding = 0,
|
||||
Login = 1,
|
||||
ClientConfigSelector = 2,
|
||||
ClientConfigOutlookSelector = 3,
|
||||
ClientConfigWarning = 4
|
||||
}
|
||||
|
||||
property int client
|
||||
property string clientVersion
|
||||
property ColorScheme colorScheme
|
||||
@ -34,6 +47,7 @@ Item {
|
||||
property string address
|
||||
|
||||
signal wizardEnded()
|
||||
signal showBugReport()
|
||||
|
||||
function clientIconSource() {
|
||||
switch (client) {
|
||||
@ -72,48 +86,42 @@ Item {
|
||||
}
|
||||
|
||||
function showOutlookSelector() {
|
||||
root.visible = true;
|
||||
rootStackLayout.currentIndex = 0;
|
||||
rootStackLayout.currentIndex = SetupWizard.RootStack.TwoPanesView;
|
||||
leftContent.showOutlookSelector();
|
||||
rightContent.currentIndex = 3;
|
||||
rightContent.currentIndex = SetupWizard.ContentStack.ClientConfigOutlookSelector;
|
||||
}
|
||||
|
||||
function start() {
|
||||
root.visible = true;
|
||||
rootStackLayout.currentIndex = 0;
|
||||
rootStackLayout.currentIndex = SetupWizard.RootStack.TwoPanesView;
|
||||
leftContent.showOnboarding();
|
||||
rightContent.currentIndex = 0;
|
||||
rightContent.currentIndex = SetupWizard.ContentStack.Onboarding;
|
||||
}
|
||||
|
||||
function startClientConfig(user, address) {
|
||||
root.user = user
|
||||
root.address = address
|
||||
root.visible = true;
|
||||
rootStackLayout.currentIndex = 0;
|
||||
rootStackLayout.currentIndex = SetupWizard.RootStack.TwoPanesView;
|
||||
leftContent.showClientSelector();
|
||||
rightContent.currentIndex = 2;
|
||||
rightContent.currentIndex = SetupWizard.ContentStack.ClientConfigSelector;
|
||||
}
|
||||
|
||||
function startLogin(username = "") {
|
||||
root.visible = true;
|
||||
rootStackLayout.currentIndex = 0;
|
||||
rootStackLayout.currentIndex = SetupWizard.RootStack.TwoPanesView;
|
||||
root.address = "";
|
||||
leftContent.showLogin();
|
||||
rightContent.currentIndex = 1;
|
||||
rightContent.currentIndex = SetupWizard.ContentStack.Login;
|
||||
login.reset(true);
|
||||
login.username = username;
|
||||
}
|
||||
|
||||
function showClientWarning() {
|
||||
root.visible = true;
|
||||
rootStackLayout.currentIndex = 0;
|
||||
rootStackLayout.currentIndex = SetupWizard.RootStack.TwoPanesView;
|
||||
leftContent.showClientConfigWarning();
|
||||
rightContent.currentIndex = 4
|
||||
rightContent.currentIndex = SetupWizard.ContentStack.ClientConfigWarning
|
||||
}
|
||||
|
||||
function showClientParams() {
|
||||
root.visible = true;
|
||||
rootStackLayout.currentIndex = 1;
|
||||
rootStackLayout.currentIndex = SetupWizard.RootStack.ClientConfigParameters;
|
||||
|
||||
}
|
||||
|
||||
@ -135,7 +143,7 @@ Item {
|
||||
id: rootStackLayout
|
||||
anchors.fill: parent
|
||||
|
||||
// rootStackLayout index 0
|
||||
// rootStackLayout index 0 SetupWizard.RootStack.TwoPanesView
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
@ -242,13 +250,14 @@ Item {
|
||||
width: 444
|
||||
|
||||
onLinkActivated: {
|
||||
root.visible = false;
|
||||
closeWizard();
|
||||
showBugReport();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// rootStackLayout index 1
|
||||
// rootStackLayout index 1 SetupWizard.RootStack.ClientConfigParameters
|
||||
ClientConfigParameters {
|
||||
id: clientConfigParameters
|
||||
Layout.fillHeight: true
|
||||
|
||||
Reference in New Issue
Block a user