Commit Graph

605 Commits

Author SHA1 Message Date
Pascal Precht 051bf86682
chore: add initial CHANGELOG 2021-07-15 15:01:22 +02:00
Pascal Precht 58e8f1cd23 feat(StatusFlatRoundButton): introduce `highlighted` color for secondary type
Closes #245
2021-07-15 13:00:58 +02:00
B.Melnik 193498815f feat(StatusBaseInput): Add focused state
Closes: #240
2021-07-13 10:12:56 +02:00
Pascal Precht 86da901e88
feat(StatusChatToolBar): add tooltips to action buttons
Closes #244
2021-07-12 14:17:40 +02:00
Pascal Precht e93dab2ba0 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
2021-07-12 13:18:58 +02:00
Pascal Precht ac5c84529e
fix(StatusChatList): ensure badge is also shown for one to one messages 2021-07-09 16:08:02 +02:00
Pascal Precht 096d4148cd 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.
2021-07-09 14:56:24 +02:00
B.Melnik f2d36d3d80 fix(StatusBaseInput): Fix focus area
Closes: #241
2021-07-09 11:40:35 +02:00
Pascal Precht 8155d9a218
feat(StatusListItem): add `Danger` type support
Usage:

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

Closes #248
2021-07-09 11:38:05 +02:00
Pascal Precht 70043c5be4 feat(StatusRoundIcon): enable `icon.color` support 2021-07-09 11:34:39 +02:00
Pascal Precht 531e54f238 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
2021-07-09 11:34:25 +02:00
Alexandra Betouni 51a345866a [#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
2021-07-09 11:16:04 +02:00
Pascal Precht bd383e8746 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
2021-07-08 11:42:08 +02:00
B.Melnik 1321760442
feat(Controls): introduce StatusBaseInput
Usage: The same interface like TextField

Closes: #106
2021-07-08 11:30:31 +02:00
Pascal Precht 0072154f9f
chore: add safety to satisfy QML 2021-07-06 12:30:00 +02:00
Pascal Precht 7dcec0cace fix(StatusChatInfoButton): make component identicon aware
Closes #228
2021-07-06 11:48:36 +02:00
Pascal Precht 144ac69d31 fix(StatusChatInfoButton): prefix chat name with "#" if needed
Closes #229
2021-07-06 11:48:20 +02:00
Pascal Precht 7b2030c6ab fix(StatusChatInfoButton): vertically center title if no subtitle is provided
Closes #230
2021-07-06 11:48:07 +02:00
Pascal Precht f7e38c9c72 fix(StatusChatInfoButton): disable hover effects when sensor is disabled
Closes #231
2021-07-06 11:47:52 +02:00
Pascal Precht cbdaf12814 fix(StatusChatListCategory): only try open popup when supplied
Closes #220
2021-07-02 14:28:40 +02:00
Pascal Precht 53d63a9b01 fix(StatusChatListAndCategories): make chat list visibily flag work
Closes #217
2021-07-02 14:28:29 +02:00
Pascal Precht 722d92c012 fix(StatusChatList): ensure popupMenu closeHandler don't break
These broke because we were referring to a `highlighted` property that
was wrongly scoped.

Fixes #216
2021-07-02 14:28:17 +02:00
Pascal Precht a9ae426cf5 fix(StatusChatListAndCategories): ensure chatItemUnmuted event is propagated
Closes #219
2021-07-02 14:28:05 +02:00
Pascal Precht 23ddbc2e0d fix(StatusChatListAndCategories): ensure chat list receives popup menu
Closes #218
2021-07-02 14:27:56 +02:00
Pascal Precht a664f635a7
feat(StatusChatList): expose hook to lazily calculate chat item names 2021-06-30 16:12:21 +02:00
Pascal Precht fd7a5530cf fix(StatusMenuSeparator): ensure height is 0 when invisible or disabled
Closes #212
2021-06-30 13:38:21 +02:00
Pascal Precht f7f217ed22 fix(StatusChatList): use fallback property to determine unread message count 2021-06-30 13:38:12 +02:00
Pascal Precht 3b11a1a81c
chore(README): re-add sandbox app instructions
Those have been accidentally removed in previous commits.
2021-06-29 13:43:31 +02:00
Iuri Matias 171b14bf40
Update README.md 2021-06-29 06:49:41 -04:00
Pascal Precht 0a8517e8a4
chore(README): add table of components 2021-06-29 11:55:41 +02:00
B.Melnik 71d0ef7f6a
fix: Add missing .qml to resources, add qmlcache to gitignore 2021-06-29 09:47:47 +02:00
B.Melnik f4e6b3da8a bug(StatusLoadingIndicator): Change Animator to Animation
Closes: #188
2021-06-29 09:46:23 +02:00
Pascal Precht 34df0f0dab fix(StatusChatListItem): ensure chat name elides when it's too long
Closes #151
2021-06-29 09:46:08 +02:00
Pascal Precht 141872c2a5 fix(StatusChatListItem): ensure public chat names are prefixed with '#'
Closes #191
2021-06-25 12:42:19 +02:00
Pascal Precht a98bae48dd refactor(StatusPopupMenu): expose category and chat id via open handler
Closes #192
2021-06-25 12:42:08 +02:00
Pascal Precht 7a2648f69f 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
2021-06-24 16:27:25 +02:00
Pascal Precht cfacd5be6d 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
2021-06-24 16:17:06 +02:00
Pascal Precht baa663cea6 feat(Components): introduce `StatusContactRequestsIndicatorListItem`
Usage:

```qml
import StatusQ.Components 0.1

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

Closes #175
2021-06-24 16:09:58 +02:00
Pascal Precht 8ef2d0ee47 refactor: make chat component enum variants match protocol values
Closes #183
2021-06-24 16:02:17 +02:00
Pascal Precht a6262f0a34 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
2021-06-24 16:01:47 +02:00
Pascal Precht 75b2f508b3 fix(StatusModalHeader): ensure header has enough height for children
Closes #185
2021-06-24 16:00:30 +02:00
Pascal Precht 3d0688b778 fix(StatusRoundedImage): ensure images are scaled and positioned properly
Closes #172
2021-06-24 16:00:05 +02:00
Pascal Precht 70332a3f41 fix(StatusChatList): expect `model.color` instead of `iconColor` prop 2021-06-24 15:59:45 +02:00
Pascal Precht 300536bc5d fix(StatusChatList): ensure component provide default `width`
Closes #176
2021-06-24 15:59:21 +02:00
Pascal Precht 44343d3857 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
2021-06-24 15:58:59 +02:00
Pascal Precht 34b35318bc fix(StatusListItem): ensure icon background in secondary type works correctly 2021-06-24 15:58:28 +02:00
Pascal Precht de2c36d0e9 fix(StatusModal): ensure modal footer uses correct theme color 2021-06-24 15:58:04 +02:00
Pascal Precht 615575800a
chore(README): add StatusQ.Platforms to readme
Also adjust executable script for sandbox
2021-06-22 11:08:29 +02:00
B.Melnik 7bc7df8d1c feat(StatusIcon): Improvement of Icons 2021-06-22 11:02:06 +02:00
Pascal Precht 8a684a7d8a
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.
2021-06-22 10:37:59 +02:00