Skip to content

Commit

Permalink
move onboarding to account and rename files (#3102)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik authored Mar 4, 2024
1 parent d5cea16 commit e0db300
Show file tree
Hide file tree
Showing 17 changed files with 70 additions and 62 deletions.
26 changes: 13 additions & 13 deletions app/qml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@ set(MM_QML
InputStyle.qml
Notification.qml
NotificationBanner.qml
account/MMAcountPage.qml
account/MMAcountPageItem.qml
account/components/MMIconCheckBoxHorizontal.qml
account/components/MMIconCheckBoxVertical.qml
account/components/MMAccountPageItem.qml
account/MMAcceptInvitationPage.qml
account/MMAcceptInvitationController.qml
account/MMAccountController.qml
account/MMAccountPage.qml
account/MMCreateWorkspacePage.qml
account/MMCreateWorkspaceController.qml
account/MMHowYouFoundUsPage.qml
account/MMLoginPage.qml
account/MMSignUpPage.qml
account/MMSwitchWorkspacePage.qml
account/MMWhichIndustryPage.qml
components/MMButton.qml
components/MMCalendarDrawer.qml
components/MMCheckBox.qml
Expand All @@ -19,8 +30,6 @@ set(MM_QML
components/MMFeaturesListDrawer.qml
components/MMHlineText.qml
components/MMIcon.qml
components/MMIconCheckBoxHorizontal.qml
components/MMIconCheckBoxVertical.qml
components/MMLine.qml
components/MMLink.qml
components/MMLinkButton.qml
Expand Down Expand Up @@ -124,15 +133,6 @@ set(MM_QML
map/components/MMMapLabel.qml
map/components/MMMapPicker.qml
map/components/MMMapScaleBar.qml
onboarding/MMAcceptInvitation.qml
onboarding/MMAcceptInvitationController.qml
onboarding/MMCreateWorkspace.qml
onboarding/MMCreateWorkspaceController.qml
onboarding/MMHowYouFoundUs.qml
onboarding/MMLogin.qml
onboarding/MMOnboardingController.qml
onboarding/MMSignUp.qml
onboarding/MMWhichIndustry.qml
project/MMProjectHomePage.qml
project/MMProjectIssuesPanel.qml
project/MMProjectItem.qml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

import mm 1.0 as MM

import "../components"
import "../inputs"

Page {
id: root

required property MM.MerginInvitation invitation
required property var invitation /* MM.MerginInvitation */

property bool haveBack: false
property bool showCreate: true
Expand Down Expand Up @@ -121,13 +119,14 @@ Page {

Text {
width: parent.width - 2 * root.hPadding
text: qsTr("Want to create a new workspace instead? %1Click here%2").arg("<a href='internal-signal'>").arg("</a>")
text: qsTr("Want to create a new workspace instead? %1Click here%2").arg("<a href='internal-signal' style='color:" + __style.forestColor + "'>").arg("</a>")
visible: root.showCreate
font: __style.t3
color: __style.nightColor
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
lineHeight: 1.2
textFormat: Text.RichText

onLinkActivated: function(link) {
root.createWorkspaceClicked()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Item {
Component {
id: loginPageComp

MMLogin {
MMLoginPage {
id: loginPage

objectName: "loginPage"
Expand Down Expand Up @@ -124,7 +124,7 @@ Item {
Component {
id: signUpPanel

MMSignUp {
MMSignUpPage {

objectName: "signUpPanel"
tocString: qsTr("I accept the Mergin %1Terms and Conditions%3 and %2Privacy Policy%3")
Expand Down Expand Up @@ -188,7 +188,7 @@ Item {
Component {
id: createWorkspaceComponent

MMCreateWorkspace {
MMCreateWorkspacePage {
id: createWorkspacePanel

objectName: "createWorkspacePanel"
Expand All @@ -210,7 +210,7 @@ Item {
Component {
id: acceptInvitationsPanelComponent

MMAcceptInvitation {
MMAcceptInvitationPage {
objectName: "acceptInvitationsPanel"
haveBack: false
showCreate: true
Expand Down Expand Up @@ -242,7 +242,7 @@ Item {
Component {
id: howYouFoundUsComponent

MMHowYouFoundUs {
MMHowYouFoundUsPage {
id: howYouFoundUsPanel

objectName: "howYouFoundUsPanel"
Expand All @@ -257,7 +257,7 @@ Item {
Component {
id: whichIndustryComponent

MMWhichIndustry {
MMWhichIndustryPage {
id: whichIndustryPanel

objectName: "whichIndustryPanel"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

import "./components"
import "../components"
import "../inputs"

Expand Down Expand Up @@ -105,7 +106,7 @@ Page {
width: parent.width
}

MMAcountPageItem {
MMAccountPageItem {
width: parent.width
title: root.workspaceName
desc: root.workspaceRole
Expand All @@ -114,7 +115,7 @@ Page {
onLinkClicked: root.selectWorkspaceClicked()
}

MMAcountPageItem {
MMAccountPageItem {
width: parent.width
title: qsTr("Manage Account")
desc: root.subscription
Expand Down Expand Up @@ -173,14 +174,14 @@ Page {
width: parent.width
}

MMAcountPageItem {
MMAccountPageItem {
width: parent.width
title: qsTr("Sign out")
iconSource: __style.signOutIcon
onLinkClicked: root.signOutClicked()
}

MMAcountPageItem {
MMAccountPageItem {
width: parent.width
title: qsTr("Close account")
desc: qsTr("This will delete all your data")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* (at your option) any later version. *
* *
***************************************************************************/

import QtQuick
import QtQuick.Controls

Expand Down Expand Up @@ -35,7 +36,7 @@ Item {
Component {
id: createWorkspaceComponent

MMCreateWorkspace {
MMCreateWorkspacePage {
id: createWorkspacePanel

objectName: "createWorkspaceDirectPanel"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import QtQuick.Controls

import mm 1.0 as MM

import "./components"
import "../components"
import "../inputs"

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import QtQuick.Controls

import mm 1.0 as MM

import "./components"
import "../components"
import "../inputs"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
***************************************************************************/
import QtQuick

import "../components"
import "../inputs"
import "../../components"
import "../../inputs"

Item {
id: root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import "."

import "../../components"

CheckBox {
id: control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import "."

import "../../components"

CheckBox {
id: control
Expand Down
13 changes: 5 additions & 8 deletions app/qml/project/MMProjectPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import QtQuick.Dialogs
import mm 1.0 as MM

import "../components"
import "../onboarding"
import "../inputs"
import "../account"
import "../dialogs"
Expand Down Expand Up @@ -68,7 +67,7 @@ Item {

function showLogin()
{
onboardingController.start()
accountController.start()
}

function openChangesPanel( projectId )
Expand Down Expand Up @@ -357,7 +356,7 @@ Item {
return false;
}
// do not show the banner in case of accepting invitation or creating a workspace
if (onboardingController.inProgress) {
if (accountController.inProgress) {
return false;
}
return !__merginApi.userInfo.hasWorkspaces
Expand Down Expand Up @@ -475,21 +474,19 @@ Item {
}
}

MMOnboardingController {
id: onboardingController
MMAccountController {
id: accountController
enabled: root.visible
stackView: stackView
}

MMCreateWorkspaceController {
// TODO move to main.qml?
id: createWorkspaceController
enabled: root.visible
stackView: stackView
}

MMAcceptInvitationController {
// TODO move to main.qml?
id: acceptInvitationController
// TODO enabled add controller.showInvitationsList
enabled: root.visible && __merginApi.apiSupportsWorkspaces
Expand All @@ -509,7 +506,7 @@ Item {
Component {
id: workspaceAccountPageComp

MMAcountPage {
MMAccountPage {
id: workspaceAccountPage

abbrName: __merginApi.userInfo.nameAbbr
Expand Down
20 changes: 10 additions & 10 deletions gallery/qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
<file>../app/qml/components/MMCheckBox.qml</file>
<file>../app/qml/components/MMHlineText.qml</file>
<file>../app/qml/components/MMTextBubble.qml</file>
<file>../app/qml/components/MMIconCheckBoxHorizontal.qml</file>
<file>../app/qml/components/MMIconCheckBoxVertical.qml</file>
<file>../app/qml/components/calendar/MMDateTimePicker.qml</file>
<file>../app/qml/components/calendar/MMDayOfWeekRow.qml</file>
<file>../app/qml/components/calendar/MMMonthGrid.qml</file>
Expand All @@ -83,8 +81,16 @@
<file>../app/qml/components/MMDrawer.qml</file>
<file>../app/qml/components/MMDrawerHeader.qml</file>
<file>../app/qml/components/MMBusyIndicator.qml</file>
<file>../app/qml/account/MMAcountPage.qml</file>
<file>../app/qml/account/MMAcountPageItem.qml</file>
<file>../app/qml/account/components/MMAccountPageItem.qml</file>
<file>../app/qml/account/components/MMIconCheckBoxHorizontal.qml</file>
<file>../app/qml/account/components/MMIconCheckBoxVertical.qml</file>
<file>../app/qml/account/MMAccountPage.qml</file>
<file>../app/qml/account/MMAcceptInvitationPage.qml</file>
<file>../app/qml/account/MMCreateWorkspacePage.qml</file>
<file>../app/qml/account/MMHowYouFoundUsPage.qml</file>
<file>../app/qml/account/MMLoginPage.qml</file>
<file>../app/qml/account/MMSignUpPage.qml</file>
<file>../app/qml/account/MMWhichIndustryPage.qml</file>
<file>../app/qml/inputs/MMBaseInput.qml</file>
<file>../app/qml/inputs/MMDropdownInput.qml</file>
<file>../app/qml/inputs/MMPasswordInput.qml</file>
Expand All @@ -106,12 +112,6 @@
<file>../app/qml/form/editors/MMFormSpacer.qml</file>
<file>../app/qml/form/editors/MMFormRichTextViewer.qml</file>
<file>../app/qml/form/editors/MMFormRelationReferenceEditor.qml</file>
<file>../app/qml/onboarding/MMAcceptInvitation.qml</file>
<file>../app/qml/onboarding/MMCreateWorkspace.qml</file>
<file>../app/qml/onboarding/MMHowYouFoundUs.qml</file>
<file>../app/qml/onboarding/MMLogin.qml</file>
<file>../app/qml/onboarding/MMSignUp.qml</file>
<file>../app/qml/onboarding/MMWhichIndustry.qml</file>
<file>../app/qml/map/MMPositionMarker.qml</file>
<file>../app/qml/map/components/MMBlurBox.qml</file>
<file>../app/qml/map/components/MMMapLoadingIndicator.qml</file>
Expand Down
Loading

1 comment on commit e0db300

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 24.03.543311 just submitted!

Please sign in to comment.