Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Itinerary
Commits
d22301b1
Commit
d22301b1
authored
Jul 13, 2021
by
Volker Krause
Browse files
Properly handle modal pages
This fixes various page flow issues when opening multiple of those.
parent
98201b85
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/app/LocationPicker.qml
View file @
d22301b1
...
...
@@ -27,7 +27,7 @@ Kirigami.Page {
text
:
i18n
(
"
Pick Location
"
)
onTriggered
:
{
coordinate
=
map
.
center
;
applicationWindow
().
pageStack
.
pop
();
applicationWindow
().
pageStack
.
goBack
();
}
}
...
...
src/app/SettingsPage.qml
View file @
d22301b1
...
...
@@ -54,7 +54,7 @@ Kirigami.ScrollablePage {
Kirigami.FormData.isSection
:
true
text
:
i18n
(
"
Favorite Locations
"
)
icon.name
:
"
go-home-symbolic
"
onClicked
:
applicationWindow
().
pageStack
.
push
(
favoriteLocationPage
);
onClicked
:
applicationWindow
().
pageStack
.
layers
.
push
(
favoriteLocationPage
);
}
// Online services
...
...
@@ -90,7 +90,7 @@ Kirigami.ScrollablePage {
Kirigami.FormData.isSection
:
true
text
:
i18n
(
"
Public Transport Information Sources...
"
)
icon.name
:
"
settings-configure
"
onClicked
:
applicationWindow
().
pageStack
.
push
(
ptBackendPage
)
onClicked
:
applicationWindow
().
pageStack
.
layers
.
push
(
ptBackendPage
)
}
QQC2.Switch
{
...
...
src/app/WelcomePage.qml
View file @
d22301b1
...
...
@@ -48,7 +48,7 @@ Kirigami.ScrollablePage {
QQC2.Button
{
text
:
i18n
(
"
Got it!
"
)
onClicked
:
applicationWindow
().
pageStack
.
pop
();
onClicked
:
applicationWindow
().
pageStack
.
goBack
();
Layout.alignment
:
Qt
.
AlignRight
visible
:
ReservationManager
.
isEmpty
()
}
...
...
src/app/main.qml
View file @
d22301b1
...
...
@@ -79,7 +79,8 @@ Kirigami.ApplicationWindow {
id
:
statsAction
text
:
i18n
(
"
Statistics
"
)
iconName
:
"
view-statistics
"
onTriggered
:
pageStack
.
push
(
statisticsComponent
)
enabled
:
pageStack
.
layers
.
depth
<
2
onTriggered
:
pageStack
.
layers
.
push
(
statisticsComponent
)
},
Kirigami.Action
{
id
:
healtCertAction
...
...
@@ -87,15 +88,17 @@ Kirigami.ApplicationWindow {
iconName
:
"
cross-shape
"
onTriggered
:
{
healtCertificateComponent
.
source
=
"
HealthCertificatePage.qml
"
pageStack
.
push
(
healtCertificateComponent
.
item
)
pageStack
.
layers
.
push
(
healtCertificateComponent
.
item
)
}
enabled
:
pageStack
.
layers
.
depth
<
2
visible
:
HealthCertificateManager
.
isAvailable
},
Kirigami.Action
{
id
:
settingsAction
text
:
i18n
(
"
Settings...
"
)
iconName
:
"
settings-configure
"
onTriggered
:
pageStack
.
push
(
settingsComponent
)
enabled
:
pageStack
.
layers
.
depth
<
2
onTriggered
:
pageStack
.
layers
.
push
(
settingsComponent
)
},
Kirigami.Action
{
text
:
i18n
(
"
Export...
"
)
...
...
@@ -105,19 +108,22 @@ Kirigami.ApplicationWindow {
Kirigami.Action
{
text
:
i18n
(
"
Help
"
)
iconName
:
"
help-contents
"
onTriggered
:
pageStack
.
push
(
welcomeComponent
)
enabled
:
pageStack
.
layers
.
depth
<
2
onTriggered
:
pageStack
.
layers
.
push
(
welcomeComponent
)
},
Kirigami.Action
{
id
:
aboutAction
text
:
i18n
(
"
About
"
)
iconName
:
"
help-about-symbolic
"
onTriggered
:
pageStack
.
push
(
aboutComponent
)
enabled
:
pageStack
.
layers
.
depth
<
2
onTriggered
:
pageStack
.
layers
.
push
(
aboutComponent
)
},
Kirigami.Action
{
id
:
devModeAction
text
:
"
Development
"
iconName
:
"
tools-report-bug
"
onTriggered
:
pageStack
.
push
(
devModePageComponent
)
enabled
:
pageStack
.
layers
.
depth
<
2
onTriggered
:
pageStack
.
layers
.
push
(
devModePageComponent
)
visible
:
Settings
.
developmentMode
}
]
...
...
@@ -164,25 +170,17 @@ Kirigami.ApplicationWindow {
}
Component
{
id
:
settingsComponent
App.SettingsPage
{
id
:
settingsPage
onIsCurrentPageChanged
:
settingsAction
.
enabled
=
!
settingsPage
.
isCurrentPage
}
App.SettingsPage
{}
}
Component
{
id
:
aboutComponent
App.AboutPage
{
id
:
aboutPage
onIsCurrentPageChanged
:
aboutAction
.
enabled
=
!
aboutPage
.
isCurrentPage
}
App.AboutPage
{}
}
Component
{
id
:
statisticsComponent
App.StatisticsPage
{
id
:
statsPage
reservationManager
:
ReservationManager
tripGroupManager
:
TripGroupManager
onIsCurrentPageChanged
:
statsAction
.
enabled
=
!
statsPage
.
isCurrentPage
}
}
// replace loader with component once we depend on KHealthCertificate unconditionally
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment