aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveList.qml
AgeCommit message (Collapse)Author
2021-01-23mobile/UI: show result of manual syncGravatar Dirk Hohndel
Since we no longer show the noisy git updates to the user, it has become harder for them to know whether a sync to the cloud was successful. Since a manual sync will never show the new 'what did you change and here's how you undo it' notification, it seems easy enough to simply show a status update. This adds a passive notification with no action button after the user either uses the main menu or pulling down on the dive list in order to trigger a manual sync. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-13mobile/cleanup: remove more noisy debug outputGravatar Dirk Hohndel
The repositioning message when a virtual keyboard opens is useful enough to keep it and just hide it unless in verbose mode. The others have all outlived their usefulness. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-12mobile/UI: small adjustments, using the slim combo boxGravatar Dirk Hohndel
This changes most readonly combo boxes to use the smaller, more modern looking TemplateSlimComboBox and makes some layout adjustments on a few pages to overall create a better UI. A lot of this is just cleaning up things that were rather rough in the first place. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-01mobile/UI: avoid pointless warningsGravatar Dirk Hohndel
These can create quite a bit of noise in the log. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23mobile/UI: initialize Kirigami theme to use our colorsGravatar Dirk Hohndel
With this we should finally get the correct button colors even when switching color theme. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21mobile/UI: again, correct side button colorsGravatar Dirk Hohndel
I am confused how this worked and then got broken, but this appears to once again fix the colors. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: make filter entry / dives shown theme awareGravatar Dirk Hohndel
Again, not using our text field / label (plus adding a subdued color for the placeholder text). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: correctly color the action button icons for dive listGravatar Dirk Hohndel
This uses one of our fixes to Kirigami to allows us to set the correct overlay color for our icons. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: ensure we show a line between divesGravatar Dirk Hohndel
In the dive list the rendering of the line ended up being subject to rounding errors. With this change we ensure that the thin line is always shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: shrink dive log date buttonGravatar Dirk Hohndel
This was too big relative to the page layout. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: remove the thick line between tripsGravatar Dirk Hohndel
This took up a lot of space and made the UI look stodgy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: don't use reserved wordGravatar Dirk Hohndel
This used to work, but with current QML/Kirigami it throws an error. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: silly whitespace cleanupGravatar Dirk Hohndel
Simply because it bugged me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile/dive-list: don't use cacheBufferGravatar Dirk Hohndel
QML documentation recommends against using the cacheBuffer for longer lists and doing more testing shows that this really doesn't help at all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile/dive-list: performance improvement for invalid divesGravatar Dirk Hohndel
Small optimization that reduces the number of accesses to the underlying model. Instead of evaluating the isInvalid member eight times per delegate, we only check it once. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile/dive-list: only show dive list notifications when it is visibleGravatar Dirk Hohndel
Without this check we'll show the 'Please tap the plus botton...' notification during app initialization as we are showing the initial set of messages - which makes no sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile/startup: show notification directly in the UI windowGravatar Dirk Hohndel
Until the app is initialized, we have problems getting the 'floating' passive notifications to show up and be useful. Instead update the user by filling a text block on the otherwise empty initial page of the app. Delay the switch to the dive list until the app is initialized and then use the passive notifications again. While we are initializing also show a busy spinner so the user doesn't think the app is hung. As a side effect of this change, the dive list isn't shown until our models are initialized. And strangely this causes every single possible delegate to be instantiated. We can prevent that by not setting the dive list model until after we are done setting up the model. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-list: try to force focus on filter text fieldGravatar Dirk Hohndel
This was triggered by a change in enabled, but what is really changing is the visible property. This should work better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile: improve Android back key behaviorGravatar Dirk Hohndel
There are two places where we try to prevemt unintended app exits. Once, in the onBackRequested signal handler on the dive list. This was missing special handling for the situation where one of the drawers was open. The second place is the onClosing signal handler in main.qml. Naively I thought that this was enough to catch all cases where we were about to exit the app, but apparently an explicit manager.quit() is a bit too forceful and doesn't get to that signal handler. With this commit we check for open drawers in both places. Belts and suspenders, I guess. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-list: avoid using undefined value as booleanGravatar Dirk Hohndel
This gets rid of an annoying and noisy warning. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile/dive-list: add indicator that dive list is being processedGravatar Dirk Hohndel
This should deal with the rather confusing 'No dive in dive list' shown while loading and processing the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile/dive-list: show/hide virtual keyboard as needed for filterGravatar Dirk Hohndel
This should happen automatically, but for some reason it doesn't. So let's try to force it manually. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile/dive-list: make sure filter input area is visibleGravatar Dirk Hohndel
Since apparently the header property of the ListView isn't reliably making sure that our filter input line is visible, let's move the filter header to be it's own visual element and manually manage the relationship between that and the ListView. The obvious idea was to anchor the ListView to the bottom of the filterHeader, but that didn't work in my tests. So instead we are using the topMargin to make sure that there is space to show the header. Because this re-indents the whole filterHeader, 'git show -w' gives a much better idea what this commit actually changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile/dive-list: add ability to create tripGravatar Dirk Hohndel
This adds a context menu entry for top level dives that allows the user to create a trip for that dive. Unfortunately this creates a new string to translate right before a release... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile/page-selection: consistently use showPage to select a pageGravatar Dirk Hohndel
We still used pageStack.push() all over the place. Also, in showPage, disable the map hack if the user actively picks a different page. This should fix an issue where the user picked the map and then tried to add a dive to the dive list - and instead of the dive edit was shown the map again. Reported-by: Hartley Horwitz <hhrwtz@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-21mobile/divelist: add UI to toggle dive invalid flagGravatar Dirk Hohndel
This reuses the corresponding undo command. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-21mobile UI: show dives marked as invalid with strike throughGravatar Dirk Hohndel
This matches the visual language of the desktop UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-12mobile UI: stop trying to play with opacityGravatar Dirk Hohndel
Since we are switching between pages, the whole opacity mechanics make no sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-12mobile UI: remove duplicate StartPageGravatar Dirk Hohndel
This was a merge error in the dive list rewrite and brought in a code block that had moved, which caused issues with correctly switching to the dive list. Calling setupActions() moves to the diveListView (where it really belongs). Instead of messing with the visibility of components of the same page, we now simply switch out the shown page. Fixes #2667 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile UI: six new iconsGravatar Dirk Hohndel
I will (mis)use these for moving dives out of trips and to the trip above or below and of course for undo/redo. And the weirdest one is the 'local offer' icon that seemed a reasonably good fit to edit trip details. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile UI: save changes to trip detailsGravatar Dirk Hohndel
The logic when we show the save button is a little fragile (and visually I'm not sure I love the disabled button), but hey, this works. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile UI: add divelist context drawer action to edit trip detailsGravatar Dirk Hohndel
For now this only shows the trip details. They can be edited on the page, but there is no way to save those edits, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/dive-list: add context menu when long-pressing on tripGravatar Dirk Hohndel
This doesn't show the dive specific actions and sets the stage for trip edit actions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/dive-list: allow moving dives between tripsGravatar Dirk Hohndel
A dive that is already in a trip can directly be moved into the trip above or below. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile UI: more context actions in dive listGravatar Dirk Hohndel
This adds the ability to delete a dive and to show its location on the map directly from the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/dive-list: long press on dive selects and opens context drawerGravatar Dirk Hohndel
This way one can execute dive list manipulations without the detour to the dive details screen. For example you can long-press on a dive and then add it to a trip or remove it from a trip. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile UI: add context menu to dive listGravatar Dirk Hohndel
This one exposes undo/redo as well as some basic trip manipulations, very similar to what's already available on the dive details page. Except that here it also makes sense to add a selected dive to a trip above or below (if those exist and the dive isn't already in a trip). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/divelist: better handling of selection changeGravatar Dirk Hohndel
This still has an odd bug. When we swipe the dive details to change the selected dive and that action causes a trip to expand or collapse, then the color change / highlight in the dive list isn't updated correctly, even though the log file indicates that we made the necessary changes. This also changes the coloring of the selected dive; having the same coloring as a trip was very confusing. This is a bit stark, but it clearly communicates the distinction. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/divelist: remove showDiveIndex QML-functionGravatar Berthold Stoeger
The currently shown dive is now controlled by the core. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/divelist: when clicking on a row, use select_single_dive()Gravatar Berthold Stoeger
This is a small step in unifying mobile and desktop. I'm unsure whether it is correct to play this via the QMLManager or whether we should call form QML directly into the model? Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/divelist: switch to the correct modelGravatar Berthold Stoeger
This obviously breaks everything, but now we can start fixing things. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09mobile/divelist: connect click on trip to toggle MobileListModelGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-09mobile/divelist: rewrite the QML dive listGravatar Dirk Hohndel
This isn't perfect yet, but it looks fairly reasonable. This commit was mainly written by Dirk, but includes a few fixes from Berthold which where squashed into this commit as they really should have been part of the initial version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-09mobile UI: move code to open download page on device plug-inGravatar Dirk Hohndel
This makes the code easier to reuse and uses the helper we just added. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-01mobile/filter: derive numShown from a new Q_PROPERTYGravatar Berthold Stoeger
The number of dives was updated when the model of the list was changed. Since we removed the multi-threading, the model is not disconnected/connected anymore and therefore we don't get the appropriate signal. Instead of introducing a different signal, make the shown-value a Q_PROPERTY. Thus, we can easily send a changed signal if we have to. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-01mobile/filter: use more appropriate placeholder textGravatar Dirk Hohndel
This way it matches the filter mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-01filter: introduce people- and tags-filtering in the mobile UIGravatar Berthold Stoeger
Add a combo-box where the user can switch between "fulltext", "people" and "tags" filtering. Connect the combobox to the already existing filter-code. Dirk: make combo-box smaller by using a smaller font and restricting the width. Setting both maximum and preferred widths gives more consistent results. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-18mobile-widgets/qml: use strongly typed CloudStatusGravatar jan Iversen
Replace CloudStatus.<value> with backend.<value> as part of making enum sharing between C/C++ and QML more robust. Replace PrefCloudStorage.verification_status with backend.verification_status to use the strongly typed function. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: remove use of prefs. in DiveList.qmlGravatar jan Iversen
prefs. is only important during the signin process, so use the standard PrefCloudStorage variable Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: remove property credentialStatusGravatar jan Iversen
Property is unused, remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>