This component can be used to group different sections within a popup menu.
Usage:
```qml
StatusPopupMenu {
StatusMenuItem {
text: "One"
icon.name: "info"
}
StatusMenuHeadline {
text: "Some text"
}
StatusMenuItem {
text: "Two"
icon.name: "info"
}
}
```
There's cases where the arrow on the tooltip needs to be repositioned, for example
when the tooltip doesn't fit into the viewport anymore but is centered below a button.
This adds a `StatusModalDivider` to the header and footer so they don't
have to be put into `content` and therefore won't scroll out of the viewport
if the content exceeds the modal height.
The footer divider is only rendered when there's indeed action buttons
provided.
Closes#265
This commit adds the members and search button which are needed for certain
features in Status Desktop. In views where these aren't needed, each button
can be set `visible: false` individually:
```qml
StatusChatToolBar {
...
membersButton.visible: false
searchButton.visible: false
}
```
Closes#243
This adds support for letter identicons by using the `icon.isLetterIdenticon`
flag:
```qml
StatusListItem {
title: "Some name"
icon.isLetterIdenticon: true
icon.background.color: "orange"
}
```
Closes#239
Adding picker button
* As an example it opens Qt's ColorDialog, as soon as
a color is selected there, the button is colored
with that. Final color picker to be implemented in
a seperate task.
Also minor improvements in main.qml and sandbox.pro
Closes#202
This just introduces a new `StatusImageSettings` property `isIdenticon`
which can be used to determine whether a `StatusRoundedImage` should
render with a background + border (which is the case for identicons).
It also updates the `StatusChatList` delegate to consider that property
and have it properly decide how to render the UI.
Closes#173
This property enables users to pass as factory function to `StatusChatList`
component that determines the profile image of a given chat id.
Usage:
```qml
import StatusQ.Components 0.1
StatusChatList {
...
profileImageFn: function (id) {
// `id` is the model id of the current chat item iterator
return ... // has to return a profile image url
}
}
```
In addition to this property, this commit also makes the component
expect an optional `model.identityImage` in case it's already provided.
That way, `profileImageFn` can be omitted.
Closes#174
Chat list items can open a context on right click as well, so `StatusChatList`
needs to provide an API for users to pass down a `StatusPopupMenu` accordingly.
This is now possible with a dedicated `popupMenu` proporty that can be
used as follows:
```qml
StatusChatList {
...
popupMenu: StatusPopupMenu {
property string chatId
openHandler: function () {
...
}
StatusMenuItem {
...
}
...
}
}
```
As will all `popupMenu` properties in StatusQ component, having this explicit API
option enables us to have control over how triggering components (in this case chat
list items) behave when they open a context menu (e.g. keeping them highlighted as long
as the menu is active).
When defining a `chatId` property, `StatusChatList` will hydrate it with the id of
the chat list item that has triggered the menu.
If there's more logic to be executed upon opening the menu, `openHandler` serves
as a hook similar to other popup menus. Inside the hook, users have access to the
specific `chatId`.
Closes#171
This is because we ran into issues where some component compositions
caused scrollviews to be nested which rendered them non-functional.
For now we're rolling back the idea of components being smart enough
to become scrollable by themselves and have StatusQ consumers handle
scroll behaviour.
This is a wrapping component that can be used to render community chat
lists and categories. It takes care of rendering categories, the top
chat list, as well as becominng scrollable in case the content outgrows
the available space.
Usage:
```qml
import StatusQ.Components 0.1
StatusChatListAndCategories {
chatList.model: ... // non-categorized chat items, pass all chat items here, the component will take care of filtering categorized items out
categoryListModel: ... // available categories (need to have `id` and `name`)
selectedChatId: ...
showCategoryActionButtons: true // default `false` - useful when only admin users can create and mutate categories/channels
onChatItemSelected: ... // `id` is available for selected chat id
categoryPopupMenu: StatusPopupMenu { // optional popup menu for category items
property string categoryId // define this property to have it hydrated with correct id and make it available inside menu items
...
}
popupMenu: StatusPopupMenu { ... } // optional popup menu for whole list, will be triggered with right-click
}
```
Closes#133
This uses the newly introduced `filterFn` in `StatusChatList` to hide chat items
that don't belong to a given category.
It also optionally exposes the `categoryId` on the provided popup menu, so it has
access to it inside menu item triggers.
Chat lists can belong to a category inside of communities, so they should
hold a property `categoryId` that represents that. In addition,
this commit introduces a `filterFn` function that can be used to conditionally
show/hide chat list items.
Closes#154
This commit introduces a `showActionButtons` flag that defaults to `false`
and can be used to render the action buttons provided in the chat list category.
This is useful for cases where only admin users should have the right to
create channels inside categories or mutate a category's state.
Settings `showActionButtons: true` will then render the buttons.
Closes#150
This turned out to be a bug. `model.count` isn't defined on `Repeater`
types.
Also, set `ScrollView` height to `0` if there are not community
tab buttons. This is needed because the columns implicit height
comes with spacing, resulting in some height.
This introduces a new `popupMenu` property that can be used to pass
down a `StatusPopupMenu` to `StatusChatToolBar`.
The reason this is done is so that we get control over its `onClosed`
handler, which is used to remove the menu button's `highlighted` state.
The `highlighted` state is activated inside the component as well when
it's clicked.
Existing signals like `menuButtonClicked` still exist and can be leveraged
for further logic.
Closes#125
This component is used to render chat list categories.
Usage:
```qml
import StatusQ.Components 0.1
StatusChatListCategoryItem {
title: "Public"
onClicked: opened = !opened
onToggleButtonClicked: opened = !opened
onMenuButtonClicked: ...
onAddButtonClicked: ...
addButton.[...]: ... // StatusChatListCategoryItemButton
menuButton.[...]: ... // StatusChatListCategoryItemButton
toggleButton.[...]: ... // StatusChatListCategoryItemButton
}
```
The button components are exposed so their tooltips can be configured
with (internationalized) app messages.
Closes#117
These properties are needed to enable more control over how a list
item implementation can look like.
Content children are exposed as follows:
```qml
StatusListItem {
statusListItemTitle.[...]: ... // StatusBaseText
sensor.[...]: ... // MouseArea
rightPadding: ... // default 16
leftPadding: .. // default 16
}
```
This commit introduce a new `StautsChatList` component that can be used
to render `StatusChatListItem`s, typically for chat and community views.
The component expects a `chatListItems.model` that has the following properties:
```qml
ListModel {
ListElement {
chatId: "0"
name: "#status"
chatType: StatusChatListItem.Type.PublicChat
muted: false
hasUnreadMessages: false
hasMention: false
unreadMessagesCount: 0
iconColor: "blue"
}
...
}
```
It also emits two possible signals:
- `onChatItemSelected(string id)`
- `onChatItemUnmuted(string id)`
Usage:
```qml
import StatusQ.Components 0.1
StatusChatList {
selectedChatId: "0"
chatListItems.model: demoChatListItems
onChatItemSelected: ...
onChatItemUnmuted: ...
}
```
Closes#100
As discussed in #109, when using the `rotation` property of `StatusIcon`
it seems to just mirror the underlying image source.
It turns out that using `rotation` on the image source is enough to have
the `ColorOverlay` rotate as well. Adding a `rotation` to the overlay will
rotate the source that's already rotated, resulting in a mirrored result.
To fix this, we're removing the additional `rotation` from the overlay.
Fixes#109
This is a component to easily render two panel layouts used in different
view of Status Desktop. Designed to be used with `StatusAppLayout`
Usage:
```qml
import StatusQ.Layout 0.1
StatusAppLayout {
...
appView: StackView {
anchors.fill: parent
initialItem: Component {
StatusAppTwoPanelLayout {
leftPanel: Component {...}
rightPanel: Component {...}
}
}
}
}
```
Closes: #78
`StatusBadge` uses a border with same color as its underlying component
to create "fake space" (see `StatusNavTabButton`).
The color depends on the parent component background and its state,
which the `StatusBadge` doesn't know about by itself, so the border color
has to be set explicity whereever it's desired.
This commit introduces (default) colors for the border based on where
badge is used.
This is a settings object to complement the existing `StatusIconSettings`.
Some components, like `StatusRoundIcon` need to be able to configure the
surroundings of the icon their rendering.
In such cases, `StatusIconBackgroundSettings` expose an API that give consumers
a way to configure things like background color, width, height and radius.
This introduces the brand new `StatusChatListItem` which can be used
to render channels, one-to-one chats and community channels in Status
applications.
The component can be used as follows:
```qml
import Status.Components 0.1
StatusChatListItem {
name: "channel-name" // name of channel or user
type: StatusChatListItem.Type.PublicChat // GroupChat | CommunityChat | OneToOneChat
image.source: "profile/image/source" // uses letter identicon instead of not supplied
hasUnreadMessages: true // default `false`
badge.value: 1 // default `0`
muted: true // `default `false`
selected: true // default `false`
onUnmute: ... // signal when unmute icon is clicked
}
```
Closes#65
This is needed to have the underlying SVG's color bleed through and
make use of the image's opacity at the same time.
Using `ColorOverlay` together with (half) transparent colors doesn't
work very well as it makes the underlying SVG color come through,
result in wrong colors.
Applying `opacity` on the image itself cause the `ColorOverlay` to
reduce in opacity as well. So in order to work with transparent
colors, we need a way to turn of the ColorOverlay and work with the
Image's opacity, which is what this change enables.
Very similar to what we're doing with `StatusIconSettings` in https://github.com/status-im/StatusQ/pull/61,
this commit introduces `StatusImageSettings` to expose a consisten image
API across components.
This is just temporary until #40 lands, but for now it allows for
the scrollable content to be grow which is needed to make pages
with many components usable.
This commit introduces a `StatusRoundIcon` component which renders
a `StatusIcon` inside a rounded rectangle.
This is similar to `StatusRoundButton`, just that it isn't a clickable
component.
With these changes, we also introduce a new `StatusIconSettings` config
object that can be used across component that need icon configuration.
The configuration includes the following properties:
- `name` - Name of the icon and used to locate the asset
- `width`
- `height`
Closes#53
This commit introduces a loading indicator for cases where `icon.source`
is set (a custom image/icon) to improve UX of the component.
It also falls back to a letter identicon in case loading the image source
wasn't successful.
Usage:
```
StatusIconTabButton {
icon.source: "SOME URL THAT CAN'T BE RESOLVED"
icon.color: "red" // in case fallback is used, icon.color will be gray by default
name: "Some channel" // used to generated letter identicon as fallback
}
```
Closes#37
This commit introduces a new `StatusAppNavBar` component that can be used
to create a Status application's tab bar for dedicated tab sections such as
chat, profile, wallet etc.
The component is build in a way that it support declarative and imperative usage
where necessary.
In its most simple form, a `StatusAppNavBar` comes with a single tab button
for the chat section. Such button has to be of type `StatusNavBarTabButton`:
```qml
import StatusQ.Layout 0.1
StatusAppNavBar {
navBarChatButton: StatusNavBarTabButton {
icon.name: "chat"
badge.value: 33
badge.visible: true
tooltip.text: "Chat"
}
}
```
In addition, it's possible to specify a list of `StatusNavBarTabButton` for
other sections of the application using the `navBarTabButtons` property:
```qml
StatusAppNavBar {
...
navBarTabButtons: [
StatusNavBarTabButton {
icon.name: "wallet"
tooltip.text: "Wallet"
},
StatusNavBarTabButton {
icon.name: "browser"
tooltip.text: "Browser"
},
StatusNavBarTabButton {
icon.name: "status-update"
tooltip.text: "Timeline"
}
]
}
```
Lastly, when desired to render tabs for Status community, which can grow
in size, `StatusAppNavBar` exposes a list via the `navBarCommunityTabButtons`
property that can have a `model` and a `delegate`. The `delegate` should also
be a `StatusNavBarTabButton`:
```qml
StatusAppNavBar {
...
navBarCommunityTabButtons.model: someModel.communities
navBarCommunityTabButtons.delegate: StatusNavBarTabButton {
name: model.name
tooltip.text: model.name
anchors.horizontalCenter: parent.horizontalCenter
}
}
```
The amount of community tab buttons can grow as they need until their dedicated
area becomes scrollable, at which point all `navBarTabButtons` will stick to the
bottom of `StatusAppNavBar`.
Closes#18
This component is used to render application tabs in the application
nav bar that is yet to be implemented.
`StatusNavBarTabButton` is a composition of `StatusIconTabButton`, `StatusToolTip`
and `StatusBadge` and exposes each of these to enable customization.
Usage:
```
StatusNavBarTabButton {
checked: true/false // whether or not it's 'active'
name: "string" // used to render a `StatusLetterIdenticon`
badge.value: 30 // `StatusBadge` is exposed as `badge`
tooltip.text: "Some tooltip" // `StatusTooltip` is exposed as `tooltip`
icon.name: "message" // Behaves exactly like `StatusIconTabButton.icon`
}
```
Closes#17
This moves the `StatusToolTip` component into `StatusQ` and applies some of
the changes done by @jrainville in https://github.com/status-im/status-desktop/pull/2447.
Usage:
```
import StatusQ.Controls 0.1
Button {
text: "Hover me!"
StatusToolTip {
visible: parent.hovered
text: "Top"
orientation: StatusToolTip.Orientation.Top // default: Top
}
}
```
Closes#14
This adds the `StatusIconTabButton` componoent to `StatusQ` with some slight
adjustments:
- removes `iconColor` in favour of `icon.color`
- removes `disabledColor` (main reason being that we don't show disabled buttons of this type)
This button handles various cases:
1. Icon tab buttons - An icon button used in Status Desktop for different sections
2. Letter identicon button - Used for community sections that don't have a profile picture
3. Image icon button - Used for community sections that do have a profile picture
Which type is rendered depends on the configuration of the component as shown
in the usage.
Usage:
```
import StatusQ.Controls 0.1
// When `icon.name` is set, it renders a `StatusIcon` button
StatusIconTabButton {
icon.name: "chat"
}
// When `icon.source` is set, it renders a `StatusRoundedImage` button
StatusIconTabButton {
icon.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
}
// When `name` is set, it renders a `StatusLetterIdenticon` button
StatusIconTabButton {
name: "#status"
}
```
Closes#16
This component can be used to render badges with additional information
as seen in the navbar tab buttons and menu items.
Here's how it can be used:
```
StatusBadge {
value: 2
}
```
By default and based on value, StatusBadge will change its width.
If no value is provided, it renders as badge indicator as seen in the profile
tab button.
Closes#15
Status color palettes don't specify a solid black and white that stay
black and white in both themes.
This commit introduces `black` and `white` as solid colors to `ThemePalette`
so they are automatically inherited in all built-in and custom themes.
Turns out, even though we only use one and the same `font.family` name
throughout our components (namely `Inter` and/or `InterStatus`),
`font.weight` properties set to anything other than `Font.Normal` (which is the default),
will not apply unless all font weights have actually been loaded.
Unfortunately we can put a `FontLoader` as direct child in a `ThemePalette`
so we have to make it actual properties.
These properties aren't really used anywhere and merely serve as a place
to load font assets.
Fixes#30
A `StatusIcon` that rotates infinitely and can be used for indicating
pending states.
Usage:
```
StatusLoadingIndicator {
width: 24 // default: 17
height: 24 // default: 17
color: "red" // default: loading asset color
}
```
Closes#7
Abstract text component that defaults to Status' `Inter` font.
Also known as `StyledText` in Status Desktop.
This will close#20 as it doesn't make sense to implement multiple
components for a single text type. Size and weight of text can be configured
on a per usage basis.
Closes#20
This commit introduces the theming story discussed in #3.
Once this lands, we'll have a new namespace `StatusQ.Core.Theme` which
can be used as follows:
```qml
import StatusQ.Core.Theme
StatusLightTheme {}
StatusDarkTheme {}
Theme.palette.[SOME_THEME_PROP] // as spec'ed in #3
```
Closes#3
- pull in required StatusQ changes (see status-im/StatusQ#882)
- simplify the radio buttons handling, no need for a ButtonGroup as they
share the same parent
- the radio buttons have the desired font size as a result ;)
Remove ValidationMode.Always for StatusInputs because by default they
are invalid and validate input when dirty
Remove condition from errorMessage of BackupSeedStepBase as not needed.
Fixes#6825
Requires https://github.com/status-im/StatusQ/pull/858
BREAKING CHANGE: StatusInputs are invalid by default and validate when
dirty.
This partially covers factory reset flow. The part where user is able to select which accounts
wants to remove/keep from/on a keycard will be added later once we add the keycard settings part
for storing those data to a keycard.
Fixes: #6790
- Created new test case with basic create group chat scenario.
- Added specific data folder for `tst_groupChat`.
- Removed deprecated data folder.
- Added dynamic login (depending on the account).
- Added global account information in `suite_status/data` folder.
- Added new group chat validations, title, history texts, members added and send chat message.
- Replaced some ids by objectNames.
- Some improvements in `names.py`.
- Onboarding objects refactor.
Fixes#6444
Fixes#6609
The menu was lost because it used to be set as part of the ScrollView background, but it got changed to a Flickable as part of the fix to the scrolls being not smooth.
Anyway, background doesn't exist on Flickables, so I removed it and moved the MouseArea to the CommunityColumnView instead.
Fixes#6220
Fixes the issue with the mutual contact icon showing when just added.
It also does a huge cleanup of the codebase to remove isContact and replace it with either isAdded, when we care only about if we added, or isMutualContact if we want the contact to be mutual
Also fixes an issue with the MessageContextMenu not reflecting the added state correctly.
Fixes#6306
- update the StatusQ components to the latest commit which includes
the StatusIcon fixes
- switch the LanguageStore and CurrenciesStore to use SVG icons for flags
and money icons instead of PNGs
This is first iteration. Models have been restructured and qml adapted
to the changes.
What is left to be done:
- populate new models with appropriate data (some fields were left
default)
- use new fields in qml, use StatusMemberItem where possible
- fix all #FIXMEs introduced by this commit
iterates: #5951
Added new option add / remove contacts in dropdown and created navigation to modify the loaded component in the toolbar.
Enabled addition of new members into a group chat by the admin.
Enabled removal of members of a group chat by the admin.
Added into `ChatContentView` components related to chat toolbar:
- `StatusTagSelector` and its corresponding logic
- Moved `StatusChatInfoButton` from toolbar to content view.
Added `esc` key event to leave the group chat add / remove panel.
Updated `StatusQ` link.
Closes#5522
- Updated finalise button text with the British spelling.
- Password warning texts in onboard flow updated to correct size.
- Updated StatusQ that fixes button change size after loading.
- Updated position of the message error in the Confirmation Screen.
Fixes#5607, #5339, #5606 and #5610
NOTE: Updated status-desktop compilation error after StatusQ commit 1a5990f24bd3f2aba87ab62880e39113c63ba015
Added currency picker into `LanguageView.qml`.
Added `category` and `imageSource` property to existing `CurrenciesStore.qml`. Renamed `code` to `shortName`.
Added `currenciesModel` property to `WalletStore.qml`.
Added wallet store into `LanguageView.qml` in order to link to the currencies model.
Added some tokens in the currencies store.
Made wallet and any currency related UI code that uses current currency use the new Display Currency value.
Removed no longer used wallet/settings related files.
Closes#5385
Renamed setting section "Language" to "Language & Currency".
Updated link to StatusQ - Needed new `StatusListPicker` component.
Added language model in `LanguageStore` and created first view approach for `Language` setting.
Added temporal confirmation dialog for Linux OS (since it is currently needed to restart the app to apply changes).
Removed no longer used files.
Closes#5384