Commit Graph

334 Commits

Author SHA1 Message Date
Anastasiya S ea6e651b2a chore(@desktop/general): disable enter and return keys for search pop up 2021-11-03 19:14:37 +03:00
Anastasiya S 0a08bb80c0 chore(StatusSearchPopup.qml): disable enter and return keys 2021-11-03 17:27:05 +03:00
Alexandra Betouni 31cfc8833a
fix(StatusSlider): slider background and handle should not depend on root's height
Made slider background and handle to not depend
to root's height so that it covers cases where a
legend is needed thus all should be clickable for
better user experience.

Relates to status-im/status-desktop#3984
2021-11-03 11:29:49 +01:00
Pascal Precht a91558655c feat(StatusQ.Controls.Validators): introduce `StatusUrlValidator` 2021-11-03 11:26:00 +01:00
Pascal Precht dee9f43761 feat(StatusBaseButton): introduce `Tiny` size 2021-11-03 11:25:49 +01:00
Pascal Precht f82cd7f52b fix(StatusInput): ensure validator messages are rendered when validators return boolean values
There's two ways to signal that a validator emits invalidity on a control:

1. Its `validate()` method returns `false`
2. Its `validate()` method returns an object

Option 2) allows validators to supply the `errors` object with additional data.

Due to latest changes to `errorMessage` handling in validators, those messages
would not be rendered anymore if a validator returns simply `false` instead of an object.
The reason for that is because the code assumed that only option 2) is gonna happen.

This commit ensures that error messages a displayed in both options.
2021-11-03 11:25:34 +01:00
Pascal Precht 99b9e4f4f2
chore: cut 0.16.0 release 2021-11-01 10:49:14 +01:00
Pascal Precht da9dc2f46a fix(StatusModal): render footer correctly based on `showFooter` flag 2021-11-01 10:48:06 +01:00
Pascal Precht d301b94c70 feat(StatusQ.Platform): introduce StatusMacNotification component 2021-10-29 10:38:51 +02:00
Pascal Precht ea9a560277 feat(StatusQ.Controls): introduce `StatusWalletColorSelect` control
Usage:

```qml
StatusWalletColorSelect {
    model: Theme.palette.accountColors
}

```

Closes #467
2021-10-28 09:15:40 +02:00
Pascal Precht eb4aae4060 fix(StatusRoundButton): ensure disabled state uses correct background color 2021-10-27 18:00:11 +02:00
Pascal Precht 597ae19242 feat(StatusQ.Controls): introduce `StatusWalletColorButton` component
Usage:

```qml
StatusWalletColorButton {
    icon.color: Theme.palette.miscColor1
    selected: true
}
```

Closes #466
2021-10-27 17:59:50 +02:00
Pascal Precht 7e02a32f48
chore: release 0.15.0 2021-10-26 14:29:48 +02:00
Pascal Precht 4cc0d2bbca feat(StatusQ.Controls): introduce StatusChatCommandButton
Usage:

```qml
StatusChatCommandButton {
    icon.name: "send"
    icon.color: Theme.palette.miscColor2
    text: "Send transaction"
}
```

Closes #429
2021-10-26 14:26:42 +02:00
Pascal Precht 4bcd89b38a feat(StatusQ.Controls): introduce `StatusTabBarIconButton` component
Usage:

```qml
StatusTabBarIconButton {
    icon.name: "travel-and-places"
}
```

Closes #428
2021-10-26 14:26:30 +02:00
Pascal Precht 64b2a51c09
chore: cut 0.14.0 release 2021-10-25 12:00:59 +02:00
B.Melnik ab9ab2497b fix(Spellchecking): Add check for hunspell existence 2021-10-25 11:59:50 +02:00
Alexandra Betouni 98dab4ff82 fix(Popups/StatusMenuItemDelegate) adding checks to avoid undefined errors 2021-10-25 11:59:35 +02:00
Khushboo Mehta 1452748331 feat(StatusSmartIdenticon): Created a new StatusQ componnent to accomodate:
1. A StatusRoundedImage
2. StatusRoundIcon
3. LetterIdenticon

