Commit Graph

41 Commits

Author SHA1 Message Date
Michał Cieślak 00af1d0e90 StatusQ(WritableProxyModel): Handling of layoutChanged/rowsMoved from source models fixed
Closes: #13601
2024-03-01 15:47:41 +02:00
Michał Cieślak 0497ecd82e StatusQ(LeftJoinModel): Handling of layoutChanged from source models fixed
Closes: #13683
2024-02-27 10:12:47 +02:00
Michał Cieślak 0d4e7bd458 StatusQ(MovableModel): layoutChanged handling fixed
Closes: #13602
2024-02-22 14:39:31 +01:00
Michał Cieślak 29c15a5bff feat(StatusQ): custom UndefinedFilter filter for filtering undefined role values
Generic filter for handling undefined values. This kind of filtering
cannot be done using ValueFilter. On the other hand using
FastExpressionFilter is much more costy in terms of performance
overhead.

Closes: #13638
2024-02-21 09:42:05 +01:00
Michał Cieślak b949fb7b3b StatusQ(MovableModel): Methods naming refactor, Storybook pages updated/improved 2024-02-21 09:42:05 +01:00
Michał Cieślak f747791f50 StatusQ(MovableModel): Add ability to restore and bypass original order of source model 2024-02-21 09:42:05 +01:00
Alex Jbanca 8a69f3bc63
fix(SeedPhrase): Fixing seed phrase validation (#13496)
* fix(SeedPhrase): Fixing seed phrase validation

1. Validate each word after the editing is finished
2. Fixing the seed phrase suggestions where the suggestions box was hidden behind other ui elements
3. Propagate editingFinished signal in StatusBaseInput, StatusInput, StatusSeedPhraseInput
4. Fixing undefined `mnemonicIndex` errors

* fix: Refactoring of SeedPhraseInputView

Remove duplicated code and use EnterSeedPhrase component

+ Added storybook page

* fix(Onboarding): Fixing seed phrase validation on windows

The seed phrase validation fails on windows due to the dictionary line endings

* chore(squish): Update e2e tests to the new enter seed phrase panel construction

* fix: Load english dictionary from local file using StringUtils
2024-02-14 15:50:14 +02:00
Alex Jbanca 9d4bc9466e chore(WritableProxyModel): Adding possibility to get the model changes 2024-02-07 19:54:47 +02:00
Alex Jbanca a55dcf299e performance: Improve the wallet loading time
+ small bug fixes
2024-02-01 16:46:40 +02:00
Michał Cieślak e51667911d StatusQ: MovableModel proxy for setting custom order over source model
Proxy decorating source mode with additional method move(from, to, count)
similar to that available in ListModel. The custom order is stored within
a proxy, not altering the original model. May be useful whenever UI needs
to allow user to set custom order. Temporary state can be held in the
proxy, and send to the backend when changes are accepted.

Closes: #12686
2024-01-22 16:36:41 +01:00
Lukáš Tinkl 263ed2a822 feat: Add Advanced settings in new Advanced Tab
... under Settings/Wallet/Manage Tokens

- rename Tokens List tab to Advanced tab
- introduce a new `CurrencyAmountInput` component, backed by
`FormattedDoubleProperty` C++ class (plus the respective SB page)
- use `FastExpressionFoo` for the collectibles views as well

Fixes #12611
Fixes #13040
2024-01-11 14:52:52 +01:00
Alex Jbanca 56f194c96c fix: Updates based on comments 2024-01-09 20:20:04 +02:00
Alex Jbanca 6da897e733 StatusQ: Adding WritableProxyModel
WritableProxyModel is a QAbstractProxyModel that allows you to modify the data without modifying the source model.
It is useful for implementing a "dirty" state for a model, where you can modify the data and then commit the changes
to the source model.

Supported features (reimplemented):
- setData
- setItemData
- removeRows
- insertRows
- moveRows (TODO)
- toVariantMap
- to be continued...
2024-01-09 20:20:04 +02:00
Michał Cieślak 56493fa5e1 feat(StatusQ): Faster version of SFPM's ExpressionSorter
Provides FastExpressionSorter component compatible with
SortFilterProxyModel. In comparison to original ExpressionSorter it allows
to define which role values should be provided to the expression's
context and improves performance significantly.

Closes: #13062
2024-01-09 13:47:47 +01:00
Michał Cieślak a6cf37278c feat(StatusQ): Faster version of SFPM's ExpressionFilter
Provides FastExpressionFilter component compatible with
SortFilterProxyModel. In comparison to original ExpressionFilter it allows
to define which role values should be provided to the expression's
context and improves performance significantly.

Closes: #13063
2024-01-09 13:47:47 +01:00
Michał Cieślak fbe6cc95d1 feat(StatusQ): Ability to change sources in LeftJoinModel
- ability to change left/right models
- improved handling of model deletion
- base class changed to QAbstractListModel, dataChanged signal
  emision improved

Closes: #12912
2023-12-21 14:19:10 +01:00
Michał Cieślak 6fe2067c22 fix(ConcatModel): Changed behavior on submodel destruction to not emit signals
The general rule should be to avoid any actions on destruction different
than setting relevant pointers to null. Other actions like emiting
signals are potentially dangerous when the whole objects hierarchy is
under destruction.

Closes: #13065
2023-12-21 14:11:14 +01:00
Michał Cieślak 1c4a936833 feat(StatusQ): Faster version of SFPM's ExpressionRole
Provides FastExpressionRole component compatible with
SortFilterProxyModel. In comparison to original ExpressionRole it allows
to define which role values should be provided to the expression's
context. This approach improves performance significantly in most cases.

Closes: #13047
2023-12-20 23:16:09 +01:00
Mikhail Rogachev d77d049203
Hotfix: add include in ConactModel for Apple clang (#12954) 2023-12-06 21:06:08 +07:00
Michał Cieślak e2fa702ec4 feat(StatusQ): QML-oriented proxy model concatenating source models vertically
Closes: #12682
2023-12-05 22:45:08 +01:00
Noelia c2bfc6b8f4 feat(SQ/Aggregator): Created utility `Aggregator`
- Abstract class created: `Aggregator`
- Derived abstract class created: `SingleRoleAggregator`
- Derived class created:  `SumAggregator`
- `Storybook` page created.
- Added unit tests.

Closes #12685
2023-12-01 18:57:01 +01:00
Lukáš Tinkl 3b60506460 feat(token mgmt): update main wallet view layout with community assets
- update the AssetsView.qml view and delegates according to the latest
design
- add AssetsView to Storybook
- add new section for Community Assets
- (re)use the community badge with tooltip and link action to take the
user to the respective community
- add Community Assets info icon + popup
- create context menu for token delegates with actions
(Send/Receive/Manage tokens/Hide)
- add confirmation popups when hiding a single or all community tokens
- emit a toast bubble after hiding the token(s)
- plus related controller/backend methods for handling the
settings-related actions
- some smaller fixes/cleanups

Fixes #12369
Fixes #12372
2023-11-29 16:13:08 +01:00
Alex Jbanca 97da863d70 fix: Use StatusSynthaxHighlighter to format the hyperlinks in the chat input
1. Move the hyperlinks formatting from qml to c++ (StatusSynthaxHighlighter)
2. Update StatusChatInputPage
3. Update tests
2023-11-10 15:55:48 +02:00
Michał Cieślak d4d72038bd feat(StatusQ): Generic proxy model allowing setting proxies like SFPM or LeftJoinModel for submodels
It allows transforming model, including submodels outside of the view
component consuming the model. Thanks to that now there is no need
to create proxies for submodels in view's delegate. It can be done
earlies, on the level of the main view.

Closes: #12630
2023-11-06 12:26:04 +01:00
Michał Cieślak ffadd7522c StatusQ: Add generic LeftJoinModel model mimicking SQL Left Join
Closes: #12502
2023-10-27 13:27:30 +02:00
Michał Cieślak 628d9cdd31 StatusQ: Add generic proxy model for roles renaming 2023-10-27 13:27:30 +02:00
Lukáš Tinkl 2abe0358fc feat: Add URL trust options when the user clicks on a link
- add a popup asking the user before clicking on an unfurled link
preview
- add a checkbox for the above popup to remember the trust for such
domain
- use local Settings to persist the "trust domain" locally; for
global persistence across devices, see
https://github.com/status-im/status-go/issues/4132

Closes #12388
2023-10-12 10:57:15 +02:00
Lukáš Tinkl 9e13e5f1cf feat: implement a C++ helper to read contents of a text file
uses `QQmlFileSelector` to choose the correct variant and `QFile` for
the actual reading
2023-09-25 14:09:45 +02:00
Michał Cieślak 0cba5eccbd feat(StatusQ/Utils): Add StringUtils to expose string-related C++ routines
So far methods like escapeHtml were available via backend, creating
unnecessary dependency on backing in UI components.
2023-08-18 17:07:20 +02:00
Lukáš Tinkl 22258cc363 token-permissions: implement the UI "edit" flow for shared addresses
Fixes #11599
2023-08-11 15:38:42 +02:00
Michał Cieślak f1d2646fec feat(ModelUtils): modelToArray: roles param made optional, support for nested models 2023-07-28 12:49:14 +02:00
Lukáš Tinkl e744c847ad feat(token-permissions): display channel names in SharedAddressesPanel
Modify the PermissionUtils a bit to return an array of `[key, channelName]`
instead of just the keys and use it to display the channel names in the
permissions overview panel

(I could have used `QVariantMap` or `QJSonObject` here but those are
always sorted by `key`, so had to resort to using a plain vector/array)

Fixes #11584
2023-07-21 13:47:07 +02:00
Lukáš Tinkl 02e40adfca feat: New design flows to integrate Revealing addresses...
... when joining Community functionality

Closes #11138
2023-07-19 12:44:16 +02:00
Lukáš Tinkl 9107f15a77 [Mint Token] Update validation rule for name property
Fixes checking for duplicate token name in a case insensitive manner

Redo the `ModelUtils.contains(model, roleName, value, mode =
Qt.CaseSensitive)` in C++; more speed and add ability to search case in/
sensitive

Some more smaller fixes/speedups

Fixes #11204
2023-06-28 11:55:11 +02:00
Lukáš Tinkl b5a7df685a fix(QClipboardProxy): use more reliable clipboard/DND checks
- getFileSize: NIM version would crash on non-existing or remote files
- isValidImageUrl: properly detect file extensions when the URL contains
a query (eg "file.jpeg?width=1000&height=600")
2023-06-08 15:33:46 +02:00
Igor Sirotin aefa2b9f48
fix(StatusQ): StatusQ is QML module (#10207)
* StatusQ QML module
* qzxing is static lib again
* updated StatusQ resources
* fixed Emoji lookup
* added display to tests-imports ci
2023-04-14 11:18:56 +03:00
Michał Cieślak 03e1636cff feat(StatusQ): Add cpp model utils to allow handling ListModel and generic QAbstractItemModel uniformly
Closes: #9562
2023-02-20 22:25:56 +01:00
Michał Cieślak 940d8cd2c0 chore(general): Move RXValidator to StatusQ 2023-02-09 12:48:11 +01:00
Michał Cieślak f43c3e2f2b chore(general): Move StatusSyntaxHighlighter to StatusQ, remove mock from Storybook 2023-02-09 12:48:11 +01:00
Michał Cieślak 8f25b93f96 chore(general): Move QClipboardProxy to StatusQ 2023-02-09 12:48:11 +01:00
Michał Cieślak ad34694826 chore(general): Deduplicate and move StatusWindow to StatusQ 2023-02-09 12:48:11 +01:00