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