Commit Graph

861 Commits

Author SHA1 Message Date
tomFlowee d37a24d984 Add ObjectShaker to give feedback on bad input
When the user uses the keyboard and that doesn't get accepted, we now
shake the widget we are editing.
2022-12-07 11:22:27 +01:00
tomFlowee 1aa58cf62c Make BitcoinvalueField hide trailing zeros 2022-12-07 11:17:12 +01:00
tomFlowee 03204fad3e Update the PayWithQR.qml to integrate the nicer editors
This makes most of the widget functional, I'll leave the "slide to pay"
for tomorrow.
2022-12-06 22:39:02 +01:00
tomFlowee fbd4c1a8ea Fix UX issue
When the user changes unit (BCH / mBCH), the widget would not update
until you typed something. Creating a surprise moment.
This fixes that, at the expense of a seemingly innocent warning by QML
about a binding loop.
2022-12-06 22:10:03 +01:00
tomFlowee 6e5b330cc6 Also update FiatValueField.qml
Same concept as BitcoinValueField, and a small refactor to reuse code
between them.
2022-12-06 22:10:03 +01:00
tomFlowee d14f2db763 Rewrite BitcoinValueField to use font-sizing
This now makes the editing version look identical to the basic display
version with regards to font sizing and coloring.
2022-12-06 22:10:03 +01:00
tomFlowee 2818cc44f9 Setup the page to have the needed components.
This is mostly without user interaction right now, but all the needed
stuff is on the page to show the visual design.
2022-12-05 21:24:32 +01:00
tomFlowee 98be7d0ff0 Link button 2022-12-05 20:33:12 +01:00
tomFlowee a106048840 drop the wrapping of pages in a grid layout
It now feels like a premature optimization to make anything
that inherets from Page be wrapped in a grid layout.
Notice that a "Page" here is the thing we push on the card-stack, the
Page has the back icon and the header text.
2022-12-05 20:31:00 +01:00
tomFlowee ca60e7360d Add comment. 2022-12-05 18:35:02 +01:00
tomFlowee 55694bf28c Make scanner part feature complete.
We now make the scanner ignore barcodes that do not fit the expected
content.
We now detect 'seedphrase' and 'address' and bip21 type payment urls.
2022-12-05 18:34:53 +01:00
tomFlowee 15ae94ad55 Add missing quote
Seems a copy/paste issue.
2022-12-04 14:43:44 +01:00
tomFlowee 324255c0ea Refactor camera support
After working on android and the qtmultimedia library for a week,
I have a much better understanding of what works and what doesn't.
The resulting design is thus presented. We will have one
CameraController class which refers to one overlay panel in QML
and in different places in the GUI objects based on QRScanner
can be created to initiate a scan.

This additionally moves the actual scanning out of the GUI thread
since blocking that is a no-no.

Now to move towards actually supporting scanning usecases.
2022-12-03 19:34:23 +01:00
tomFlowee b346f21871 Bugfixes in camera code.
Also upstreamed in ZXing-cpp (pr 451 + 453).

Also, re-enable clear-whitespace.
2022-12-02 14:12:20 +01:00
tomFlowee 46d34df2a0 Actually scan for QRs.
This takes the camera feed and pipes it through the ZXing (pronounced
zebra-crossing) library which detects the barcodes in the image.
When we find it, we pluck out the text.
2022-12-01 23:53:21 +01:00
tomFlowee a398d731dc Hardcode QML theme in desktop app 2022-12-01 10:48:09 +01:00
tomFlowee 52e6f85cbb Move camera init to C++ 2022-11-30 17:53:47 +01:00
tomFlowee 95d2b57cb3 Add basically functional camera support
This makes it possible for the mobile app on Android to use the camera.
We only ask for permission when the user actively goes to the 'QR-Scan'
tab, and we show a simple preview of the camera feed.

Notice that the permissions stuff is quite ugly right now due to Qt
having that module in development and the public APIs are simply not
available yet. But at least it works, which is all that matters.
When the next minor Qt release comes out we can hopefully clean this
up and use a version that needs no ifdefs.
2022-11-29 23:51:14 +01:00
tomFlowee 59b0b300db Use QtMultimedia 2022-11-29 23:51:14 +01:00
tomFlowee 143cf3fef8 Slowly moving to the extra tab 2022-11-29 23:51:14 +01:00
tomFlowee 83451ac648 Remove unneeded import 2022-11-29 11:47:13 +01:00
tomFlowee 50ca6c112f Remove version numbers in imports
This idea has been removed in Qt6.
2022-11-26 10:46:57 +01:00
tomFlowee 4d83152ae3 Remove version numbers in imports
This idea has been removed in Qt6.
2022-11-26 10:44:52 +01:00
tomFlowee fdaf539a0c Fixes and add 'move to top' button
We moved the initial-sync-height from the view to the model, which gives
a more logical progress update when switching between accounts.
Also added a button on the listview to instantly jump to the top of the
list.
2022-11-24 16:59:18 +01:00
tomFlowee ad5bc744db Refactor WalletHistoryModel
Instead of storing the internet data in reverse, we now simply take the
view-requests and revert those.
This makes the amount of places where we have to account for the
reversal much less (now just one) which helps maintainability.