Fallback in case of an error in loading Image to the LetterIdenticon
2021-10-22 11:02:05 +02:00
Pascal Precht 074dc22ba5 fix(StatusModal): ensure `onEditButtonClicked` signal is emitted
Closes #454
2021-10-21 12:36:16 +02:00
Pascal Precht 9c5f79a695 fix(StatusModal): expose `header.editable` property
Fixes #452
2021-10-21 12:36:16 +02:00
Anastasiya S 6114c99311 chore(StatusChatInfoButton): add object name for pin counter for testing purposes 2021-10-20 09:22:35 +02:00
Anastasiya S 86f50edfdc chore(StatusChatInfoButton): add object name for testing purposes 2021-10-19 15:06:13 +02:00
Pascal Precht e945577e3c
chore: cut 0.13.0 release 2021-10-19 09:49:21 +02:00
B.Melnik 8360d3e415 chore(ForTests): Add ojectName's for modals 2021-10-19 08:04:16 +02:00
Khushboo Mehta 71fbdef164 feat(StatusFlatRoundButton): Update the StatusFlatRoundButton to take over button behaviour from StatusIconButton under ui/shared/status
1. Added icon disabledColor property under StatusIconSettings
2. Added Tertiary and Quaternary type to accomodate hovered behavior needed in many buttons
3. Added a missing gif icon.
2021-10-19 08:04:00 +02:00
Pascal Precht 8aba017c24 fix: use proper double checkmark icon 2021-10-18 16:52:32 +02:00
Pascal Precht a37489204c fix(StatusBaseButton): introduce missing `highlighted` property 2021-10-18 16:47:51 +02:00
Pascal Precht dab12dc7c8
chore: cut 0.12.0 release 2021-10-18 10:17:15 +02:00
Pascal Precht 409c2ccafa
chore: ignore cache files 2021-10-18 10:15:16 +02:00
B.Melnik e1b0f2dc9a feat: Resolve StatusQ modules highlighting and add qml compiler for detecting coompile time errors 2021-10-18 09:46:22 +02:00
Pascal Precht bdd699557d feat(StatusQ.Controls): introduce StatusColorSelector component
This is a select component to pick from various supplied colors.

Usage:

```qml
import StatusQ.Controls 0.1

StatusColorSelector {
    model: ["red", "blue", "green"]
}

```

Closes #444
2021-10-15 11:04:22 +02:00
Pascal Precht 9fdc9aeaa3 feat(StatusQ.Controls): introduce `StatusAssetSelector` component
This is used for a more complex amount and asset selector component.

Usage:

```qml
import StatusQ.Controls 0.1

StatusAssetSelector {
    assets: ListModel {
        ListElement {
            address: "0x1234"
            name: "Status Network Token"
            value: "20"
            symbol: "SNT"
            fiatBalance: "9992.01"
            fiatBalanceDisplay: "9992.01"
        }
        ListElement {
            address: "0x1234"
            name: "DAI Token"
            value: "20"
            symbol: "DAI"
            fiatBalance: "20"
            fiatBalanceDisplay: "20"
        }
    }
}
```

Closes #442
2021-10-15 11:03:31 +02:00
Pascal Precht 6789446df3 feat(StatusQ.Components): introduce `StatusAddress` component
This introduces a `StatusAddress` component which renders an address
and can be made `expandable` by applying a `width`:

```qml
import StatusQ.Components 0.1

// Simple case
StatusAddress {
    text: "0x9ce0056c5fc6bb9459a4dcfa35eaad8c1fee5ce9"
}

// Expandable case
Item {
    width: 200
    height: childrenRect.height
    StatusAddress {
        text: "0x9ce0056c5fc6bb9459a4dcfa35eaad8c1fee5ce9"
        expandable: true
        width: parent.width
    }
}

```

Closes #430
2021-10-15 11:02:41 +02:00
Pascal Precht 5e15cc49f6 feat(StatusQ.Controls): introduce `StatusAccountSelector` component
This commit moves the original `AccountSelector` into StatusQ and makes it
a `StatusAccountSelector`. The API has been preserved. The only difference is
that it's internally relying completely on `StatusQ.Core.Theme` and `StatusQ.Controls`
components instead.

Usage:

```qml
import StatusQ.Controls 0.1

StatusAccountSelector {
    accounts: ListModel {
        ListElement {
            name: "Pascal"
            address: "0x1234567891011"
            iconColor: "red"
            balance: "0"
            walletType: "generated"
            assets: []
            fiatBalance: "1199.02"
        }
        ListElement {
            name: "Boris"
            address: "0x123"
            iconColor: "red"
            balance: "0"
            walletType: "generated"
            assets: []
            fiatBalance: "0"
        }
        ListElement {
            name: "Alexandra"
            address: "0x123"
            iconColor: "yellow"
            balance: "0"
            walletType: "generated"
            assets: []
            fiatBalance: "0"
        }
        ListElement {
            name: "Khushboo"
            address: "0x123"
            iconColor: "blue"
            balance: "0"
            walletType: "generated"
            assets: []
            fiatBalance: "0"
        }
    }
}
```

Closes #435
2021-10-15 11:02:28 +02:00
Pascal Precht 6e10959e40 feat(StatusQ.Controls): introduce `StatusSelect`
This introduces a new `StatusSelect` component which is a select form control.
The `model` property can be used to apply a `ListModel` for dynamic data.
To give users full control over what the menu items look like, `StatusSelect`
exposes a `selectMenu.delegate` property.

Most of the time this should be a `StatusMenuItemDelegate` to get access to the
comple `MenuItem` component (remember that `StatusMenuItem` is merely an `Action`
type).

