- extend `isUserAllowedToSendMessage` to also cover
`Constants.chatType.communityChat`
- let `admin` always satisfy the permissions
- hide the add emoji/reaction button instead of disabling it when the
permissions are not met
- adjust the error msg to better reflect the reality (tokens vs.
permissions)
Fixes#13777
* chore: bump status-go
Closes#13139
* fix(settings): It's not possible to switch the log level
Previously it was not possible to change the state of the Debug toggle.
This is because the code forced the setting the default value, ignoring
the database setup, hence always setting the DEBUG as LogLevel.
Closes#13139
* 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
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.
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
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
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
The functionality for sending/receiving funds directly from chat
is currently not supported, both code and designs are outdated.
This commit removes integration part but leaves ChatCommandsPopup
component for potential future use.
Closes: #12118
- causing too many regressions along the way
- most of our popups are already destroyed properly inside Popups.qml
- in general, a Popup (Dialog, Menu, etc.) can be manually destroyed iff
it had been created using `Component.createObject()`, otherwise it's gone
for good until restart
- manually enabled the destroy-on-close in verified cases
Fixes#10948 (maybe some other dupes)
- most browsers will pass a standard `text/uri-list` MIME type, however
Chrome uses `text/x-moz-url` so we handle that separately
(`drop.hasUrls` is `false` in this case)
for everything that's not a user interface element, esp. for static/big
images or chat/message elements which get served from locally anyway from
status-go
Iterates #10339
- hide the market and other stuff that can't be used while offline
- recent stickers and already installed packs can still be used; they
will be sent when we return online
- when we return online, reload the views instead of closing the popup
- fix an evil NIM typo that prevented reloading the already installed
sticker packs
- remove the NIM parts that haven't been ported to the async nature; just
`loadStickers()` on the QMl side does the trick
the button to (un)install would be either greyed out or result in a crash:
- we were passing the popup a wrong store (w/o networkConnectionStore)
- the condition to `greyedOut` was inverted