Additionally, bring back the section-is-an-enum idea to avoid a
string-malloc for each row when one per section is enough.
2022-11-24 16:59:18 +01:00
tomFlowee 919ad7a18c Fix color on android
Just like the Label, the color doesn't seem to automatically follow
the palette. This works around that bug.
2022-11-24 10:36:35 +01:00
tomFlowee 68cf693b15 Add a simple AccountSyncState gui.
To show we are actually synchronizing with the peers, show a nice
progress display and a string with the progress.
2022-11-23 19:04:03 +01:00
tomFlowee a98efcbb1e Remove the mouse-touch feedback
It was neat, but probably not the best way to do it since this seems to
interfere with scrolling.
2022-11-23 16:07:17 +01:00
tomFlowee 427ab30faf Add 'About' screen.
This improves the TextButton to be more re-usable and have an arrow to
make it clear it actually is a button.
Added a sub-text as well.

This made it really easy to make an About page with some subpages or
external links.

Also increased the top-header from 40 to 50 'pixels'.
2022-11-23 16:06:37 +01:00
tomFlowee cc551366d8 Add feedback on import type. 2022-11-23 12:39:39 +01:00
tomFlowee 2c606ce959 Replace blockheight (number) with date selector
Importing a key as private as possible means we don't check some central
indexing server for the first time an imported key or seed is used.
But, to avoid scanning the entire blockchain, we go back only as far
as the first usage that the user remembers.
Now, instead of asking a blockheight (which most users have no clue
about) we now ask for a year / month combo and start scanning from
the block at the beginning of that timespan.
2022-11-23 12:04:43 +01:00
tomFlowee 215f7650a0 Add focus support 2022-11-23 10:44:53 +01:00
tomFlowee d8cfc9767d Provide a means to properly move keyboard input
As most of our app will be based on Pages pushed to the stack,
a simple structure to move focus forcefully to the new child
has been added.

Children would basically only need to mark the first item as
taking focus.
2022-11-23 10:35:31 +01:00
tomFlowee f3a05f7eb7 Remove unneeded ColumnLayout
The Page gives us a GridLayout, so no need to
nest a ColumnLayout inside of that.
2022-11-23 10:33:18 +01:00
tomFlowee 44afb0ed40 Add sub-pages for new wallets.
Could probably do with some TLC on the UX front, but lets focus on actual
functionality first.
2022-11-22 23:11:33 +01:00
tomFlowee 1b2f07bcaf Make page have default margins.
To avoid having to do so in each child-page.
2022-11-22 23:09:47 +01:00
tomFlowee 82e9130c6a UX: make the clickable area wider than the button. 2022-11-22 23:07:14 +01:00
tomFlowee 34614cb646 Fix default value 2022-11-22 23:07:14 +01:00
tomFlowee d255f8ede7 Properly break text-lines that have no spaces
A privatekey should be broken over two lines instead of forcing a
horizontl scroll, for better UX>
2022-11-22 23:06:27 +01:00
tomFlowee 456f03339f Add namespace to this usage too. 2022-11-22 23:03:32 +01:00
tomFlowee 17296d731a Use our Label class with fixes. 2022-11-21 20:34:34 +01:00
tomFlowee 4cf2dfa8e3 First setup for the NewAccount page. 2022-11-21 20:17:33 +01:00
tomFlowee 4061b97c57 fixlets 2022-11-21 20:17:33 +01:00
tomFlowee 67a09fac0b Structure menu pane and make less beta looking
We add a logo, app version number and a link to the new accounts pane.
2022-11-21 20:17:33 +01:00
tomFlowee 1ebfcbf997 Move CardTypeSelector to be a common widget 2022-11-21 20:16:21 +01:00
tomFlowee a46a7e5b74 re-add dropped line
This restores the ability to click on the import tile
2022-11-21 15:46:37 +01:00
tomFlowee a3831df0d6 Move data of the menu to a model. 2022-11-21 14:29:54 +01:00
tomFlowee ef3498ee67 Only enable touch-feedback on Android
This approach works great for touch events, not so wonderful for mouse
events as it stops me being able to swipe on lists with the mouse.
So disable this on platforms that don't use touch primarily.
2022-11-21 14:11:55 +01:00
tomFlowee 6c7c0813c0 Simplify the sections part of account history 2022-11-21 12:48:11 +01:00
tomFlowee 7def5fd4e9 Make the account history tab mostly functional. 2022-11-18 21:53:31 +01:00