Commit Graph

497 Commits

Author SHA1 Message Date
Khushboo Mehta dc7ae4cce3 feat(StatusFlatRoundButton): Adding tooltip to the button
Adding the StatusToolTip to the StatusFlatRoundButton. This will only function when the tooltip text is set from the outside
2022-09-21 18:20:03 +02:00
Khushboo Mehta c58118a6e2 feat(StatusToolTip): Adding an offset property
Added an offset property with which the arrow position for the tooltip can be adjusted from the outside
2022-09-21 18:20:03 +02:00
Pascal Precht 0954a7d945 chore: cut 0.4.0 release 2022-09-21 18:20:03 +02:00
Alexandra Betouni 11071a903e feat(StatusQ.Popups) Adding SearchPopup component
Closes #264
2022-09-21 18:20:03 +02:00
Pascal Precht 67330d68ae fix(StatusPopupMenu): ensure icon or image settings exist
Fixes #295
2022-09-21 18:20:03 +02:00
RichΛrd b891aa47cc fix(StatusAppNavBar): add profile button (#311) 2022-09-21 18:20:03 +02:00
RichΛrd 5bfc75f50d chore: replace profile icon (#312) 2022-09-21 18:20:03 +02:00
Alexandra Betouni 01b297fe24 fix(StatusChatToolBar) Fixing more menu not closing
The menu has a CloseOnReleaseOutside policy and so it
was closing and immediately re-opened when the kebab icon
was clicked since it's outside the menu area and also was
calling the popup function of the menu. Added dummy bool
property to detect whether the menu is already closed and
not open it again

Closes #308
2022-09-21 18:20:03 +02:00
Pascal Precht 32eeb91cd2 fix(StatusChatListItem): don't signal item selection if already selected
Closes #303
2022-09-21 18:20:03 +02:00
Jonathan Rainville 06e34cc5a1 feat(StatusListItem): add enabled prop to StatusLIneItem (#302) 2022-09-21 18:20:03 +02:00
Pascal Precht 7c4f042e30 feat(StatusQ.Theme.Core): introduce theme colors for StatusChatInput (#299)
There's some usage specific color being added to the chat input (which doesn't live in
StatusQ yet). To make sure we don't lose that change, I'm adding the new
colors to StatusQ theming system and have Status Desktop use it for the time being
until `StatusChatInput` is moved to StatusQ anyways.
2022-09-21 18:20:03 +02:00
Pascal Precht e5d0c0733c chore: cut v0.3.0 release 2022-09-21 18:20:03 +02:00
Alexandra Betouni dec0083793 fix(StatusAppThreePanelLayout): limit right panel width to 300px
Also added handle in DemoApp as well as hiding text when in minimum
width for right and left panels
2022-09-21 18:20:03 +02:00
Pascal Precht 567dab012e chore(sandbox): make app wider due to minimum layout width
There have been minimum layout widths introduced lately which break the
sandbox app's UI. This commit makes it wider by default so this doesn't happen
2022-09-21 18:20:03 +02:00
Alexandra Betouni c15c262602 fix(StatusAppThreePanelLayout): limit center panel width to 300px 2022-09-21 18:20:03 +02:00
Pascal Precht 6a2d3cc80f feat(sandbox): make use of `StatusInput` in chat view 2022-09-21 18:20:03 +02:00
Pascal Precht 53f1baac88 feat(StatusBaseInput): add icon support
Usage:

```qml
StatusBaseInput {
    icon.name: "..."
}
```

Closes #242
2022-09-21 18:20:03 +02:00
Pascal Precht 97a5c33e6f fix(StatusBaseInput): some minor style adjustment to adhere to design 2022-09-21 18:20:03 +02:00
Pascal Precht fca3386cec feat(StatusInput): implement error message and charlimit APIs
Usage:

```qml
StatusInput {
  label: "Fieldname"
  charLimit: 30
  errorMessage: "Some error occured"

  input.valid: false
  input.text: "Some invalid value"
  input.valid: false
}
```

Closes #289, #290
2022-09-21 18:20:03 +02:00
Pascal Precht e25fcf79f9 feat(Controls): introduce `StatusInput`
`StatusInput` is a wrapper around `StatusBaseInput` to provide additional
component composition for labels, error messages and alike

Closes #288
2022-09-21 18:20:03 +02:00
Pascal Precht d6119bb4ab fix(StatusBaseInput): ensure input text is selectable with mouse
This also sets the correcrt selection and selected text color.
2022-09-21 18:20:03 +02:00
Pascal Precht 0ffee3f426 feat(StatusBaseInput): add visual validity state
Closes #287
2022-09-21 18:20:03 +02:00
Pascal Precht e966641ed1 fix(StatusBaseInput): ensure clear button has the correct color
Also only render clear button when input has active focus.

Closes #286
2022-09-21 18:20:03 +02:00
Pascal Precht 3755e1fdd6 feat(StatusBaseInput): add hover state visuals
Closes #285
2022-09-21 18:20:03 +02:00
Pascal Precht 11f9d2a8c5 fix(StatusBaseInput): add visuals for disabled state
Closes #284
2022-09-21 18:20:03 +02:00
Pascal Precht 03de7db8ac refactor(StatusBaseInput): change implicitWidth to adhere to design 2022-09-21 18:20:03 +02:00
Pascal Precht 9945454a5d chore(sandbox): introduce StatusInputPage 2022-09-21 18:20:03 +02:00
Pascal Precht 22a2b85948 fix(StatusBaseInput): expose text prop alias 2022-09-21 18:20:03 +02:00
Alexandra Betouni a134ab0d36 fix(StatusAppThreePanelLayout): hide right panel when closed
Brought back opacity condition deleted by mistake
2022-09-21 18:20:03 +02:00
Alexandra Betouni fa8925eba0 feat(StatusQ.Layout): introducing StatusAppThreePanelLayout
Added new component to support a 3 column view

Closes #272
2022-09-21 18:20:03 +02:00
Pascal Precht aadd10c29a fix(StatusListItem): ensure title area wraps text 2022-09-21 18:20:03 +02:00
Pascal Precht c6c9bc6a32 feat(StatusPopupMenu): add support for letter identicons, identicons and images
This extends the popup menu to accept image or icon configurations a la `StatusIconSettings`
and `StatusImageSettings` in menu items, as well as nested menus.

Usage:

```qml
StatusPopupMenu {

    StatusMenuItem {
        text: "Custom Image icon"
        image.source: // image source
    }

    StatusMenuItem {
        text: "Custom identicon icon"
        image.source: // identicon source
        image.isIdenticon: true
    }

    StatusMenuItem {
        text: "Custom letter identicon"
        iconSettings.isLetterIdenticon: true
        iconSettings.background.color: "red"
    }
}
```

Few things to note:

- Because `StatusMenuItem` is an `Action` type, we can't extend its `icon` property,
  so we have to introduce our own (`iconSettings`) which can be of type `StatusIconSettings`
- Where possible, `StatusPopupMenu` will prefer `iconSettings.[...]` over `icon.[...]`,
  which means, both would work: `icon.name` and `iconSettings.name`.
  This is for consistency's sake. Consumers can switch completely to `iconSettings` if desired.
- When `isLetterIdenticon` is true, `iconSettings.background.color` must be set, similar
  to how it work in any other StatusQ component that makes use of this configuration type.

Closes #263
2022-09-21 18:20:03 +02:00
Pascal Precht f95e0c9499 feat(Popups): introduce `StatusMenuHeadline` component
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"
    }
}
```
2022-09-21 18:20:03 +02:00
Pascal Precht 55ff4a2362 fix(StatusChatInfoButton): ensure pin icon button is always rendered
Closes #278
2022-09-21 18:20:03 +02:00
Pascal Precht 696eeb322a fix(StatusModal): reset image/identicon width when loader state has changed 2022-09-21 18:20:03 +02:00
Pascal Precht 17a4059452 chore(CHANGELOG): add missing version number 2022-09-21 18:20:03 +02:00
Pascal Precht e432165436 chore: cut 0.2.0 release 2022-09-21 18:20:03 +02:00
Pascal Precht ad494560fc feat(StatusToolTip): expose `arrow` for fine-grain control
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.
2022-09-21 18:20:03 +02:00
Pascal Precht 92dd998c4f feat(StatusListItem): support tertiaryTitle
Usage:

```qml
StatusListItem {
    title: ...
    subTitle: ...
    tertiaryTitle: ...
}
```

Closes #275
2022-09-21 18:20:03 +02:00
Pascal Precht 97dbebc8aa feat(StatusModal): introduce support for identicons and letter identicons
Usage:

```qml
StatusModal {

    header.image.isIdenticon: ...

    // or

    header.icon.isLetterIdenticon: ...
    header.icon.background.color: ...
}
```

Closes #269
2022-09-21 18:20:03 +02:00
Pascal Precht 1456bf3a79 chore: add thumbs up/down icons 2022-09-21 18:20:03 +02:00
Pascal Precht f5a5e1ae8c fix(StatusPopupMenu): ensure menu items elide 2022-09-21 18:20:03 +02:00
Pascal Precht 8038a27ca4 feat(StatusModal): render header and footer border by default
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
2022-09-21 18:20:03 +02:00
Anthony Laibe 43623b3c7b fix(StatusChatListCategory): ensures showActionButtons is taken into account
when showing the menu button and right click
2022-09-21 18:20:03 +02:00
Anthony Laibe 38736ad58a feat(StatusChatListAndCategories): new API showPopupMenu 2022-09-21 18:20:03 +02:00
Anthony Laibe 2b5b56b0fa feat(StatusChatInfoToolBar): make statusMenuButton public 2022-09-21 18:20:03 +02:00
Pascal Precht 5c74322a50 feat(StatusListItem): add identicon support
Closes #261
2022-09-21 18:20:03 +02:00
Pascal Precht c17383ce9c feat(StatusChatListItem): introduce muted badge visuals
Also ensure title font weight stays `normal` when item is `muted`.

Closes #258, #259
2022-09-21 18:20:03 +02:00
Pascal Precht bca231f8c7 chore: add missing version to changelog 2022-09-21 18:20:03 +02:00
Pascal Precht cbf5950e81 chore: add initial CHANGELOG 2022-09-21 18:20:03 +02:00
Pascal Precht 17d5978fe4 feat(StatusFlatRoundButton): introduce `highlighted` color for secondary type
Closes #245
2022-09-21 18:20:03 +02:00
B.Melnik 4fcdbab22e feat(StatusBaseInput): Add focused state
Closes: #240
2022-09-21 18:20:03 +02:00
Pascal Precht 078c12e796 feat(StatusChatToolBar): add tooltips to action buttons
Closes #244
2022-09-21 18:20:03 +02:00
Pascal Precht ebbc9f2739 feat(StatusChatToolBar): add members and search button
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
2022-09-21 18:20:03 +02:00
Pascal Precht 31023aa462 fix(StatusChatList): ensure badge is also shown for one to one messages 2022-09-21 18:20:03 +02:00
Pascal Precht 78ed4642d6 chore: ensure `StatusChatList` receives the proper value for mentions
This is due to a change in how mentions and unread messages are indicated.
See 7fbccec227 for more information.
2022-09-21 18:20:03 +02:00
B.Melnik 056704f68d fix(StatusBaseInput): Fix focus area
Closes: #241
2022-09-21 18:20:03 +02:00
Pascal Precht 15b8d1e896 feat(StatusListItem): add `Danger` type support
Usage:

```qml
StatusListItem {
    title: "Some title"
    icon.name: "delete"
    type: StatusListItem.Type.Danger
}
```

Closes #248
2022-09-21 18:20:03 +02:00
Pascal Precht c85d626f1e feat(StatusRoundIcon): enable `icon.color` support 2022-09-21 18:20:03 +02:00
Pascal Precht 98783ee559 feat(StatusListItem): support letter identicons
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
2022-09-21 18:20:03 +02:00
Alexandra Betouni dd23ef2990 [#202] Added Picker button
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
2022-09-21 18:20:03 +02:00
Pascal Precht 12b35ba88c feat(StatusModal): expose loaded content
As discussed in #237, this is needed for consumers to access content
children from outside `content`.

Usage:

```qml
StatusModal {
  id: modal
  content: StatusBaseText {
      text: "Foo"
  }

  rightButtons: [
      StatusButton {
          text: "Change text"
          onClicked: {
              modal.contentComponent.text = "Bar"
          }
      }
  ]
}
```

Fixes #237
2022-09-21 18:20:03 +02:00
B.Melnik 1a81ab0924 feat(Controls): introduce StatusBaseInput
Usage: The same interface like TextField

Closes: #106
2022-09-21 18:20:02 +02:00
Pascal Precht 00e2a7406a chore: add safety to satisfy QML 2022-09-21 18:20:02 +02:00
Pascal Precht 82960a912b fix(StatusChatInfoButton): make component identicon aware
Closes #228
2022-09-21 18:20:02 +02:00
Pascal Precht c0c46b6dff fix(StatusChatInfoButton): prefix chat name with "#" if needed
Closes #229
2022-09-21 18:20:02 +02:00
Pascal Precht c08cf4b851 fix(StatusChatInfoButton): vertically center title if no subtitle is provided
Closes #230
2022-09-21 18:20:02 +02:00
Pascal Precht 5aaa5590c7 fix(StatusChatInfoButton): disable hover effects when sensor is disabled
Closes #231
2022-09-21 18:20:02 +02:00
Pascal Precht a3db546dc5 fix(StatusChatListCategory): only try open popup when supplied
Closes #220
2022-09-21 18:20:02 +02:00
Pascal Precht 087adef8df fix(StatusChatListAndCategories): make chat list visibily flag work
Closes #217
2022-09-21 18:20:02 +02:00
Pascal Precht 867be4194d fix(StatusChatList): ensure popupMenu closeHandler don't break
These broke because we were referring to a `highlighted` property that
was wrongly scoped.

Fixes #216
2022-09-21 18:20:02 +02:00
Pascal Precht 2fc884244e fix(StatusChatListAndCategories): ensure chatItemUnmuted event is propagated
Closes #219
2022-09-21 18:20:02 +02:00
Pascal Precht b8e55a946c fix(StatusChatListAndCategories): ensure chat list receives popup menu
Closes #218
2022-09-21 18:20:02 +02:00
Pascal Precht 98ebedc63c feat(StatusChatList): expose hook to lazily calculate chat item names 2022-09-21 18:20:02 +02:00
Pascal Precht 5faebe7002 fix(StatusMenuSeparator): ensure height is 0 when invisible or disabled
Closes #212
2022-09-21 18:20:02 +02:00
Pascal Precht c62e459deb fix(StatusChatList): use fallback property to determine unread message count 2022-09-21 18:20:02 +02:00
Pascal Precht 11bac6ecfd chore(README): re-add sandbox app instructions
Those have been accidentally removed in previous commits.
2022-09-21 18:20:02 +02:00
Iuri Matias 9735c7cd4b Update README.md 2022-09-21 18:20:02 +02:00
Pascal Precht b7448486c4 chore(README): add table of components 2022-09-21 18:20:02 +02:00
B.Melnik 301aabe594 fix: Add missing .qml to resources, add qmlcache to gitignore 2022-09-21 18:20:02 +02:00
B.Melnik 1f875743eb bug(StatusLoadingIndicator): Change Animator to Animation
Closes: #188
2022-09-21 18:20:02 +02:00
Pascal Precht 46876b79b9 fix(StatusChatListItem): ensure chat name elides when it's too long
Closes #151
2022-09-21 18:20:02 +02:00
Pascal Precht 29782dca80 fix(StatusChatListItem): ensure public chat names are prefixed with '#'
Closes #191
2022-09-21 18:20:02 +02:00
Pascal Precht d46130b9a5 refactor(StatusPopupMenu): expose category and chat id via open handler
Closes #192
2022-09-21 18:20:02 +02:00
Pascal Precht dbb8d941a5 feat(StatusRoundedImage): introduce identicon support
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
2022-09-21 18:20:02 +02:00
Pascal Precht 8a2af7e264 feat(StatusChatList): introduce `profileImageFn` property
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
2022-09-21 18:20:02 +02:00
Pascal Precht 48146b2fcf feat(Components): introduce `StatusContactRequestsIndicatorListItem`
Usage:

```qml
import StatusQ.Components 0.1

StatusContactRequestsIndicatorListItem {
    title: "Contact requests"
    requestsCount: 3
    sensor.onClicked: ...
}
```

Closes #175
2022-09-21 18:20:02 +02:00
Pascal Precht bad322e146 refactor: make chat component enum variants match protocol values
Closes #183
2022-09-21 18:20:02 +02:00
Pascal Precht c2f418205f feat(StatusChatList): introduce `popupMenu` property
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
2022-09-21 18:20:02 +02:00
Pascal Precht 4d595221eb fix(StatusModalHeader): ensure header has enough height for children
Closes #185
2022-09-21 18:20:02 +02:00
Pascal Precht 5e127c7194 fix(StatusRoundedImage): ensure images are scaled and positioned properly
Closes #172
2022-09-21 18:20:02 +02:00
Pascal Precht 1a14f9ebe2 fix(StatusChatList): expect `model.color` instead of `iconColor` prop 2022-09-21 18:20:02 +02:00
Pascal Precht c56c0b684d fix(StatusChatList): ensure component provide default `width`
Closes #176
2022-09-21 18:20:02 +02:00
Pascal Precht 7d39fee193 feat(StatusChatListItem): add `highlighted` property
Similar to other controls and components, chat list items can be in a
`highlighted` state, for example when popup menus are active.

Closes #178
2022-09-21 18:20:02 +02:00
Pascal Precht d389196f9e fix(StatusListItem): ensure icon background in secondary type works correctly 2022-09-21 18:20:02 +02:00
Pascal Precht 0d946ea4b0 fix(StatusModal): ensure modal footer uses correct theme color 2022-09-21 18:20:02 +02:00
Pascal Precht e0f09cbe8d chore(README): add StatusQ.Platforms to readme
Also adjust executable script for sandbox
2022-09-21 18:20:02 +02:00
B.Melnik 977f36ceca feat(StatusIcon): Improvement of Icons 2022-09-21 18:20:02 +02:00
Pascal Precht 11e6429068 refactor: don't make StatusChatList scrollable by default
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.
2022-09-21 18:20:02 +02:00
B.Melnik eab95c1c7b feat(Popups): Add StatusModal 2022-09-21 18:20:02 +02:00
Pascal Precht 78d56235af feat(Popups): introduce StatusModalDivider 2022-09-21 18:20:02 +02:00
B.Melnik 4c780c60ec feat(Popups): Add StatusModalFooter 2022-09-21 18:20:02 +02:00
B.Melnik ad90bdf020 feat(Popups): Add status modal header 2022-09-21 18:20:02 +02:00
Pascal Precht 10699d754a feat(StatusListItem): introduce primary and secondary types
Also enable `icon.rotation` via `StatusIconSettings.
2022-09-21 18:20:02 +02:00
Pascal Precht f56e3d1677 feat(sandbox): introduce first part of profile view for reference app 2022-09-21 18:20:02 +02:00
Pascal Precht 2a7c3aded7 feat(Components): introduce `StatusListSectionHeadline`
Usage:

```qml
import StatusQ.Components 0.1

StatusListSectionHeadline {
    text: "Settings"
}
```

Closes #164
2022-09-21 18:20:02 +02:00
Pascal Precht 706fe0888d feat(Components): introduce `StatusNavigationPanelHeadline`
Component to render navigation panel headlines.

Usage:

```qml
import StatusQ.Components 0.1

StatusNavigationPanelHeadline {
    text: "Profile"
}
```

Closes #162
2022-09-21 18:20:02 +02:00
Pascal Precht 1b30a45eb8 fix(StatusChatListCategoryItem): don't render menubutton with no popup
Fixes #153
2022-09-21 18:20:02 +02:00
Pascal Precht 209a208455 feat(Components): introduce `StatusChatListAndCategories` component
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
2022-09-21 18:20:02 +02:00
Pascal Precht 4582886d90 feat(StatusChatListCategory): apply chat list filter and expose category id in popup menu
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.
2022-09-21 18:20:02 +02:00
Pascal Precht 8081da7fa0 feat(StatusChatList): introduce `filterFn` and `categoryId`
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
2022-09-21 18:20:02 +02:00
Pascal Precht e1a94cfd84 feat(StatusPopupMenu): introduce `openHandler`
Similar to `closeHandler`, StatusPopupMenu can now have a customized `openHandler`
to run custom logic on open.
2022-09-21 18:20:02 +02:00
Pascal Precht 03f4b4c98b feat(StatusChatListCategory): introduce flag to show/hide buttons
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
2022-09-21 18:20:02 +02:00
Pascal Precht 56828b5cae chore: introduce build script for sandbox app
Closes #148
2022-09-21 18:20:02 +02:00
B.Melnik 5e0e8deba8 fix: make release build work
I add several files in .qrc file for running app in release mode (CONFIG+=release)
2022-09-21 18:20:02 +02:00
Pascal Precht f2de2642ac feat(Components): introduce `StatusChatInfoToolBar` component
Usage:

```qml
import StatusQ.Components 0.1

StatusChatInfoToolBar {
    chatInfoButton.title: "Cryptokitties"
    chatInfoButton.subTitle: "128 Members"
    chatInfoButton.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
    chatInfoButton.icon.color: Theme.palette.miscColor6

    popupMenu: StatusPopupMenu {

        StatusMenuItem {
            text: "Create channel"
            icon.name: "channel"
        }

        StatusMenuItem {
            text: "Create category"
            icon.name: "channel-category"
        }

        StatusMenuSeparator {}

        StatusMenuItem {
            text: "Invite people"
            icon.name: "share-ios"
        }
    }
}
```

Closes #141
2022-09-21 18:20:02 +02:00
Pascal Precht 524eb14512 Revert "Revert "feat: can be used on tablets (#146)""
This reverts commit 59b40c0713a9a41bd95bff0f395a796c69e46fa6.
2022-09-21 18:20:02 +02:00
Pascal Precht 9085fe72d7 fix(StatusListItem): various fixes w.r.t. sensor, icon size etc
This also exposes `statusListItemSubTitle` for more control over
it's appearance, if needed.
2022-09-21 18:20:02 +02:00
Pascal Precht 04e74609f8 feat(StatusRoundButton): add `highlighted` and `icon.rotation` props
These are needed for some UIs where the icon state may change based on the
user's interaction.
2022-09-21 18:20:02 +02:00
Pascal Precht 9bf98a1ede Revert "feat: can be used on tablets (#146)"
This reverts commit 63be01447930494f2afc61d5212f3c84ee1509e8.
2022-09-21 18:20:02 +02:00
Boris Melnik 7e9a76dbe7 feat: can be used on tablets (#146)
Co-authored-by: B.Melnik <b.melnik@restream.rt.ru>
2022-09-21 18:20:02 +02:00
Pascal Precht fde8d17beb fix(StatusNavBarTabButton): fix popup menu positioning 2022-09-21 18:20:02 +02:00
Pascal Precht 1c0c4fdd21 fix(StatusNavBarTabButton): ensure click signal is emitted when not menu is provided 2022-09-21 18:20:02 +02:00
Pascal Precht 7d96ad02ca feat(StatusPopupMenu): make menu items invisible when disabled
Closes #135
2022-09-21 18:20:02 +02:00
Pascal Precht 666908d93a feat(StatusNavBarTabButton): introduce `popupMenu` property
This enables users to apply a `StatusPopupMenu` to the button which automatically
positions itself and takes care of highlighting the activated button.

Usage:

```qml
StatusNavBarTabButton {
    ...
    popupMenu: StatusPopupMenu {

        StatusMenuItem {
            text: qsTr("Invite People")
            icon.name: "share-ios"
        }

        StatusMenuItem {
            text: qsTr("View Community")
            icon.name: "group"
        }

        StatusMenuItem {
            text: qsTr("Edit Community")
            icon.name: "edit"
        }
    }
}
```

Closes #137
2022-09-21 18:20:02 +02:00
Pascal Precht b81f0ecd41 fix(StatusAppNavBar): don't rely on `undefined` property
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.
2022-09-21 18:20:02 +02:00
Pascal Precht afa4739df6 feat(StatusChatListItem): accept right clicks
Also triggers the context menu in `StatusChatListCategory`.

Fixes #131
2022-09-21 18:20:02 +02:00
Pascal Precht 30956a757d fix(Components): more popup menu position fine-tuning 2022-09-21 18:20:02 +02:00
Pascal Precht 33082a761b fix: introduce tiny icon versions and make use of them where needed
Closes #128
2022-09-21 18:20:02 +02:00
Pascal Precht bd280acd83 fix(StatusChatToolBar): ensure context menu as proper position
Also expose action buttons for more custom control.
2022-09-21 18:20:02 +02:00
Pascal Precht ce91db10fe fix(StatusChatToolBar): ensure menu button stays highlighted
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
2022-09-21 18:20:02 +02:00
Pascal Precht b5bc83b871 feat(Components): introduce `StatusChatListCategory`
A component used to render chat list groups.

Usage:

```qml
import StatusQ.Components 0.1

StatusChatListCategory {
    categoryId: ...
    name: "Public"
    opened: true // default `true`

    addButton.[...]: ... // `StatusChatListCategoryItemButton`
    menuButton.[...]: ... // `StatusChatListCategoryItemButton`
    toggleButton.[...]: ... // `StatusChatListCategoryItemButton`

    chatList.chatListItems.model: ... // `chatsList` is a `StatusChatList`
    chatList.selectedChatId: ...
    chatList.onChatItemSelected: ...

    popupMenu: StatusPopupMenu {
        ...
    }
}
```

Closes #123
2022-09-21 18:20:02 +02:00
Pascal Precht 6ccc9625ba feat(StatusChatListCategoryItem): introduce `highlighted` property 2022-09-21 18:20:02 +02:00
Pascal Precht 6276a789c3 feat(StatusPopupMenu): introduce `closeHandler` hook
This enables us to predefine default close handlers for popup
menus.
2022-09-21 18:20:02 +02:00
Pascal Precht a1ecb77f19 feat(StatusChatListCategoryItemButton): introduce `highglighted` property 2022-09-21 18:20:02 +02:00
Pascal Precht 9ae468a70b feat(Components): introduce `StatusChatListCategoryItem`
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
2022-09-21 18:20:02 +02:00
Pascal Precht 0fb1818f53 fix(StatusChatListItem): use proper font size for chat name 2022-09-21 18:20:02 +02:00
Pascal Precht 893f96ac88 feat(StatusFlatRoundButton): support icon rotation 2022-09-21 18:20:02 +02:00
Pascal Precht f4005ed52c feat(StatusListItem) expose content children and introduce padding properties
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
}
```
2022-09-21 18:20:02 +02:00
Pascal Precht ae9c1d810f fix(Core): add missing `rotation` property to `StatusIconSettings` 2022-09-21 18:20:02 +02:00
Pascal Precht 52f5c31b3d feat(Components): introduce `StatusChatList`
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
2022-09-21 18:20:02 +02:00
Pascal Precht 82643816f6 feat(StatusQ.Popups): introduce StatusPopupMenu component
Usage:

```qml
import StatusQ.Popups 0.1

Button {
    onClicked: simpleMenu.popup()
}

StatusPopupMenu {
    id: simpleMenu
    StatusMenuItem {
        text: "One"
    }

    StatusMenuItem {
        text: "Two"
    }

    StatusMenuItem {
        text: "Three"
    }
}
```

Closes #96 #74
2022-09-21 18:20:02 +02:00
Pascal Precht cd2fa3d0b7 chore: add tooltip to theme switch 2022-09-21 18:20:02 +02:00
Pascal Precht aecbb443de chore: re-introduce reload button 2022-09-21 18:20:02 +02:00
B.Melnik 1acc248c79 fix: update position of window to center, add traffic lights 2022-09-21 18:20:02 +02:00
Pascal Precht 8aa421e6a6 fix(StatusQ.Core.Theme): use correct dropshadow color in dark theme 2022-09-21 18:20:02 +02:00
Pascal Precht 80dbec9fcc fix(Core): don't rotate `ColorOverlay` of `StatusIcon`
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
2022-09-21 18:20:02 +02:00
Pascal Precht 4e25f584cc feat(sandbox): introduce first version of reference app
This reference app serves as a dogfooding ground for StatusQ components.
2022-09-21 18:20:02 +02:00
Pascal Precht 93a0b2ae21 refactor: make use of `StatusRoundImage`'s built-in loading indicator
Closes #89
2022-09-21 18:20:02 +02:00
B.Melnik 60d3bdaff4 feat(Components): Add StatusSlider
Closes: #13
2022-09-21 18:20:02 +02:00