`StatusMenuItemDelegate` derives most of its behaviour by its applied `action`,
so the easiest way to construct a dynamic select with StatusQ menu item look and feel
is a combination of `StatusMenuItemDelegate` and `StatusMenuItem` as shown below.

Further more, because `StatusSelect` can't know what the `delegate` is going to look like
it also can't decide what data goes into a `selectedItem`. Therefore, it offers another API,
the `selectedItemComponent` which can be any component. This component can then be accessed
by menu item actions to set corresponding properties.

Usage:

```qml
import StatusQ.Controls 0.1

StatusSelect {
    label: "Some label"
    model: ListModel {
        ListElement {
            name: "Pascal"
        }
        ListElement {
            name: "Khushboo"
        }
        ListElement {
            name: "Alexandra"
        }
        ListElement {
            name: "Eric"
        }
    }

    selectMenu.delegate: StatusMenuItemDelegate {
        statusPopupMenu: select
        action: StatusMenuItem {
            iconSettings.name: "filled-account"
            text: name
            onTriggered: {
                selectedItem.text = name
            }
        }
    }

    selectedItemComponent: Item {
        id: selectedItem
        anchors.fill: parent
        property string text: ""

        StatusBaseText {
            text: selectedItem.text
            anchors.centerIn: parent
            color: Theme.palette.directColor1
        }
    }
}
```

Closes #436
2021-10-15 11:00:30 +02:00
Pascal Precht 0764e25a58 feat(StatusQ.Popups): introduce `StatusMenuItemDelegate`
This extracts the `MenuItem` delegate used in `StatusPopupMenu` into its
own component so it can be easily reused for cases where simply supplying the
popup menu with `StatusMenuItem` (which is of type `Action`) isn't enough.

Ideally, the `StatusMenuItemDelegate` would be called `StatusMenuItem` but that
would be a breaking change.

Usage:

```qml

StatusPopupMenu {
    delegate: StatusMenuItemDelegate {
        ...
    }
}
2021-10-15 11:00:18 +02:00
B.Melnik 5043b0b625
feat(StatusModal): Add edit avatar button
Part of https://github.com/status-im/status-desktop/issues/3734
2021-10-15 10:49:40 +02:00
Pascal Precht 694a4ca1ec
chore: cut 0.11.1 release 2021-10-12 11:34:25 +02:00
Khushboo Mehta c276a90e73 fix(StatusChatInfoButton): StatusChatInfoButton takes up entire available width
fixes #432
2021-10-08 08:37:20 +02:00
Khushboo Mehta dce45c2ff3 fix: Sandbox doesn't build on Linux machines
fixes #423
2021-10-08 08:37:01 +02:00
Khushboo-dev-cpp d9da5bdc1d
feature(StatusSelectableText): Added a selectable text component (#431)
Features:
1. Select text and copy it
2. Custom highlight on selection
3. Highlight on links
4. Support for multiline text
2021-09-29 15:22:23 -04:00
Pascal Precht b6a6e220f7
chore: cut v0.11.0 release 2021-09-27 10:52:07 +02:00
B.Melnik 478177f25e fix(StatusSpellcheckingMenuItems): Exact menu items order 2021-09-27 10:48:18 +02:00
Pascal Precht 654bd9f284 fix(StatusSearchPopup): use correct theme color for search result text
This used `Theme.palette.black` before which doesn't work across differen themes.
`Theme.palette.directColor1` is the correct one to use here.
2021-09-27 10:48:02 +02:00
Pascal Precht a2e3659d99 fix(StatusChatList): ensure right click popup opens in correct position
This broke because the emitted `mouse` coordinates where no longer correct
after we've moved the chat list item into a delegate model.
2021-09-27 10:47:38 +02:00
Eric Mastro 5c3267f7e6
feat: add star icons (#422) 2021-09-23 15:00:04 -04:00
Eric Mastro 0631d500e1 fix: track category opened state
Category `opened` state is tracked and restored on model change.

Previously, when the model data for categories and channels was changed, all unexpanded, or collapsed categories would automatically expand. This was due to the default state of the category `opened` property being restored (which was set to true) when the model data changed.

With this change in place, the opened state of each category is tracked in the parent component (`StatusChatListAndCategories`), and on each model change, the opened state is restored.

NOTE: it was tempting to the put the changes inside of the `StatusChatListCategory` component, however this would not work as the component is used as a delegate, and all state is wiped on each model change.
2021-09-23 15:05:17 +02:00
Pascal Precht 8f8cb336c2
chore: cut 0.10.0 release 2021-09-20 08:53:01 +02:00
B.Melnik 3e24b71075 feat(StatusSpellcheckingMenuItems): Add spellchecking menu
Closes: #398
2021-09-20 08:52:06 +02:00