Commit Graph

6028 Commits

Author SHA1 Message Date
Anthony Laibe a5aba6e4e2 fix(@wallet): send to only operable account
fixes #12509
2023-10-31 10:28:28 +01:00
Michał Cieślak 04b6fb54c3 feat(LeftJoinModel): Use QAbstractItemModel::match for searching key idx in right model
It creates a possibility to transparently improve performance of id lookup
in right model by implementing fast search on given role in the righ model
itself by reimplementing QAbstractItemModel::match.

Closes: #12574
2023-10-31 09:46:37 +01:00
Michał Cieślak 7847cb3b11 chore(LeftJoinModel): add detection of duplicated roles 2023-10-31 09:46:37 +01:00
Michał Cieślak cc964508f1 chore(LeftJoinModel): QAbstractItemModelTester added to tests 2023-10-31 09:46:37 +01:00
Valentina1133 0f1b16006e
chore: object names added for keycard controller elements (#12583) 2023-10-30 17:57:24 +01:00
Cuteivist 7de6eaa787
fix(@desktop/sendModel): Use tab to focus to next field (#12571) 2023-10-30 10:34:07 +01:00
Stefan ccd8c5b65f feat(wallet) Wallet Connect integration prototype
Implement a prototype of integrating [WalletConnect Web SDK]()

- integrate WalletConnect Web SDK using Node.js and packing it using
  [webpack](https://webpack.js.org/guides/getting-started/)
  - this way, we achieve the same versioning strategy for the SDK
- add WalletConnectSDK view
  - it is used to load the web SDK via a WebView (validated working on
  Mac and Windows)
- add new app dependency of WebView QT
  - also update vendor packages `Dotherside` and `nimqml` to add
    required WebView::initialize API used to initialize the WebView
    integration at the app start
- add WalletConnectPage to Storybook for quick prototyping
  - Also add dependency for WebView Qt lib
- index.js is the wrapper used to provide a simple stateful interface
  with the WC SDK
- Entry in ui/generate-rcc.go ensures the node_modules cache is excluded
  from the resource file

Notes:

- Added `com.apple.security.cs.allow-jit` entitlement when signing the
app package. This allows Execution of JIT-compiled Code Entitlement
required by the fast-path of the JavaScriptCore framework on MacOS
platforms.
- Keep some debugging entries expected to help debugging Linux package
- Removed outdated `DerivationPathInputRegressionTests` qml test

Closes #12301
2023-10-30 09:29:33 +01:00
Anastasiya Semenkevich 113810e31a chore(@AccountView.qml): add object name for confirmation popup 2023-10-27 14:56:40 +03:00
Michał Cieślak 2fae6d808d Storybook: Add example combining RolesRenamingModel, LeftJoinModel and SFPM 2023-10-27 13:27:30 +02: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
Igor Sirotin a3239d9e2b
fix `ImportCommunityPopup` issues, remove private key importing (#12554)
* feat(Storybook): added "Always on top" setting
* fix(ImportCommunityPopup): show result, remove private key support
2023-10-27 11:25:27 +01:00
Patryk Osmaczko acdd59faed fix: ensure InvitationBubbleView loading state for missing community
fixes: #12481
2023-10-26 15:58:50 +02:00
Igor Sirotin 9881c15f3c
Fix/issue 12356 no shared url data (#12557)
* refactor service `parseSharedUrl` functino
* drop unused RootStore functions
* refactor Utils shared urls functions
* fix(MembersSeectprView): ignore shared url data
* drop `openContactRequestPopupWithContactData`
* fix loading of data to popup
2023-10-26 14:58:05 +01:00
Cuteivist b1a8fd6260
fix(@desktop/wallet): Prevent nil conversion to qvariant (#12546) 2023-10-26 10:01:52 +02:00
Alex Jbanca 4a30d13bdc
feat(LinkPreviews): Integrate Link previews with the backend (#12523)
* feat(StatusQ): Adding numberToLocaleStringInCompactForm function to LocaleUtils

This function will format the number in a compact form
E.g: 1000 -> 1K; 1000000 -> 1M; 1100000 -> 1.1M

+ adding tests

fix(statusQ): Update numberToLocaleStringInCompactForm to return the locale number when greter than 999T

fix(StatusQ): extend the test_numberToLocaleStringInCompactForm with new data

* feat(LinkPreviews): Update the link preview area in StatusChatInput to use the new model

Changes:
1. Create a new component `LinkPreviewMiniCardDelegate.qml` that filters the model data to properly fill the link preview card with the needed data based on the preview type
2. Update storybook pages
3. Small updates to LinkPreviewMiniCard

* feat(LinkPreviews): Update the link previews in message history to use the new backend

Changes:
1. Create delegate items for LinkPreviewCard and gif link preview to clean the LinksMessageView component and filter the model data based on the preview type
2. Remove UserProfileCard and reuse the LinkPreviewCard to display contacts link previews
3. Update LinkPreviewCard so that it can accommodate status link previews (communities, channels, contacts). The generic properties (title, description, footer) have been dropped and replaced with specialised properties for each preview type.
4. Fix LinkPreviewCard layout to better accommodate different content variants (missing properties, long/short title, missing description, missing icon)
5. Fixing the link preview context menu and click actions

fix: Move inline components to separate files

Fixing the linux builds using Qt 5.15.2 affected by this bug:
https://bugreports.qt.io/browse/QTBUG-89180

* fix: Align LinkPreviewMiniCard implementation with LinkPreviewCard and remove state based model filtering
2023-10-25 18:20:02 +03:00
Anthony Laibe 466b57a536 fix(@wallet): sending big number
fixes #12497
2023-10-25 11:29:47 +02:00
Anastasiya Semenkevich 6046e781f1 chore(@AppMain.qml): add object name for toast message 2023-10-25 12:03:48 +03:00
Anastasiya Semenkevich 5a157c5f4e chore(@AppMain.qml): fix misspelling 2023-10-25 10:18:56 +03:00
Alex Jbanca 8ac6eb8916 fix(LinkPreviews): Fixing gif hyperlink detection in StatusChatInput
The link preview model can be filtered, but the hyperlink detection needs an unfiltered model to properly highlight all URLs. This brought in the need to separate the urls model and the link previews model.
2023-10-25 09:58:38 +03:00
Igor Sirotin b9867c2463
feature: copy channel link menu action (#12482) 2023-10-24 16:13:25 +01:00
Alex Jbanca 3050e97c9c feat: Link preview settings to Status chat input unfurling mode
Changes:
1. Update privacy controller to react to external unfurling settings change
2. Add handler to input controller and react to external unfurling settings change
3. Small other fixes
2023-10-24 17:35:07 +03:00
Alex Jbanca 0a857cbf9c fix: Preserve the previous cursor position on `undo/redo` in StatusChatInput 2023-10-24 17:04:14 +03:00
Alex Jbanca 337a81fc49 fix: Update link preview border to match the new design
+ fix link preview highlighting
2023-10-23 18:53:34 +03:00
Anthony Laibe 0ba9ce9c8e fix(@wallet): token not always visible
fixes #12508
2023-10-23 16:05:19 +02:00
Alex Jbanca d7707a14a8 feat: Show toast notifications when the link preview setting changes from chat input 2023-10-23 16:33:17 +03:00
Alex Jbanca 1cd00b77a0 fix(StatusQ): Extend StatusToastNotification to support RichText and allow larger content
Changes:
1. StatusToastMessage now supports dynamic content height
2. Add new StatusToastMessage type: Danger
3. Update StatusToastMessage to support RichText content
4. Fix StatusQ sanboxapp compilation
5. Add the new StatusToastMessage content to sandbox
2023-10-23 16:33:17 +03:00
Anastasiya Semenkevich 74cede573d chore(@AccountView.qml): adding object names for testing purposes 2023-10-20 13:57:20 +03:00
Anastasiya Semenkevich 1f8b44fbfb chore(@WalletKeyPairDelegate.qml): add object name for keypair delegate item 2023-10-18 16:14:21 +03:00
Igor Sirotin e5b68e8823
fix: messaging settings and url unfurling fixes (#12457)
* remove browser selection setting
* remove main whitelist settings. replace tenorGif setting with gifUnfurlingEnabled
* remove old unfurling
* move history nodes section
* disable outdated e2e tests step
* remove isGifWidgetEnabled setting
* fix: StatusMessage height when gif unfurling disabled

---------

Co-authored-by: Anastasiya Semenkevich <anastasija.ig@gmail.com>
2023-10-18 10:03:32 +01:00
Sale Djenic ae915b6036 feat(@desktop/wallet): align emoji with mobile
Closes: #12421
2023-10-17 13:21:26 +02:00
Stefan 7b24a398b0 fix(wallet) deconflict import of Utils in wallet.RootStore
Closes: #12427
2023-10-17 09:57:35 +02:00
Igor Sirotin 22ce35cf9c
feature: support url unfurling settings (#12441) 2023-10-16 17:05:55 +01:00
Lukáš Tinkl 6891c36cb6 fix: disable importing channel from discord
when another import is already in progress

Fixes #12239
2023-10-16 15:40:24 +02:00
Michał Cieślak 0caec2ab1c fix(QClipboardProxy): check if mimedata is not null
Pointer returned by QClipboard::mimeData may be null, e.g. during
tests in headless mode, causing segfault.
2023-10-16 13:37:08 +02:00
Michal Iskierko 4bd3d672c6 fix(@desktop/communities): Fix enabling/disabling mint button
Fix #12370
2023-10-15 21:33:24 +02:00
Michał Cieślak ce18a52171 chore(StatusChatInput): Move inline LinkPreviewSettingsCard's menu to separate file
Because of https://bugreports.qt.io/browse/QTBUG-90740 inline context menu causes tests for StatusChatInput crashing (stack overflow) on 5.15.2 (this version is used on CI). The easiest option to solve that problem is moving inline component to a separate file.

Closes: #12435
2023-10-13 16:20:09 +02:00
Igor Sirotin 520d34240a
feature: support unfurled Status links (contact/community/channel) (#12303)
* chore: move `LinkPreviewThumbnail` to a separate file
2023-10-13 14:36:07 +01:00
Lukáš Tinkl 9581e6deb6 fix(ImportCommunityPopup): no UI information when requesting info failed
- track the import progress manually as
`root.store.getCommunityDetails(key)` can optionally return `null`
immediately if the community is not known and launch an async task
- as an additional measure, since the above async call sometimes never
finishes, add a `Timer` that unsets the internal `loading` state

Fixes #12358
2023-10-13 14:02:34 +02:00
Khushboo Mehta bc85bc8cd3 feat(@desktop/wallet): Include watch only per account
fixes #12305
2023-10-13 12:11:36 +02:00
Lukáš Tinkl 629d8b62b1 fix: Update the Beta dialog design to better fit the content
- no logo
- tighter content, smaller vertical spacing

Fixes #12400
2023-10-12 16:27:30 +02:00
Lukáš Tinkl d6648c4a5d chore: add a deprecation warning and some forward compatibility
... for `title` and `subtitle`
2023-10-12 16:27:30 +02:00
Alex Jbanca 331f27b52a feat: highlight the hovered hyperlink and link preview 2023-10-12 15:46:20 +03:00
Alex Jbanca fcd9567677 feat: Add settings card to control link previews settings in chat input
This commit adds the link preview settings card in the chat input area and connects the settings to the controller.

Not included in this commit: Backend for the preserving the settings, syncing the settings and enforcing the settings on the backend side.

Whenever an url is detected in the chat input area, the link preview settings card is presented. This card enables the user to choose one of the following options:

1. `Show for this message` - All the link previews in the current message will be loaded without asking again. The current message can be defined as the message currently typed/pasted in the chat input. Deleting or sending the current content is resetting this setting and the link preview settings card will be presented again when a new url is detected.
2. `Always show previews` - All the link previews will be loaded automatically. The link preview settings card will not be presented again (in the current state, this settings is enabled for the lifetime of the controller. This will change once the settings are preserved and synced)
3. `Never show previews` - No link preview will be loaded. Same as the `Always show previews` option, this will be preserved for the lifetime of the controller for now.
4. Dismiss (x button) - The link preview settings card will be dismissed. It will be loaded again when a new link preview is detected

The same options can be loaded as a context menu on the link preview card.

Changes:
1. Adding `LinkPreviewSettingsCard`
2. Adding the settings context menu to `LinkPreviewSettingsCard` and `LinkPreviewMiniCard`
3. Connect settings events to the nim controller
4. Adding the controller logic for settings change
5. Adding the link preview dismiss settings flag to the preserverd properties and use it as a condition to load the settings.
6. Adding/Updating corresponding storybook pages
2023-10-12 15:40:01 +03:00
Alex Jbanca 422bb2c064 feat: Generate link previews in StatusChatInput - Small updates + Add basic zoom to Storybook InspectionWindow 2023-10-12 14:08:28 +03:00
Alex Jbanca d32af78bc0 feat: Generate link previews in StatusChatInput - Adding hyperlink formatting to StatusChatInput
Introducing TextEditHyperlinksFormatter.qml. This component is attached to a text edit and will provide the hyperlinks formatting based on the urls detected in the text. The URL detection is implemented in the backend and this component will receive the urls as a model. The formatting is done using regular expressions and the hyperlinks are inserted automatically in the TextEdit component. The purpose of this component is to insert the hyperlinks, remove the hyperlinks and update the hyperlinks style when a specific hyperlink needs to be highlighted.

+ integrate in StatusChatInput
2023-10-12 14:08:28 +03:00
Alex Jbanca 3ce9d66d25 feat: Generate link previews in StatusChatInput - introduce ChatInputLinksPreviewArea
This component is a wrapper for LinkPreviewMiniCard and StatusChatInputImageArea. The purpose of this component is to arrange the cards in a row layout and provide scrolling behaviour. This component also has an opacity mask that will provide a fade out appearance when the items are scrolled out of view.

+ adding storybook page
+ integrate ChatInputLinksPreviewArea in StatusChatInput
2023-10-12 14:08:28 +03:00
Alex Jbanca 2c8ad61947 feat: Generate link previews in StatusChatInput - introduce LinkPreviewMiniCard
Adding LinkPreviewMiniCard component based on Figma designs. This component is similar to LinkPreviewCard, but has less info and a different format.

There is also some additional functionality attached to this card: close button, reload button and hovered state. The LinkPreviewMiniCard can have multiple states, based on content type and loading state.

+ Adding storybook page

Figma design: https://www.figma.com/file/Mr3rqxxgKJ2zMQ06UAKiWL/💬-Chat⎜Desktop?type=design&node-id=22341-184809&mode=design&t=151TjdzkzI7flR4P-0
2023-10-12 14:08:28 +03: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
Alex Jbanca 56547c0ae1 feat: Arrange link previews in messages view in a flow layout
Changes:
1. Replace ColumnLayout with Flow
2. Move the image previews up to be presented before the link previews
2023-10-12 11:08:51 +03:00