Compare commits

...
Author SHA1 Message Date
Igor Sirotin 6fb1cdad81 fix(Theme): Updated userCustomizationColors list per designs 2022-06-13 17:50:22 +03:00
Patryk Osmaczko b816643e2d fix: adapt StatusMemeberListItem usages to renamed properties 2022-06-13 10:45:35 +02:00
Noelia 33a3ee3d6e feat(StatusCommunityCard): Added explicit dependency between z properties
Added explicit dependency between z properties with banner, logo, and content card.
2022-06-13 09:48:25 +02:00
Noelia 2f24b69462 fix(StatusListItemTag): Added margins to better center the content
Added margins to better center the content
2022-06-13 09:48:25 +02:00
Noelia 40db66f763 feat(StatusCommunityCard): New design
- Added community banner.
- Added community restrictions / private.
- Modified card background shape.
- Modified logo shape and position.
- Modified text position and size.
- Modified `loading state` card.
- Added `DropShadow` effect.
- Added new icons.
- Added new community images and updated model.
- Added numbers format function.
- Added following new properties: `banner`,`activeUsers` `communityColor`, `isPrivate` and `tokenLogo`.

Closes #692
2022-06-13 09:48:25 +02:00
Patryk Osmaczko 5361b56e9f chore: adapt to new user/member backend models structure 2022-06-12 15:37:29 +02:00
Patryk Osmaczko 0e73530b05 chore(StatusModal): set StatusModal margins to 64
closes: status-im/status-desktop#6049
2022-06-12 12:43:03 +02:00
Patryk Osmaczko 0f5c1ce4c6 chore(StatusModal): make StatusModal follow padding
https://github.com/status-im/status-desktop/pull/6010#discussion_r892148627
2022-06-12 12:43:03 +02:00
Noelia b569782d4c feat(StatusTagSelector): Updated component to use StatusTagItem as a delegate
Updated component to use `StatusTagItem` as a delegate.
2022-06-09 15:49:07 +02:00
Noelia d69b0598bf feat(StatusTagItem): Created new control that represents a tag item
Created new `StatusTagItem` control and added that represents a tag item with a `text`, `icon` and `isReadonly` properties.
2022-06-09 15:49:07 +02:00
Noelia 70834fc187 feat(StatusTagSelector): Introduced readonly tags and possibility of icon
- Different tag color depending if the entry `isReadonly` or not.
- Tag disabled if the entry `isReadonly`.
- Possibility to show icon if entry contains the proper info.
- Added property `orderByReadonly` to position `isReadonly` entries in the left.

Updated sandbox project examples according to new tag updates.

Closes #694
2022-06-09 15:49:07 +02:00
Anthony Laibe 18d385cf2b feat(@StatusAssetSelector): Use asset selector per symbol and not (#715)
address
2022-06-09 15:10:45 +02:00
Alexandra Betouni 648406c442 fix(StatusTagSelector): Fixed Layout issues when shrinking (#714)
Closes https://github.com/status-im/status-desktop/issues/5954
2022-06-09 14:41:05 +03:00
Alexandra Betouni 5f7bd307ef fix(StatusSeedPhraseInput): removed input anchoring not needed after refactor
Closes https://github.com/status-im/status-desktop/issues/5967
2022-06-07 16:25:09 +02:00
Igor Sirotin 890ef86e1c fix(StatusBaseButton): Mouse events ignored when button is disabled (#707)
* fix(StatusBaseButton): Mouse events ignored when button is disabled
2022-06-07 14:56:45 +03:00
Noelia 0b855bfb48 fix(StatusPopupMenu): Changed dim to false
Changed dim to false.

Fixes https://github.com/status-im/status-desktop/issues/5828
2022-06-07 11:19:52 +02:00
Patryk Osmaczko 10cd9b23c1 fix(StatusSearchPopup): add color hash to chat icons 2022-06-02 10:01:52 +02:00
Patryk Osmaczko bf3578cf7c chore(StatusBaseText): add theme aware default color 2022-06-01 16:26:10 +02:00
Boris Melnik da22cde5e6 feat(StatusMemberListItem): Add admin status (#704) 2022-06-01 15:00:15 +03:00
Alexandra Betouni 312858b420 feat(StatusTagSelector): Added colorIdForPubkeyGet property (#702)
Needed for: https://github.com/status-im/status-desktop/issues/5875
2022-06-01 10:47:38 +03:00
Noelia a4d0c13662 feat(StatusTagSelector): Added property showSortedListOnlyWhenText and make dynamic the implicitHeight
Added property `showSortedListOnlyWhenText` and make dynamic the `implicitHeight` calculation.
2022-05-31 15:22:17 +02:00
Noelia 61007c32e9 chore(assets): Added new icon add-to-dm
Added new icon `add-to-dm`.
2022-05-31 15:22:17 +02:00
Noelia 1cadfc051b feat(StatusChatToolBar): Add flexible component in right toolbar position
- Added loader in right component position and removed `StatusChatInfoButton` specific.

- Updated sandbox and added new example in Layouts with another different component than the `StatusChatInfoButton`.

BREAKING CHANGES:
The toolbar now expects a component to be loaded. The previous `StatusChatInfoButton` component has been removed and needs to be passed as a component from outside whenever needed.
Breaking changes in `desktop` will be addressed in: https://github.com/status-im/status-desktop/pull/5823
2022-05-31 15:22:17 +02:00
Noelia 46cd904ced feat(StatusCommunityCard): First component iteration (#693)
It includes logo, title, community members, description, loaded, community id, popularity, tags row (that must be replaced to a new StatusQ component `StatusListItemTagRow`.

It also contains `locale` property used to decide the member's number format.

Added loading card.

Added Community Card page (components test) and view (demo app) in sandbox.

Added component documentation.

Part of task: https://github.com/status-im/status-desktop/issues/4936
2022-05-31 11:44:26 +02:00
Patryk Osmaczko 9120a0fa1c chore(StatusBaseInput): expose placeholder as alias 2022-05-31 10:03:49 +02:00
Patryk Osmaczko 406e4a1177 chore(StatusInput): use layouts for elements positioning
It removes complexity and fixes StatusInput to follow the size assigned
by client.
2022-05-31 10:03:49 +02:00
Sale Djenic be0f49a8d8 fix(StatusRoundedImage): actual loaded image width and height updated
In case you're dynamically change source image and image width and height
are way bigger than the rounded image component width and height, resizing
was not done correctly.

update

update
2022-05-31 09:11:29 +02:00
Alexandra Betouni 24228c5568 feat(icons): adding view icon
Needed for: https://github.com/status-im/status-desktop/issues/4918
2022-05-30 16:17:25 +02:00
Alexandra Betouni 6056db73cf feat(StatusBaseInput): disabled mouse area when input is disabled
Needed for: https://github.com/status-im/status-desktop/issues/4918
2022-05-30 16:16:51 +02:00
Stefan ee3effcdd1 fix(StatusImageCrop): fix wrong initial image fit
The initial fit was computed for the square crop-window

updates: 5118
2022-05-26 03:00:24 +03:00
Mikhail Rogachev 07e711e30c feat(StatusLabeledSlider): add ability to decorate sliders and slider, decorated with lablels (#687)
Close #686
2022-05-25 11:12:50 +03:00
r4bbit.eth 0b1a910b06 fix(StatusNavigationListItem): make click handler work again (#688)
The click handler used inside the component broke in one of the latest
changes done in `StatusListItem` where it expects two arguments being
passed to its click handler.

This commit fixes it by supplying all needed arguments (where `itemId`
is always `''` unless set differently)
2022-05-24 15:57:59 -04:00
Mikhail Rogachev 81cbab3f66 feat(StatusColorSpace): impl color space component (#679) 2022-05-24 10:32:40 +03:00
Alexandra Betouni d31dddac7e fix(StatusListItem): added mouse obj parameter in clicked signal (#683)
Needed for: https://github.com/status-im/status-desktop/issues/5212
2022-05-23 18:22:01 +03:00
Igor Sirotin 485647d1c3 feat(StatusTabButton): Created component as per design (#684) 2022-05-23 14:29:42 +03:00
Alexandra Betouni e1db639340 feat(StatusTagSelector): Replaced member delegate w/ StatusMemberLisItm (#676)
Fixes https://github.com/status-im/status-desktop/issues/5625
2022-05-19 12:02:36 +03:00
Boris Melnik b918897241 fix(StatusTagSelector): Fix mouse hover (#678)
Closes: status-im/status-desktop#5220
2022-05-19 11:42:18 +03:00
Alexandra Betouni 6ba2d8f3e6 fix(StatusChatList): Fixed alignment in left column (#680)
Needed for https://github.com/status-im/status-desktop/issues/5211
2022-05-18 17:01:27 +03:00
Igor Sirotin c01f623305 fix(StatusLetterIdentIcon): Display emoji as svg (#677)
* fix(StatusLetterIdentIcon): Display emoji as svg

* feat(StatusEmoji): Added StatusEmoji image component
2022-05-17 21:16:11 +03:00
r4bbit.eth 6dc6ebb2fb fix(StatusSeedPhraseInput): ensure suggested item has correct text color (#670) 2022-05-13 14:24:24 -04:00
Igor Sirotin 2d031244ca fix(StatusSlider): Fixed background behavior (#667) 2022-05-13 14:24:07 -04:00
Mikhail Rogachev 9498be05ef fix(StatusProgressBar): Hide text in bar if it does not fit (#672) 2022-05-13 14:05:37 -04:00
Igor Sirotin 1b25ddd2b5 feat(Emoji): Functions improvements (#673)
- Introduced `format] argument for `parse` function
- New `iconId(text)` function
2022-05-13 14:01:48 -04:00
Alexandra Betouni 9741f98b70 fix(StatusSeedPhraseInput): anchored component to its parent bottom
Needed for: https://github.com/status-im/status-desktop/issues/5669
2022-05-13 16:29:35 +02:00
Alexandra Betouni 02923f7947 feat(StatusInput): exposed letterIconName property (#671)
Exposed letterIconName to be set in StatusLetterIdenticon

Needed for: https://github.com/status-im/status-desktop/issues/5636
2022-05-13 13:38:49 +03:00
Jonathan Rainville 6c5957a492 fix(StatusTagSelector): hide contact when it is selected (#668) 2022-05-12 16:27:35 -04:00
Jonathan Rainville eb96e5e08d fix(StatusSeedPhraseInput): autocomplete when word not alone in the list
The problem was that if the clicked word (or tabbed) was not alone in the suggestion list, the done signal was not called. Now it is always called when clicking on using tab or enter.
2022-05-12 10:00:06 -04:00
Stefan 457e5fe4af fix(StatusSlider): improve handle draging area
Issues
- The slider only handle mouse events in its own control space.
- In oder to use the entire area it needs to be centered.

Fixes

- Center the content vertically (handle and slider bar)
- Height and implicitHeight defaults to heigh of the handle
- Add note to create awareness about the mouse handling requirements
2022-05-11 19:30:04 +03:00
Stefan 1c0d4b0133 improvement(StatusImageCrop): add option to limit to fill
Currently only fit image is supported as minimum limit
This change sdds option to fill crop window with image as
minimum zoom which is required by status-go crop function
2022-05-11 18:06:26 +03:00
Alexandra Betouni ba79f62fda fix(StatusTagSelector): Updated names list filtering (#659)
Fixes: https://github.com/status-im/status-desktop/issues/5642
2022-05-11 12:01:14 +03:00
Jonathan Rainville a9c79b0359 fix(StatusBaseInput): adjust emoji size and position in base input (#660) 2022-05-10 15:17:22 -04:00
Alexandra Betouni a668afef35 fix(StatusTagSelector): Adjusted name tags list width and scrolling (#653)
Needed for https://github.com/status-im/status-desktop/issues/5643
2022-05-10 19:04:27 +03:00
Patryk Osmaczko deb8b38b1f chore(translations): add missing qsTrs
issue: status-im/status-desktop#4544
2022-05-10 17:52:34 +02:00
Khushboo Mehta b4ebc520e1 fix(StatusBaseButton): Button component should keep its original width/size when it enters loading state
fixes #656
2022-05-10 10:53:45 +02:00
mishkarogachev 5def2102c7 fix(StatusTagSelector):Create new chat input is single line 2022-05-10 10:52:49 +02:00
mishkarogachev 0f511ebc60 fix(StatusListItem): Make text always fit boundaries 2022-05-10 07:44:25 +02:00
Alexandra Betouni b09210cf1f fix(StatusTagSelector): Added up/down hard keys navigation
Needed for: https://github.com/status-im/status-desktop/issues/5640
2022-05-10 07:42:01 +02:00
Noelia 3bdfc3e528 fix(StatusBaseButton): After loading, button keeps loader width, so the button size is bigger
When button changed from loading to their normal shape it kept the width of the loader as it was visible in the row component.

It has been added a binding between loader `visible` property and root `loading` property that fixes the issue with the width.

Also, removed some `break` leftovers.

Fixes #5606 --> https://github.com/status-im/status-desktop/issues/5606
2022-05-10 07:41:45 +02:00
mishkarogachev baf5948c90 fix(StatusSwitchTabBar): Update and unify colors of tabBar 2022-05-10 07:41:15 +02:00
Jonathan Rainville 4b1516c990 fix(StatusWizardStepper): make to value configurable 2022-05-10 07:40:56 +02:00
Jonathan Rainville 1a5990f24b fix(StatusBaseInput): fix typo in verticalAlignement 2022-05-10 07:40:56 +02:00
Khushboo Mehta 82e1845056 fix(StatusListPicker): Add an option to allign the menu with respective the buttons and keep right aligned as the default one
Also fixes search placeholder to be centrally aligned

fixes #5633
2022-05-10 07:40:26 +02:00
Jonathan Rainville 75a76afcf1 fix(StatusSeedPhraseInput): fix pasting word with spaces in them
This makes it possible to paste a word with a space in it. It will insert it correctly
2022-05-09 13:02:30 -04:00
Jonathan Rainville 0922cf507a fix(StatusSeedPhraseInput): fix interactions in SeedInput 2022-05-09 13:02:30 -04:00
Jonathan Rainville 32c5f7f8df feat(StatusBasenput): add acceptReturn to Input to pass return events 2022-05-09 13:02:30 -04:00
Jonathan Rainville 148505ba6b fix(StatusBaseInput): fix dirty being set when the text didn't change 2022-05-06 20:07:36 +02:00
Sale Djenic d960c6dcec feat(StatusToastMessage): introduce duration property and close signal emit after animation
- `open` property set to `true` by default
- `duration` property added (if set to anything greater than 0, will trigger
close toast signal after `duration` milliseconds)
- `close` signal is now emitted once animation gets completed
2022-05-06 07:51:19 +02:00
Stefan bb9f08155f fix(StatusImageCrop): output an error if trying to set cropRect without image 2022-05-05 17:16:13 +02:00
Stefan 934db52126 test(Components.StatusImageCropPanel): basic validation tests for the image crop component
updates #5401
2022-05-05 17:16:13 +02:00
Stefan dcef08f3b3 test(Controls.StatusImageCrop): basic validation tests for the image crop control
updates #5401
2022-05-05 17:16:13 +02:00
Stefan 20e7b345e1 tests(general): refactor tests
Enhance the CMake strucuture of thests
Update documentation
2022-05-05 17:16:13 +02:00
Stefan 5f8453659d feat(Sandbox): add visual test setup page for StatusImageCropPanel
Other improvements:

- save state for theme switcher and last selected page
- add optional fill all test space for pages

fixes: 5401
2022-05-05 17:16:13 +02:00
Stefan c7ff011649 feat(StatusImageCropPanel): Add image crop editor panel component
New QML component StatusQ.Components.StatusImageCropPanel
that extends on StatusImageCrop with simper interface and extra features

Features:
- Minimizes drawing with Canvas to the crop window
- Adds user interactions: pan, zoom
- Zoom slider for zooming, beside the mouse scroll action
- Optional checker pattern for background for the user to have a visual feedback on the transparent areas or image margins

fixes: #5401
updates: #5118
2022-05-05 17:16:13 +02:00
Stefan 2b71ccf50f feat(StatusImageCrop): Image cropping editor control
New QML control StatusQ.Controls.StatusImageCrop allows user to crop an image for avatar/banner purpuses

Features:
- Support rectangular and elliptical crop windows
- Transparency for the wall
- Controlling the crop window in image coordinates using cropRect
- The image support is based on `Image`
- Limits the

fixes: #5401
2022-05-05 17:16:13 +02:00
Alexandra Betouni 310be728a3 fix(StatusChatList): Added property to control item's highlight (#646)
Needed for https://github.com/status-im/status-desktop/issues/5627
2022-05-05 12:27:05 +03:00
Igor Sirotin e2728285e1 build: Added all qmls and assets to resources (fixes release build) (#647) 2022-05-04 21:19:46 +03:00
Igor Sirotin 1d9abf8e95 fix(StatusBaseInput): Fixed border color on active focus loss (#643) 2022-05-03 19:08:40 +03:00
Igor Sirotin 31e90c2d47 fix(StatusBaseInput): Implement cursor as per designs (#642) 2022-05-03 19:08:02 +03:00
Noelia ae1e72fb23 fix(StatusListPicker): Disable uncheck option and reset searcher (#639)
Disabled uncheck option if component is configured as single selection mode.

Added binding to reset searcher input text when picker is closed.

BREAKING CHANGE: Renamed `searchText` property for `placeholderSearchText` to control placeholder text in searcher and added / used existing `searchText` property to control  searcher input text.
2022-05-03 10:45:36 +02:00
Stefan Dunca 7710470559 doc(contributing.md): add pixel miss-alignment recommendation
Follow up on the PR comment https://github.com/status-im/status-desktop/pull/5549#issuecomment-1099468321
2022-04-16 20:28:27 +02:00
Michal Iskierko 2069399979 fix(StatusTagSelector): Fix displaying a list of contacts in StatusTagSelector
Fix #5465
2022-04-13 12:30:02 +02:00
Alexandra Betouni 29dd4da2e4 fix(StatusSearchLocationMenu): removed dimming from submenus (#635)
fixes https://github.com/status-im/status-desktop/issues/5139
2022-04-11 17:33:53 -04:00
Patryk Osmaczko 394040a039 chore(StatusChatList): use colorId if color is not provided 2022-04-08 13:19:00 +02:00
Patryk Osmaczko a8e1ed863c chore(StatusLetterIdenticon): test different backgrounds 2022-04-08 13:19:00 +02:00
Patryk Osmaczko d7b1ae9fbc fix(StatusIdenticonRing): repait ring when model changes 2022-04-08 13:19:00 +02:00
Patryk Osmaczko f0c7d950ea chore(ThemePalette): introduced userCustomizationColors
BREAKING CHANGE: renamed accountColors to userCustomizationColors
2022-04-08 13:19:00 +02:00
Patryk Osmaczko 1e5d389b53 feat(StatusLetterIdenticon): use luminance to determine letter color 2022-04-08 13:19:00 +02:00
Alexandra Betouni 1cda85fc0e feat(StatusInput): Adding component documentation (#632)
Part of #616
2022-04-07 16:51:21 -04:00
Alexandra Betouni 4999368dfe feat(StatusBaseInput): Adding component documentation (#631)
Part of #616
2022-04-07 16:50:36 -04:00
Noelia 7e4d69be05 feat(StatusPasswordStrengthIndicator): Added component documentation (#630)
Added component documentation.

Part of #620
2022-04-07 16:50:23 -04:00
Noelia 3abbd3d4cd feat(StatusMemberListItem): Added component documentation (#629)
Added component documentation and updated functions to be private.

Part of #620
2022-04-07 16:50:09 -04:00
Noelia 8fc5276090 feat(StatusBanner): Added component documentation (#628)
Added component documentation.

Part of #620
2022-04-07 16:49:44 -04:00
Alexandra Betouni cf4b092112 feat(StatusTagSelector): Adding component documentation (#623)
Part of #616
2022-04-07 16:49:14 -04:00
Alexandra Betouni ddf4a8d4f1 feat(StatusToastMessage): Adding component documentation (#621)
Part of #616
2022-04-07 16:49:02 -04:00
Alexandra Betouni 9c1edc80db feat(StatusSeedPhraseInput): Adding component documentation (#617)
Also fixed component's height in demonstration page

Part of #616
2022-04-07 16:48:43 -04:00
Alexandra Betouni 20bf5b07a6 fix(StatusTagSelector): adding wrap mode in text edit (#633)
needed for: https://github.com/status-im/status-desktop/issues/5294
2022-04-07 16:12:12 -04:00
Noelia ade6bd2d0d fix(StatusPickerButton): Added property textPixelSize to be configurable (#626)
Added property `textPixelSize` to be configurable in `StatusPickerButton`.
2022-04-07 11:13:37 -04:00
Noelia 125760b934 fix(StatusItemPicker): Updated selected property properly and documentation improvements. (#625)
Updated `selected` property properly.

Some documentation improvements.
2022-04-07 11:13:13 -04:00
Noelia e231c0a6cb fix(StatusListPicker/StatusItemPicker/StatusPickerButton): Added some properties / signals (#624)
Added property `textPixelSize` to be configurable in `StatusPickerButton`.

Added signal `itemPickerChanged` to be directly notified when an item changes its selected property value.

Updated `selected` property properly in `StatusListPicker`.

Added new property `enableSelectableItem` to highlight an item when hovering.

Some documentation improvements.
2022-04-07 11:12:57 -04:00
Pascal Precht a16bc6bb6e fix(StatusSeedPhraseInput): don't access input control via root 2022-04-07 14:32:07 +02:00
Richard Ramos 51989c0f5d fix(StatusSeedPhraseInput): handle 3 characters mnemonics 2022-04-07 13:15:50 +02:00
Boris Melnik 88b7f6eab8 fix(StatusListItem): Show emoji if exist
Part of: https://github.com/status-im/status-desktop/issues/5350
2022-04-06 13:58:05 +02:00
Alexandra Betouni 2df3c0a03e feat(StatusWizardStepper): Adding component documentation (#618)
Part of #616
2022-04-06 10:22:15 +02:00
Anthony Laibe 1e9cc07e2d fix(StatusFloatValidator): Fix value equal to bottom 2022-04-05 11:54:23 +02:00
Patryk Osmaczko 6221c0a540 fix: add various fixes/improvements to identicons 2022-04-04 17:39:52 +02:00
Boris Melnik ddbffa7f28 feat(assets): Add new icons for community settings
Part of: status-im/status-desktop#4932
2022-04-04 15:25:31 +02:00
Noelia 555ad8bea8 feat(StatusQ.Components/Controls): New StatusListPicker and StatusItemPicker selector component / control (#583)
It adds the `StatusItemPicker` control and `StatusListPicker` component and its corresponding documentation.

The new selector component is composed by a `StatusButtonPicker` and a drop-down list.

It adds sections in `ListView` by using `category` model property.

It incorporates a searcher in header.

The selector type can be customised as a `StatusRadioButton` or a `StatusCheckbox`.

It adds dynamic selection mechanism.

It adds a dynamic text fit between `name` and `shortName` text components.

It adds a specific page in `sandbox` and some models to play with that.

It extends `StatusPickerButton` to allow more than one type.

Closes #563
2022-04-04 12:16:47 +02:00
Stefan Dunca a561a3fff8 Clarify dynamic scoping 2022-04-04 10:49:24 +03:00
Stefan 70ec009edd docs(General): initial proposal on developer documentation and checklists
Developer targeted checklist and reminders to cover the most common source of errors
and tech-debt (maintenance burden).
2022-04-04 10:49:24 +03:00
Alexandra Betouni 31a1c60eb1 fix(StatusTagSelector): fixing tag selector height (#606)
Fix for https://github.com/status-im/status-desktop/issues/5199
2022-04-01 17:26:35 +03:00
Alexandra Betouni 0a2cf6ab6e fix(StatusSeedPhraseInput): added trim() also when seedWord selected from list (#613)
Fixes issue on Windows where empty spaces are insterted in the input
field together with the word
2022-03-31 19:40:21 +03:00
Jonathan Rainville 07fa2a1b0c fix(StatusSeedPhraseInput): remove empty spaces in seed phrase input (#611) 2022-03-30 14:23:18 -04:00
Sale Djenic 43b8e43303 fix(@desktop/contacts): placeholder position updated 2022-03-30 18:30:21 +02:00
Alexandra BetouniandKhushboo-dev-cpp 2cec51ff8d feat(StatusSeedPhraseInput): exposed keys on pressed signal (#599)
* feat(StatusSeedPhraseInput): exposed touch/keys pressed events

Exposed keys.onPressed signal, mouse on clicked signal
as well as tabNavItem to be set in KeyNavigation.tab
when needed

Needed for task https://github.com/status-im/status-desktop/issues/4955

* feat(StatusListItem): Added new tags inline in the StatusListItem (#607)

Co-authored-by: Khushboo-dev-cpp <60327365+Khushboo-dev-cpp@users.noreply.github.com>
2022-03-30 01:23:54 +03:00
Noelia 684f45cc08 fix(StatusChatListCategory): Selecting the category menu should not toggle the category itself
Closes `status-desktop` issue https://github.com/status-im/status-desktop/issues/4914
2022-03-29 11:50:29 +02:00
Stefan eae4e0f405 tests(StatusInput): add regression test to check for qml output
Also improves on the test structure
2022-03-28 22:52:36 +03:00
Michał Iskierko b2ac2794bb fix(StatusSearchPopup): Fix cutting text with big font (#604)
Decreasing padding.
Setting loading property default to false.

Fix #5197
2022-03-28 13:14:15 -04:00
Patryk Osmaczko b565a32c7e fix(StatusInput): add implicitHeight
It makes it work with layouts correctly.
2022-03-28 15:27:13 +02:00
Patryk Osmaczko a1835164d9 fix(StatusBaseInput): fix default padding when leftComponent is loaded 2022-03-28 15:26:39 +02:00
Alexandra Betouni 06e931d749 fix(StatusSeedPhraseInput): Increased suggestion match chars to 4 2022-03-26 07:46:11 +01:00
Khushboo Mehta b9aa49853a fix(StatusInput): Added mising documentation of new properties to StatusInput and StatusModal
Moved the StatusInputWithCursor out of StatusQ as it not needed under StatusQ.
2022-03-25 14:51:53 +01:00
Khushboo Mehta 03eb6302d5 fix(StatusModal): Added support for advanced footer and header as seen in new designs.
It is also backward compatible and is not a breaking change.
2022-03-25 14:51:53 +01:00
Khushboo Mehta 5f8f798cf2 feat(StatusInput): Expose errorMessage so that its placement can be controlled from outside 2022-03-25 14:51:53 +01:00
Khushboo Mehta bbc0177a66 fix(StatusListItemTag): Fix for allignment in StatusListItemTag and option to make close button invisible 2022-03-25 14:51:53 +01:00
Khushboo Mehta 6ce9f9bd86 feat: Added new icon fees 2022-03-25 14:51:53 +01:00
Khushboo Mehta 46254f79c4 feat(StatusFloatValidator): Used to validate a float variable for
1. Is a valid number
2. Is greater than bottom value
3. Is less than top value
2022-03-25 14:51:53 +01:00
Khushboo Mehta ad659a5dc2 feat(StatusInputWithCursor): Extended the StatusInput to support an Input with no background and a blinking custom cursor 2022-03-25 14:51:53 +01:00
Alexandra Betouni 41f67b59e9 fix(StatusTagSelector): move suggestions popup inside component (#598)
Closes #531
2022-03-24 18:03:36 -04:00
r4bbit.eth aa91a88be7 chore: add check for dark and light theme to PR template (#597) 2022-03-24 07:03:31 +01:00
Boris Melnik f299c9df3a fix(StatusQ.Popups): Replace TextEdit to StatusBaseInput for SearchPopup
Closes: https://github.com/status-im/status-desktop/issues/5059
2022-03-23 17:16:52 +01:00
Patryk Osmaczko b6c3231e30 feat(StatusQ.Controls): add StatusTokenInlineSelector
Closes: status-im/status-desktop#4937
2022-03-23 11:00:57 +01:00
Jonathan Rainville 496ad05247 fix(StatusLetterIdenticon): fix emoji positioning
The emoji wasn't centered correctly on Windows
Fixes #5045
2022-03-23 07:29:34 +01:00
Patryk Osmaczko 93f9214aad fix(StatusBaseInput): apply changes required by StatusSeedPhraseInput 2022-03-22 19:45:52 +01:00
Patryk Osmaczko 22bbf9b177 refactor(StatusBaseInput): use RowLayout for position management 2022-03-22 19:45:52 +01:00
Noelia 7301323ed7 fix(StatusPasswordStrengthIndicator): Added new onValueChanged condition
Added new `onValueChanged` condition if bar value is 0 --> Strength.None.
2022-03-22 10:21:48 +01:00
Alexandra Betouni c6e4cf627c fix(SeedPhraseInput): Fixing SeedPhraseInput control height
The suggestion list should be showing up to 5 seed
word entries
2022-03-22 09:20:13 +01:00
Alexandra Betouni 5c1c9852ae fix(SeedPhraseInput): fix lost focus after typing one character
Relates to: https://github.com/status-im/status-desktop/issues/4955
2022-03-22 09:17:18 +01:00
osmaczko be2b2c3df7 ci: add pull request template 2022-03-21 14:19:57 +01:00
Jonathan Rainville 1362a94448 fix(StatusChatListItem): add missing import (#585) 2022-03-18 12:15:38 -04:00
Jonathan Rainville 189f66225c fix(StatusIconSettings): set charactersLen to 1 by default (#581)
This caused a breaking change where components that used to imply 1 charactersLen now showed no character at all because it defaulted to 0.
2022-03-17 15:08:51 -04:00
Jonathan Rainville 40d8b9c2f6 feat(StatusIconSetting): add emojiSize setting for icons (#579) 2022-03-17 14:14:39 -04:00
Jonathan Rainville 8af7028efc fix(StatusContactRequestIndicatorListItem): hide badge when value is 0 (#580)
* fix(StatusContactRequestIndicatorListItem): hide badge when value is 0

* feat(icons): add edit pencil icon
2022-03-17 11:56:44 -04:00
Alexandra Betouni f1eff6700a feat(StatusQ/Controls): Adding StatusSeedPhraseInput control
Also added an example in Inputs page

Closes #567
2022-03-17 11:24:36 +01:00
Stefan 082bb8ef45 docs(StatusInput): Initial basic docs plus validationMode 2022-03-14 02:43:01 -07:00
Stefan 7609450068 test(StatusInput): Add initial basic tests 2022-03-14 02:43:01 -07:00
Stefan 6570275176 fix(dev): silence qml warnings 2022-03-14 02:43:01 -07:00
Stefan 4b579cddbe feat(StatusInput): add mode to ingnore unvalidated content
Add optional feature to StatusInput not to allow typing characters
that are not validated

updates #4961
2022-03-14 02:43:01 -07:00
osmaczko a84026d74d Add various of changes required by emojiHash and identiconRing integration (#577)
* chore(StatusIdenticonRing): make ringSpecModel accept array of objects

* chore(StatusLetterIdenticon): add charactersLen and textColor settings
2022-03-13 09:00:55 -04:00
Khushboo-dev-cpp 428b165198 feat: Add emoji support (#575)
* feat: Add emoji support
1. StatusChatListItem (only updated parts already done by Jo)
2. StatusListItem
3. StatusInput

* feat(StatusColorSelectorGrid): Added new widget for color selection as needed in wallet

* fix(StatusInput): on reset, valid should be set to true else error mode is shown even though the user hasnt entered a value

* fix(StatusLetterIdenticon): Removed the clicked event out from the LetterIdenticon and added it to the StatusBaseInput as other places that use the letterIdenticon dont need the mouse area is not needed
2022-03-11 14:34:21 -05:00
Jonathan Rainville 56b2663e4d fix(StatusQ.Validators): fix regular expression test in validator 2022-03-10 17:10:15 +01:00
Anthony Laibe 9dbb7ec53f fix(@StatusListItem): Use tags model 2022-03-10 15:14:14 +01:00
Alexandra Betouni 7e9c7a52fd feat(StatusLetterIdenticon): Added charCount property in StatusLetterIdenticon
For desktop task #4956 the letter identicon displayed inside
the StatusSmartIdenticon should be of 2 characters and not 1.
2022-03-10 10:06:07 +01:00
Noelia 2e33fb9f81 feat(StatusPasswordStrengthIndicator): Add new Strength type None
Add new Strength type None and its corresponding state.
2022-03-09 13:17:58 +01:00
Pascal Precht 208825807b chore: cut v0.25.0 release 2022-03-07 19:11:38 +01:00
Anthony Laibe 381150a7b5 feat(@StatusListItem): add option for tags 2022-03-07 13:29:26 +01:00
Jonathan Rainville 5fac8774f4 feat(StatusChatListItem): enable assigning emoji to chat item 2022-03-07 10:19:43 +01:00
Anthony Laibe e9f20be15a feat(StatusQ.Core): add new arrow-left icon 2022-03-03 10:53:50 +01:00
Anthony Laibe 9d06aae1f4 fix(build): fix linux build
Fixes #413
2022-03-03 10:50:45 +01:00
10271 changed files with 39436 additions and 1538 deletions
+17
View File
@@ -0,0 +1,17 @@
### Checklist
- [ ] follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
- the scope should be the component's name e.g: `feat(StatusListItem): ... `
- when adding new components, the scope is the module e.g: `feat(StatusQ.Controls): ...`
- [ ] add documentation if necessary (new component, new feature)
- [ ] update sandbox app
- in case of new component, add new component page
- in case of new features, add variation to existing component page
- nice to have: add it to the demo application as well
- [ ] test changes in both light and dark theme?
- [ ] is this a breaking change?
- [ ] use the dedicated `BREAKING CHANGE` commit message section
- [ ] resolve breaking changes in [status-desktop](https://github.com/status-im/status-desktop)
- [ ] (pre-merge) adapt code to breaking changes
- [ ] (post-merge) update StatusQ submodule pointer
- [ ] test changes in [status-desktop](https://github.com/status-im/status-desktop)
+4 -1
View File
@@ -13,4 +13,7 @@ Makefile
*_qml.cpp
*_qmlcache.qrc
sandbox/qmlcache_loader.cpp
doc/html
doc/html
CMakeLists.txt.user
.vscode
build/
+29
View File
@@ -1,3 +1,32 @@
<a name=""></a>
## 0.25.0 (2022-03-07)
#### Bug Fixes
* **@StatusListItem:** fix left padding ([f574e390](f574e390))
* **StatusListItem:** add propagateTitleClicks property to StatusListItem ([8495fae8](8495fae8))
* **StatusQ.Popups:** removed overlay setting (#557) ([665141f8](665141f8))
* **StatusTagSelector:** Updates and fixes in the component ([07a5dc09](07a5dc09))
* **build:** fix linux build ([9d06aae1](9d06aae1), closes [#413](413))
* **sandbox:** Fix results popup component position ([cdf51fef](cdf51fef))
#### Features
* **@StatusListItem:** add option for tags ([381150a7](381150a7))
* **StatusChatList:** Highlight chat item at creation time ([9e6fbe95](9e6fbe95))
* **StatusChatListItem:** enable assigning emoji to chat item ([5fac8774](5fac8774))
* **StatusContactVerificationIcons:** Create new row control that includes mutual connect and trust indicator icons (#559) ([c0f825c6](c0f825c6), closes [#542](542))
* **StatusQ:** Moving docs outside sandbox ([825999b1](825999b1))
* **StatusQ.Core:** add new arrow-left icon ([e9f20be1](e9f20be1))
* **StatusSmartIdenticon:** Add support for color rings in StatusSmartIdenticon (#553) ([3b86d13a](3b86d13a), closes [#517](517))
#### Breaking Changes
* **StatusContactVerificationIcons:** Create new row control that includes mutual connect and trust indicator icons (#559) ([c0f825c6](c0f825c6), closes [#542](542))
<a name=""></a>
## 0.24.0 (2022-02-14)
+5
View File
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.19)
project(StatusQ)
add_subdirectory(tests)
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

+2
View File
@@ -22,6 +22,7 @@
\li \l{StatusDescriptionListItem}
\li \l{StatusLetterIdenticon}
\li \l{StatusListItem}
\li \l{StatusListPicker}
\li \l{StatusListSectionHeadline}
\li \l{StatusLoadingIndicator}
\li \l{StatusMemberListItem}
@@ -37,5 +38,6 @@
\li \l{StatusMessageDetails}
\li \l{StatusTagSelector}
\li \l{StatusToastMessage}
\li \l{StatusWizardStepper}
\endlist
*/
+2
View File
@@ -32,6 +32,7 @@
\li \l{StatusBaseInput}
\li \l{StatusIdenticonRing}
\li \l{StatusInput}
\li \l{StatusItemPicker}
\li \l{StatusPickerButton}
\li \l{StatusPinInput}
\li \l{StatusProgressBar}
@@ -43,5 +44,6 @@
\li \l{StatusWalletColorSelect}
\li \l{StatusRegularExpressionValidator}
\li \l{StatusIntValidator}
\li \l{StatusSeedPhraseInput}
\endlist
*/
+14 -3
View File
@@ -25,10 +25,11 @@ Rectangle {
id: appSectionType
readonly property int chat: 0
readonly property int community: 1
readonly property int wallet: 2
readonly property int communitiesPortal: 2
readonly property int wallet: 3
readonly property int browser: 3
readonly property int nodeManagement: 4
readonly property int profileSettings: 5
readonly property int nodeManagement: 5
readonly property int profileSettings: 6
readonly property int apiDocumentation: 100
readonly property int demoApp: 101
}
@@ -118,6 +119,11 @@ Rectangle {
appView.sourceComponent = statusAppChatView
demoApp.setActiveItem(model.sectionId)
}
else if(model.sectionType === appSectionType.communitiesPortal)
{
appView.sourceComponent = statusCommunityPortalView
demoApp.setActiveItem(model.sectionId)
}
else if(model.sectionType === appSectionType.profileSettings)
{
appView.sourceComponent = statusAppProfileSettingsView
@@ -205,6 +211,11 @@ Rectangle {
StatusAppProfileSettingsView { }
}
Component {
id: statusCommunityPortalView
StatusAppCommunitiesPortalView { }
}
DemoContactRequestsModal {
id: demoContactRequestsModal
anchors.centerIn: parent
+3
View File
@@ -7,6 +7,8 @@ Item {
id: themeSwitchWrapper
signal checkedChanged()
property alias lightThemeEnabled: switchControl.checked
width: themeSwitch.width
height: themeSwitch.height
@@ -26,6 +28,7 @@ Item {
}
StatusSwitch {
id: switchControl
onCheckedChanged: themeSwitchWrapper.checkedChanged()
StatusToolTip {
+11 -7
View File
@@ -3,9 +3,10 @@ import QtQuick.Layouts 1.14
import QtQuick.Dialogs 1.3
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
Column {
spacing: 10
Grid {
@@ -307,12 +308,15 @@ Column {
onClicked: {
colorDialog.open();
}
ColorDialog {
id: colorDialog
property bool colorSelected: false
onAccepted: {
colorSelected = true;
}
}
StatusColorDialog {
id: colorDialog
anchors.centerIn: parent
property bool colorSelected: false
onAccepted: {
colorSelected = true;
}
}
}
+11 -1
View File
@@ -189,6 +189,16 @@ GridLayout {
value: 40
}
StatusLabeledSlider {
width: 360
model: [ qsTr("XS"), qsTr("S"), qsTr("M"), qsTr("L"), qsTr("XL"), qsTr("XXL")]
}
StatusLabeledSlider {
width: 360
model: [ qsTr("50%"), qsTr("100%"), qsTr("150%"), qsTr("200%")]
}
StatusBanner {
id: banner
width: 360
@@ -198,7 +208,7 @@ GridLayout {
}
StatusProgressBar {
id: progressBar
id: progressBar
text: "Weak"
value: 0.5
fillColor : Theme.palette.pinColor1
+81 -16
View File
@@ -10,31 +10,96 @@ import StatusQ.Layout 0.1
import StatusQ.Popups 0.1
Column {
spacing: 5
spacing: 10
StatusChatToolBar {
chatInfoButton.title: "Some contact"
chatInfoButton.subTitle: "Contact"
chatInfoButton.icon.color: Theme.palette.miscColor7
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
toolbarComponent: chatInfoButton1
width: 518
Component {
id: chatInfoButton1
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Some contact"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.OneToOneChat
}
}
}
StatusChatToolBar {
chatInfoButton.title: "Some contact"
chatInfoButton.subTitle: "Contact"
chatInfoButton.icon.color: Theme.palette.miscColor7
chatInfoButton.type: StatusChatInfoButton.Type.PublicChat
chatInfoButton.pinnedMessagesCount: 1
chatInfoButton.muted: true
toolbarComponent: chatInfoButton2
width: 518
Component {
id: chatInfoButton2
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Some contact"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.PublicChat
pinnedMessagesCount: 1
muted: true
}
}
}
StatusChatToolBar {
chatInfoButton.title: "Some contact"
chatInfoButton.subTitle: "Contact"
chatInfoButton.icon.color: Theme.palette.miscColor7
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
chatInfoButton.pinnedMessagesCount: 1
notificationCount: 1
toolbarComponent: chatInfoButton3
width: 518
Component {
id: chatInfoButton3
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Some contact"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.OneToOneChat
pinnedMessagesCount: 1
}
}
}
StatusChatToolBar {
notificationCount: 1
toolbarComponent: tagSelector
width: 518
Component {
id: tagSelector
StatusTagSelector {
namesModel: ListModel {
ListElement {
publicId: "0x0"
name: "Maria"
icon: ""
isIdenticon: false
onlineStatus: 3
isReadonly: true
tagIcon: "crown"
}
ListElement {
publicId: "0x1"
name: "James"
icon: ""
isIdenticon: false
onlineStatus: 1
isReadonly: false
tagIcon: ""
}
}
toLabelText: qsTr("To: ")
warningText: qsTr("USER LIMIT REACHED")
}
}
}
Row {
+64 -11
View File
@@ -4,6 +4,7 @@ import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Utils 0.1
GridLayout {
columns: 1
@@ -25,7 +26,7 @@ GridLayout {
badge.value: 1
}
StatusNavigationListItem {
title: "Menu Item (selected)"
title: "Menu Item (selected) with very long text"
selected: true
icon.name: "info"
badge.value: 1
@@ -64,6 +65,12 @@ GridLayout {
type: StatusChatListItem.Type.CommunityChat
}
StatusChatListItem {
name: "community-channel-emoji"
type: StatusChatListItem.Type.CommunityChat
icon.emoji: "😁"
}
StatusChatListItem {
name: "community-channel-with-image"
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
@@ -322,6 +329,43 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
badge.icon.isLetterIdenticon: true
}
StatusListItem {
title: "List Item with Tags"
icon.isLetterIdenticon: true
bottomModel: 3
bottomDelegate: StatusListItemTag {
title: "tag"
icon.isLetterIdenticon: true
}
}
StatusListItem {
title: "List Item with Inline Tags"
icon.isLetterIdenticon: true
tagsModel : 2
tagsDelegate: StatusListItemTag {
color: "blue"
height: 24
radius: 6
closeButtonVisible: false
icon.emoji: "😁"
icon.emojiSize: Emoji.size.verySmall
icon.isLetterIdenticon: true
title: "helloworld.eth"
titleText.font.pixelSize: 12
titleText.color: Theme.palette.indirectColor1
}
}
StatusListItem {
title: "List Item with Emoji"
subTitle: "Emoji"
icon.emoji: "😁"
icon.color: "yellow"
icon.letterSize: 14
icon.isLetterIdenticon: true
}
StatusDescriptionListItem {
title: "Title"
subTitle: "Subtitle"
@@ -350,13 +394,13 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
StatusMemberListItem {
nickName: "This is an example"
userName: "annabelle"
chatKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
isMutualContact: true
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isVerified: true
isContact: true
image.source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
image.isIdenticon: true
isOnline: true
status: 1 // FIXME: use enum
ringSettings.ringSpecModel:
ListModel {
ListElement {colorId: 13; segmentLength: 5}
@@ -368,28 +412,37 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
ListElement {colorId: 28; segmentLength: 3}
}
ringSettings.distinctiveColors: Theme.palette.identiconRingColors
ringSettings.totalRingUnits: 25
}
StatusMemberListItem {
nickName: "carmen.eth"
isOnline: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
isUntrustworthy: true
}
StatusMemberListItem {
nickName: "very-long-annoying-nickname.eth"
isUntrustworthy: true
}
StatusMemberListItem {
nickName: "This girl I know from work"
userName: "annabelle"
isOnline: true
status: 1 // FIXME: use enum
}
StatusMemberListItem {
nickName: "Mark Cuban"
userName: "annabelle"
chatKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isMutualContact: true
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isContact: true
image.source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
image.isIdenticon: true
}
StatusMemberListItem {
nickName: "admin.guy"
isAdmin: true
isUntrustworthy: true
}
}
+49 -29
View File
@@ -4,38 +4,58 @@ import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1
GridLayout {
columns: 6
columnSpacing: 5
rowSpacing: 5
ColumnLayout {
GridLayout {
Layout.fillWidth: true
Layout.fillHeight: true
StatusLoadingIndicator {
color: Theme.palette.directColor4
columns: 6
columnSpacing: 5
rowSpacing: 5
StatusLoadingIndicator {
color: Theme.palette.directColor4
}
StatusLetterIdenticon {
name: "#status"
}
StatusRoundedImage {
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
}
StatusBadge {}
StatusBadge {
value: 1
}
StatusBadge {
value: 10
}
StatusBadge {
value: 100
}
StatusRoundIcon {
icon.name: "info"
}
}
StatusLetterIdenticon {
name: "#status"
}
Flow {
Layout.fillWidth: true
spacing: 4
StatusRoundedImage {
image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
}
StatusBadge {}
StatusBadge {
value: 1
}
StatusBadge {
value: 10
}
StatusBadge {
value: 100
}
StatusRoundIcon {
icon.name: "info"
Repeater {
model: 12
StatusLetterIdenticon {
name: "A"
color: Theme.palette.userCustomizationColors[index]
letterSize: 16
}
}
}
}
+41
View File
@@ -78,6 +78,11 @@ Column {
onClicked: editTitleModal.open()
}
StatusButton {
text: "Modal with Advanced Header/Footer"
onClicked: advancedHeaderFooterModal.open()
}
StatusModal {
id: simpleModal
anchors.centerIn: parent
@@ -353,6 +358,42 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
header.editable: true
}
StatusModal {
id: advancedHeaderFooterModal
anchors.centerIn: parent
showHeader: false
showFooter: false
showAdvancedHeader: true
showAdvancedFooter: true
height: 200
advancedHeaderComponent: Rectangle {
width: parent.width
height: 50
color: Theme.palette.baseColor1
border.width: 1
StatusBaseText {
anchors.centerIn: parent
text: "Add any header here"
font.pixelSize: 15
color: Theme.palette.directColor1
}
}
advancedFooterComponent: Rectangle {
width: parent.width
height: 50
color: Theme.palette.baseColor1
border.width: 1
StatusBaseText {
anchors.centerIn: parent
text: "Add any footer here"
font.pixelSize: 15
color: Theme.palette.directColor1
}
}
}
ListModel {
id: dummyAccountsModel
ListElement{name: "Account 1"; iconName: "filled-account"}
+40 -151
View File
@@ -1,8 +1,6 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtQml.Models 2.2
import QtGraphicalEffects 1.0
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
@@ -28,33 +26,55 @@ Page {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.leftMargin: 17
implicitHeight: 44
maxHeight: root.height
toLabelText: qsTr("To: ")
warningText: qsTr("5 USER LIMIT REACHED")
//simulate model filtering, TODO this
//makes more sense to be provided by the backend
//figure how real implementation should look like
property ListModel sortedList: ListModel { }
onTextChanged: {
sortedList.clear();
if (text !== "") {
for (var i = 0; i < contactsModel.count; i++ ) {
var entry = contactsModel.get(i);
if (entry.name.toLowerCase().includes(text.toLowerCase())) {
sortedList.insert(sortedList.count, {"publicId": entry.publicId, "name": entry.name,
"icon": entry.icon, "isIdenticon": entry.isIdenticon,
"onlineStatus": entry.onlineStatus});
userListView.model = sortedList;
warningText: qsTr("USER LIMIT REACHED")
listLabel: qsTr("Contacts")
ringSpecModelGetter: function(pubKey) {
//for simulation purposes only, in real app
//this would be Utils.getColorHashAsJson(pubKey)
var index = -1;
if (!!contactsModel) {
for (var i = 0; i < contactsModel.count; i++) {
if (contactsModel.get(i).pubKey === pubKey) {
index = i;
}
}
return contactsModel.get(index).ringSpecModel;
} else {
userListView.model = contactsModel;
return null;
}
}
compressedKeyGetter: function(pubKey) {
//for simulation purposes only, in real app
//this would be Utils.getCompressedPk(pubKey);
var possibleCharacters = pubKey.split('');
var randomStringLength = 12; // assuming you want random strings of 12 characters
var randomString = [];
for (var i=0; i<randomStringLength; ++i) {
var index = (Math.random() * possibleCharacters.length).toFixed(0);
var nextChar = possibleCharacters[index];
randomString.push(nextChar);
}
return randomString.join().toString().replace(/,/g, '');
}
colorIdForPubkeyGetter: function (pubKey) {
//for simulation purposes only, in real app
//this would be Utils.colorIdForPubkey(pubKey);
return Math.floor(Math.random() * 10);
}
onTextChanged: {
sortModel(root.contactsModel);
}
Component.onCompleted: {
textEdit.forceActiveFocus();
sortModel(root.contactsModel);
}
}
StatusButton {
implicitHeight: 44
Layout.alignment: Qt.AlignTop
enabled: (tagSelector.namesModel.count > 0)
text: "Confirm"
}
@@ -62,138 +82,7 @@ Page {
contentItem: Item {
anchors.fill: parent
anchors.topMargin: headerRow.height + 16
Item {
anchors.fill: parent
visible: (contactsModel.count > 0)
StatusBaseText {
id: contactsLabel
font.pixelSize: 15
anchors.left: parent.left
anchors.leftMargin: 8
color: Theme.palette.baseColor1
text: qsTr("Contacts")
}
Control {
width: 360
anchors {
top: contactsLabel.bottom
topMargin: 8//Style.current.padding
bottom: !statusPopupMenuBackgroundContent.visible ? parent.bottom : undefined
bottomMargin: 20//Style.current.bigPadding
}
height: 16 + (!statusPopupMenuBackgroundContent.visible ? parent.height :
(((userListView.count * 64) > parent.height) ? parent.height : (userListView.count * 64)))
x: (statusPopupMenuBackgroundContent.visible && (tagSelector.namesModel.count > 0) &&
((tagSelector.textEdit.x + 24 + statusPopupMenuBackgroundContent.width) < parent.width))
? (tagSelector.textEdit.x + 24) : 0
background: Rectangle {
id: statusPopupMenuBackgroundContent
anchors.fill: parent
visible: (tagSelector.sortedList.count > 0)
color: Theme.palette.statusPopupMenu.backgroundColor
radius: 8
layer.enabled: true
layer.effect: DropShadow {
width: statusPopupMenuBackgroundContent.width
height: statusPopupMenuBackgroundContent.height
x: statusPopupMenuBackgroundContent.x
visible: statusPopupMenuBackgroundContent.visible
source: statusPopupMenuBackgroundContent
horizontalOffset: 0
verticalOffset: 4
radius: 12
samples: 25
spread: 0.2
color: Theme.palette.dropShadow
}
}
contentItem: ListView {
id: userListView
anchors.fill: parent
anchors.topMargin: 8
anchors.bottomMargin: 8
clip: true
model: contactsModel
ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AsNeeded
}
boundsBehavior: Flickable.StopAtBounds
delegate: Item {
id: wrapper
anchors.right: parent.right
anchors.left: parent.left
height: 64
property bool hovered: false
Rectangle {
id: rectangle
anchors.fill: parent
anchors.rightMargin: 8
anchors.leftMargin: 8
radius: 8
visible: (tagSelector.sortedList.count > 0)
color: (wrapper.hovered) ? Theme.palette.baseColor2 : "transparent"
}
StatusSmartIdenticon {
id: contactImage
anchors.left: parent.left
anchors.leftMargin: 16//Style.current.padding
anchors.verticalCenter: parent.verticalCenter
name: model.name
icon: StatusIconSettings {
width: 28
height: 28
letterSize: 15
}
image: StatusImageSettings {
width: 28
height: 28
source: model.icon
isIdenticon: model.isIdenticon
}
}
StatusBaseText {
id: contactInfo
text: model.name
anchors.right: parent.right
anchors.rightMargin: 8
anchors.left: contactImage.right
anchors.leftMargin: 16
anchors.verticalCenter: parent.verticalCenter
elide: Text.ElideRight
color: Theme.palette.directColor1
font.weight: Font.Medium
font.pixelSize: 15
}
MouseArea {
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton
anchors.fill: parent
hoverEnabled: true
onEntered: {
wrapper.hovered = true;
}
onExited: {
wrapper.hovered = false;
}
onClicked: {
tagSelector.insertTag(model.name, model.publicId);
}
}
}
}
}
Component.onCompleted: {
if (visible) {
tagSelector.textEdit.forceActiveFocus();
}
}
}
anchors.topMargin: 68
StatusBaseText {
visible: (contactsModel.count === 0)
+30 -27
View File
@@ -27,21 +27,19 @@ StatusAppThreePanelLayout {
RowLayout {
id: searchInputWrapper
width: parent.width
width: 288
height: searchInput.height
anchors.top: headline.bottom
anchors.topMargin: 16
anchors.right: parent.right
anchors.rightMargin: 8
anchors.horizontalCenter: parent.horizontalCenter
StatusBaseInput {
id: searchInput
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.leftMargin: 17
Layout.alignment: Qt.AlignVCenter
implicitHeight: 36
topPadding: 8
bottomPadding: 0
bottomPadding: 8
placeholderText: "Search"
icon.name: "search"
}
@@ -61,7 +59,7 @@ StatusAppThreePanelLayout {
Column {
anchors.top: searchInputWrapper.bottom
anchors.topMargin: 16
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
spacing: 8
StatusContactRequestsIndicatorListItem {
@@ -72,8 +70,8 @@ StatusAppThreePanelLayout {
}
StatusChatList {
anchors.horizontalCenter: parent.horizontalCenter
model: Models.demoChatListItems
highlightItem: !root.createChat
onChatItemUnmuted: {
for (var i = 0; i < Models.demoChatListItems.count; i++) {
let item = Models.demoChatListItems.get(i);
@@ -128,19 +126,18 @@ StatusAppThreePanelLayout {
centerPanel: Loader {
anchors.fill: parent
sourceComponent: root.createChat ? createChatView : chatChannelView
}
Component {
id: createChatView
CreateChatView {
contactsModel: Models.dummyContactsModel
Component {
id: createChatView
CreateChatView {
contactsModel: Models.membersListModel
}
}
}
Component {
id: chatChannelView
ChatChannelView {
model: Models.chatMessagesModel
Component {
id: chatChannelView
ChatChannelView {
model: Models.chatMessagesModel
}
}
}
@@ -148,15 +145,8 @@ StatusAppThreePanelLayout {
anchors.fill: parent
StatusChatToolBar {
anchors.top: parent.top
width: parent.width
chatInfoButton.title: "Amazing Funny Squirrel"
chatInfoButton.subTitle: "Contact"
chatInfoButton.icon.color: Theme.palette.miscColor7
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
chatInfoButton.pinnedMessagesCount: 1
toolbarComponent: statusChatInfoButton
searchButton.visible: false
membersButton.visible: false
notificationCount: 1
@@ -189,6 +179,19 @@ StatusAppThreePanelLayout {
type: StatusMenuItem.Type.Danger
}
}
Component {
id: statusChatInfoButton
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Amazing Funny Squirrel"
subTitle: "Contact"
icon.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.OneToOneChat
pinnedMessagesCount: 1
}
}
}
}
}
@@ -0,0 +1,156 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import "../demoapp/data" 1.0
ScrollView {
id: root
QtObject {
id: d
property ListModel featuredCommunitiesModel: Models.featuredCommunitiesModel
property ListModel popularCommunitiesModel: Models.curatedCommunitiesModel
property ListModel tagsModel: Models.tagsModel
property string searchText: ""
property int layoutVMargin: 70
property int layoutHMargin: 64
property int titlePixelSize: 28
property int subtitlePixelSize: 17
property int stylePadding: 16
function navigateToCommunity(communityId) {
console.info("Clicked community ID: " + communityId)
}
}
contentHeight: column.height + d.layoutVMargin
contentWidth: column.width + d.layoutHMargin
clip: true
ColumnLayout {
id: column
spacing: 18
StatusBaseText {
Layout.topMargin: d.layoutVMargin
Layout.leftMargin: d.layoutHMargin
text: qsTr("Find community")
font.weight: Font.Bold
font.pixelSize: d.titlePixelSize
color: Theme.palette.directColor1
}
// Tags definition - Now hidden - Out of scope
// TODO: Replace by `StatusListItemTagRow`
Row {
visible: d.tagsModel.count > 0
Layout.leftMargin: d.layoutHMargin
Layout.rightMargin: d.layoutHMargin
width: 1234 // by design
spacing: d.stylePadding/2
Repeater {
model: d.tagsModel
delegate: StatusListItemTag {
border.color: Theme.palette.baseColor2
color: "transparent"
height: 32
radius: 36
closeButtonVisible: false
icon.emoji: model.emoji
icon.height: 32
icon.width: icon.height
icon.color: "transparent"
icon.isLetterIdenticon: true
title: model.name
titleText.font.pixelSize: 15
titleText.color: Theme.palette.primaryColor1
}
}
}
StatusBaseText {
Layout.leftMargin: d.layoutHMargin
Layout.topMargin: 20
text: qsTr("Featured")
font.weight: Font.Bold
font.pixelSize: d.subtitlePixelSize
color: Theme.palette.directColor1
}
GridLayout {
id: featuredGrid
Layout.leftMargin: d.layoutHMargin
columns: 3
columnSpacing: d.stylePadding
rowSpacing: d.stylePadding
Repeater {
model: d.featuredCommunitiesModel
delegate: StatusCommunityCard {
locale: "es"
communityId: model.communityId
loaded: model.available
logo: model.logo
name: model.name
description: model.description
members: model.members
popularity: model.popularity
communityColor: model.communityColor
categories: ListModel {
ListElement { name: "sport"; emoji: "🎾"}
ListElement { name: "food"; emoji: "🥑"}
ListElement { name: "privacy"; emoji: "👻"}
}
onClicked: { d.navigateToCommunity(communityId) }
}
}
}
StatusBaseText {
Layout.leftMargin: d.layoutHMargin
Layout.topMargin: 20
text: qsTr("Popular")
font.weight: Font.Bold
font.pixelSize: d.subtitlePixelSize
color: Theme.palette.directColor1
}
GridLayout {
Layout.leftMargin: d.layoutHMargin
columns: 3
columnSpacing: d.stylePadding
rowSpacing: d.stylePadding
Repeater {
model: d.popularCommunitiesModel
delegate: StatusCommunityCard {
locale: "es"
communityId: model.communityId
loaded: model.available
logo: model.logo
name: model.name
description: model.description
members: model.members
activeUsers: model.activeUsers
popularity: model.popularity
tokenLogo: model.tokenLogo
isPrivate: model.isPrivate
banner: model.banner
onClicked: { d.navigateToCommunity(communityId) }
}
}
}
}
}
+24 -17
View File
@@ -166,13 +166,10 @@ StatusAppThreePanelLayout {
centerPanel: Item {
StatusChatToolBar {
id: statusChatToolBar
anchors.top: parent.top
width: parent.width
chatInfoButton.title: "general"
chatInfoButton.subTitle: "Community Chat"
chatInfoButton.icon.color: Theme.palette.miscColor6
chatInfoButton.type: StatusChatInfoButton.Type.CommunityChat
width: parent.width
toolbarComponent: statusChatInfoButton
onSearchButtonClicked: {
searchButton.highlighted = !searchButton.highlighted;
searchPopup.setSearchSelection(communityDetailModalTitle,
@@ -184,6 +181,18 @@ StatusAppThreePanelLayout {
onMembersButtonClicked: {
root.showRightPanel = !root.showRightPanel;
}
Component {
id: statusChatInfoButton
StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "general"
subTitle: "Community Chat"
icon.color: Theme.palette.miscColor6
type: StatusChatInfoButton.Type.CommunityChat
}
}
}
StatusSearchPopup {
@@ -258,17 +267,15 @@ StatusAppThreePanelLayout {
model: Models.membersListModel
delegate: StatusMemberListItem {
implicitWidth: parent.width
nickName: model.nickName
userName: model.userName
chatKey: model.chatKey
trustIndicator: model.trustIndicator
isMutualContact: model.isMutualContact
image.source: model.source
image.isIdenticon: model.isIdenticon
isOnline: model.isOnline
ringSettings.ringSpecModel: model.ringSpecModel
ringSettings.distinctiveColors: Theme.palette.identiconRingColors
ringSettings.totalRingUnits: model.totalRingUnits
nickName: model.localNickname
userName: model.displayName
pubKey: model.pubKey
isVerified: model.isVerified
isUntrustworthy: model.isUntrustworthy
isContact: model.isContact
image.source: model.icon
image.isIdenticon: false
status: model.onlineStatus
}
}
}
+546 -123
View File
@@ -4,65 +4,15 @@ import StatusQ.Components 0.1
QtObject {
property ListModel dummyContactsModel: ListModel {
ListElement {
publicId: "0x0"
name: "Maria"
icon: ""
isIdenticon: false
onlineStatus: 3
}
ListElement {
publicId: "0x1"
name: "James"
icon: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
isIdenticon: false
onlineStatus: 1
}
ListElement {
publicId: "0x2"
name: "Paul"
icon: ""
isIdenticon: false
onlineStatus: 2
}
ListElement {
publicId: "0x3"
name: "Tracy"
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
isIdenticon: true
onlineStatus: 3
}
ListElement {
publicId: "0x4"
name: "Nick"
icon: ""
isIdenticon: false
onlineStatus: 3
}
ListElement {
publicId: "0x5"
name: "Steven"
icon: ""
isIdenticon: false
onlineStatus: 2
}
ListElement {
publicId: "0x6"
name: "Helen"
icon: ""
isIdenticon: false
onlineStatus: 3
}
}
property var demoChatListItems: ListModel {
id: demoChatListItems
ListElement {
itemId: "x012340000"
name: "#status"
icon: ""
emoji: ""
isIdenticon: false
colorHash: []
color: "blue"
description: ""
type: StatusChatListItem.Type.PublicChat
@@ -78,7 +28,9 @@ QtObject {
itemId: "x012340001"
name: "status-desktop"
icon: ""
emoji: ""
isIdenticon: false
colorHash: []
color: "red"
description: ""
type: StatusChatListItem.Type.PublicChat
@@ -95,7 +47,9 @@ QtObject {
name: "Amazing Funny Squirrel"
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0Bh
CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
emoji: ""
isIdenticon: true
colorHash: []
color: "green"
description: ""
type: StatusChatListItem.Type.OneToOneChat
@@ -111,7 +65,9 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
itemId: "x012340003"
name: "Black Ops"
icon: ""
emoji: ""
isIdenticon: false
colorHash: []
color: "purple"
description: ""
type: StatusChatListItem.Type.OneToOneChat
@@ -127,7 +83,9 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
itemId: "x012340004"
name: "Spectacular Growing Otter"
icon: ""
emoji: ""
isIdenticon: false
colorHash: []
color: "orange"
description: ""
type: StatusChatListItem.Type.OneToOneChat
@@ -143,7 +101,9 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
itemId: "x012340005"
name: "channel-with-a-super-duper-long-name"
icon: ""
emoji: ""
isIdenticon: false
colorHash: []
color: "green"
description: ""
type: StatusChatListItem.Type.PublicChat
@@ -397,7 +357,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: ""
iconName: "chat"
iconColor: ""
isIdenticon: false
subItems: [
ListElement {
value: "sub_item_1_1"
@@ -405,7 +364,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
iconName: ""
iconColor: ""
isIdenticon: false
},
ListElement {
value: "sub_item_1_2"
@@ -413,7 +371,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
iconName: ""
iconColor: ""
isIdenticon: true
}]}
ListElement {
value: "item_2"
@@ -421,7 +378,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
iconName: ""
iconColor: ""
isIdenticon: false
subItems: [
ListElement {
value: "sub_item_2_1"
@@ -429,7 +385,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: ""
iconName: "channel"
iconColor: ""
isIdenticon: false
},
ListElement {
value: "sub_item_2_2"
@@ -437,7 +392,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: ""
iconName: "channel"
iconColor: ""
isIdenticon: false
},
ListElement {
value: "sub_item_2_3"
@@ -445,7 +399,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: ""
iconName: "channel"
iconColor: ""
isIdenticon: false
}]}
ListElement {
value: "item_3"
@@ -453,7 +406,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: "";
iconName: "info"
iconColor: ""
isIdenticon: false
subItems: [
ListElement {
value: "sub_item_3_1"
@@ -461,7 +413,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: ""
iconName: "channel"
iconColor: ""
isIdenticon: false
}]}
ListElement {
value: "item_4"
@@ -469,7 +420,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: "";
iconName: ""
iconColor: "red"
isIdenticon: false
subItems: [
ListElement {
value: "sub_item_4_1"
@@ -477,7 +427,6 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
imageSource: ""
iconName: "channel"
iconColor: ""
isIdenticon: false
}]}
}
@@ -894,72 +843,50 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
property var membersListModel: ListModel {
id: membersList
ListElement {
nickName: "This is an example"
userName: "annabelle"
chatKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
isMutualContact: true
isOnline: true
source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
localNickname: "This is an example"
displayName: "Maria"
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isVerified: true
isUntrustworthy: false
isContact: true
onlineStatus: 1
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
isIdenticon: true
totalRingUnits: 25
ringSpecModel: [ ListElement {colorId: 13; segmentLength: 5},
ListElement {colorId: 31; segmentLength: 5},
ListElement {colorId: 10; segmentLength: 1},
ListElement {colorId: 2; segmentLength: 5},
ListElement {colorId: 26; segmentLength: 2},
ListElement {colorId: 19; segmentLength: 4},
ListElement {colorId: 28; segmentLength: 3} ]
isAdmin: false
}
ListElement {
nickName: "carmen.eth"
userName: ""
chatKey: ""
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
isMutualContact: false
isOnline: false
source: ""
isIdenticon: false
localNickname: ""
displayName: "carmen.eth"
pubKey: "0x043a7ed78362567894688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isVerified: false
isUntrustworthy: true
isContact: false
onlineStatus: 0
icon: ""
isAdmin: false
}
ListElement {
nickName: "This girl I know from work"
userName: "annabelle"
chatKey: ""
trustIndicator: StatusContactVerificationIcons.TrustedType.None
isMutualContact: false
isOnline: true
source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDK
localNickname: "This girl I know from work"
displayName: "annabelle"
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486dsfkjghyu2cf04"
isVerified: false
isUntrustworthy: false
isContact: false
onlineStatus: 1
isAdmin: false
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDK
ExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg=="
isIdenticon: true
totalRingUnits: 25
ringSpecModel: [ ListElement {colorId: 11; segmentLength: 1},
ListElement {colorId: 23; segmentLength: 5},
ListElement {colorId: 23; segmentLength: 5},
ListElement {colorId: 10; segmentLength: 4},
ListElement {colorId: 15; segmentLength: 3},
ListElement {colorId: 26; segmentLength: 2},
ListElement {colorId: 29; segmentLength: 5} ]
}
ListElement {
nickName: "Mark Cuban"
userName: "annabelle"
chatKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
isMutualContact: true
isOnline: false
source: ""
isIdenticon: false
totalRingUnits: 25
ringSpecModel: [ ListElement {colorId: 0; segmentLength: 1},
ListElement {colorId: 28; segmentLength: 1},
ListElement {colorId: 31; segmentLength: 1},
ListElement {colorId: 22; segmentLength: 4},
ListElement {colorId: 28; segmentLength: 3},
ListElement {colorId: 27; segmentLength: 5},
ListElement {colorId: 7; segmentLength: 5},
ListElement {colorId: 13; segmentLength: 1},
ListElement {colorId: 25; segmentLength: 4}]
localNickname: "Mark Cuban"
displayName: "mark.eth"
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc79872cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isVerified: false
isUntrustworthy: true
isContact: true
onlineStatus: 0
icon: ""
isAdmin: false
}
}
@@ -1022,8 +949,19 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
notificationsCount: 0
}
ListElement {
sectionId: "wallet"
sectionId: "communitiesPortal"
sectionType: 2
name: "Communities Portal"
active: false
image: ""
icon: "communities"
color: ""
hasNotification: false
notificationsCount: 0
}
ListElement {
sectionId: "wallet"
sectionType: 3
name: "Wallet"
active: false
image: ""
@@ -1034,7 +972,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
}
ListElement {
sectionId: "browser"
sectionType: 3
sectionType: 4
name: "Browser"
active: false
image: ""
@@ -1055,4 +993,489 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
notificationsCount: 0
}
}
property ListModel currencyPickerModel: ListModel {
ListElement {
key: 0
name: "United States Dollar"
shortName: "USD"
symbol: "$"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
category: ""
selected: false
}
ListElement {
key: 1
name: "British Pound"
shortName: "GBP"
symbol: "£"
imageSource: "../../assets/twemoji/26x26/1f4b5.png"
category: ""
selected: false
}
ListElement {
key: 2
name: "Euro"
shortName: "EUR"
symbol: "€"
imageSource: "../../assets/twemoji/26x26/1f4b6.png"
category: ""
selected: true
}
ListElement {
key: 3
name: "Shout Korean Won"
shortName: "KRW"
symbol: "₩"
imageSource: "../../assets/twemoji/26x26/1f4b8.png"
category: ""
selected: false
}
ListElement {
key: 4
name: "Ethereum"
shortName: "ETH"
symbol: "Ξ"
imageSource: "../../assets/twemoji/26x26/1f4b7.png"
category: "Tokens"
selected: true
}
ListElement {
key: 5
name: "Bitcoin"
shortName: "BTC"
symbol: "฿"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
category: "Tokens"
selected: false
}
ListElement {
key: 6
name: "Status Network Token"
shortName: "SNT"
symbol: ""
imageSource: "../../assets/twemoji/26x26/1f4b8.png"
category: "Tokens"
selected: false
}
ListElement {
key: 7
name: "Emirati Dirham"
shortName: "AED"
symbol: "د.إ"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
category: "Other Fiat"
selected: false
}
ListElement {
key: 8
name: "Afghani"
shortName: "AFN"
symbol: "؋"
imageSource: "../../assets/twemoji/26x26/1f4b7.png"
category: "Other Fiat"
selected: false
}
ListElement {
key: 9
name: "Argentine Peso"
shortName: "AFN"
symbol: "$"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
category: "Other Fiat"
selected: false
}
}
property ListModel currencyPickerModel2: ListModel {
ListElement {
key: 0
name: "United States Dollar"
shortName: "USD"
symbol: "$"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
category: ""
selected: false
}
ListElement {
key: 1
name: "British Pound"
shortName: "GBP"
symbol: "£"
imageSource: "../../assets/twemoji/26x26/1f4b5.png"
category: ""
selected: false
}
ListElement {
key: 2
name: "Euro"
shortName: "EUR"
symbol: "€"
imageSource: "../../assets/twemoji/26x26/1f4b6.png"
category: ""
selected: true
}
ListElement {
key: 3
name: "Shout Korean Won"
shortName: "KRW"
symbol: "₩"
imageSource: "../../assets/twemoji/26x26/1f4b8.png"
category: ""
selected: false
}
ListElement {
key: 4
name: "Ethereum"
shortName: "ETH"
symbol: "Ξ"
imageSource: "../../assets/twemoji/26x26/1f4b7.png"
category: "Tokens"
selected: true
}
ListElement {
key: 5
name: "Bitcoin"
shortName: "BTC"
symbol: "฿"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
category: "Tokens"
selected: false
}
ListElement {
key: 6
name: "Status Network Token"
shortName: "SNT"
symbol: ""
imageSource: "../../assets/twemoji/26x26/1f4b8.png"
category: "Tokens"
selected: false
}
ListElement {
key: 7
name: "Emirati Dirham"
shortName: "AED"
symbol: "د.إ"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
category: "Other Fiat"
selected: false
}
ListElement {
key: 8
name: "Afghani"
shortName: "AFN"
symbol: "؋"
imageSource: "../../assets/twemoji/26x26/1f4b7.png"
category: "Other Fiat"
selected: false
}
ListElement {
key: 9
name: "Argentine Peso"
shortName: "AFN"
symbol: "$"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
category: "Other Fiat"
selected: false
}
}
property ListModel languagePickerModel: ListModel {
ListElement {
key: 0
name: "English"
shortName: "English"
imageSource: "../../assets/twemoji/26x26/1f1ec-1f1e7.png"
category: ""
selected: false
}
ListElement {
key: 1
name: "Korean"
shortName: "한국어"
imageSource: "../../assets/twemoji/26x26/1f1f0-1f1f7.png"
category: ""
selected: false
}
ListElement {
key: 2
name: "Portuguese (Brazilian)"
shortName: "Português"
imageSource: "../../assets/twemoji/26x26/1f1e7-1f1f7.png"
category: ""
selected: true
}
ListElement {
key: 3
name: "Dutch"
shortName: "Nederlands"
imageSource: "../../assets/twemoji/26x26/1f1f3-1f1f1.png"
category: "Beta Languages"
selected: false
}
ListElement {
key: 4
name: "Indonesian"
shortName: "Bahasa Indonesia"
imageSource: "../../assets/twemoji/26x26/1f1ee-1f1e9.png"
category: "Beta Languages"
selected: false
}
ListElement {
key: 5
name: "Spanish"
shortName: "Español"
imageSource: "../../assets/twemoji/26x26/1f1ea-1f1e6.png"
category: "Beta Languages"
selected: false
}
}
property ListModel languageNoImagePickerModel: ListModel {
ListElement {
key: 0
name: "Chinese (Mainland China)"
shortName: "普通话"
category: ""
selected: true
}
ListElement {
key: 1
name: "Russian"
shortName: "Русский Язык"
category: ""
selected: false
}
ListElement {
key: 2
name: "Arabic"
shortName: "اَلْعَرَبِيَّةُ"
category: "Beta Languages"
selected: true
}
ListElement {
key: 3
name: "Chinese (Taiwan)"
shortName: "臺灣華語"
category: "Beta Languages"
selected: false
}
ListElement {
key: 4
name: "Filipino"
shortName: "Wikang Filipino"
category: "Beta Languages"
selected: false
}
ListElement {
key: 5
name: "French"
shortName: "Français"
category: "Beta Languages"
selected: false
}
ListElement {
key: 6
name: "Italian"
shortName: "Italiano"
category: "Beta Languages"
selected: false
}
ListElement {
key: 7
name: "Turkish"
shortName: "Türkçe"
category: "Beta Languages"
selected: false
}
ListElement {
key: 8
name: "Urdu"
shortName: "اُردُو"
category: "Beta Languages"
selected: false
}
}
property ListModel featuredCommunitiesModel : ListModel {
ListElement {
name: "CryptoKitties";
description: "A community of cat lovers, meow!";
logo:"qrc:/images/CryptoKitties.png";
members: 1045;
categories: [];
communityId: "341";
available: true;
popularity: 1;
communityColor: "pink"
}
ListElement {
name: "Friends with Benefits";
description: "A group chat full of out favorite thinkers and creators.";
logo:"qrc:/images/FriendsBenefits.png";
members: 452;
categories: [];
communityId: "232";
available: true;
popularity: 2;
communityColor: "grey"
}
ListElement {
name: "Status Hi!!";
description: "A new community description with long long long and repetitive repetitive repetitive repetitive explanation!!";
logo:"qrc:/images/SNT.png";
members: 89;
categories: [];
communityId: "223";
available: true;
popularity: 3
communityColor: "blue"
}
}
property ListModel curatedCommunitiesModel : ListModel {
ListElement {
name: "Status.im";
description: "Your portal to Web3. Secure wallet. dApp browser. Private messaging. All-in-one.";
logo: "qrc:/images/SNT.png";
banner: "qrc:/images/CommunityBanner1.png";
members: 299500;
activeUsers: 71400;
categories: [];
communityId: "1";
available: true;
popularity: 1
isPrivate: true
tokenLogo: "qrc:/images/SNT.png";
}
ListElement {
name: "SuperRare";
description: "The future of CryptoArt markets—a network governed by artists, collectors and curators.";
logo:"qrc:/images/SR.png";
banner: "qrc:/images/SuperRareCommunityBanner.png";
members: 299500;
activeUsers: 71400;
categories: [];
communityId: "2";
available: true;
popularity: 2
isPrivate: true
tokenLogo: "qrc:/images/SRToken.png";
}
ListElement {
name: "Coinbase";
description: "Jump start your crypto portfolio with the easiest place to buy and sell crypto. ";
logo:"qrc:/images/Coinbase.png";
banner: "qrc:/images/CoinBaseCommunityBanner.png";
members: 4900000;
activeUsers: 245600;
categories: [];
communityId: "3";
available: true;
popularity: 3
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "Rarible";
description: "Multichain community-centric NFT marketplace. Create, sell and collect NFTs.";
logo:"qrc:/images/Rarible.png";
banner: "qrc:/images/RaribleCommunityBanner.png";
members: 629200;
activeUsers: 112100;
categories: [];
communityId: "4";
available: true;
popularity: 4
isPrivate: true
tokenLogo: "qrc:/images/RARI.png";
}
ListElement {
name: "Spotify";
description: "Listening is everything";
logo:"qrc:/images/Spotify.png";
banner: "qrc:/images/SpotifyCommunityBanner.png";
members: 207500;
activeUsers: 52200;
categories: [];
communityId: "5";
available: true;
popularity: 5
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "Dribbble";
description: "Open source platform to write and distribute decentralized applications..";
logo:"qrc:/images/Fluff.png";
banner: "qrc:/images/DribbbleCommunityBanner.png";
members: 2300000;
activeUsers: 112100;
categories: [];
communityId: "6";
available: true;
popularity: 6
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "Status.im";
description: "Your portal to Web3. Secure wallet. dApp browser. Private messaging. All-in-one.";
logo:"qrc:/images/SNT.png";
banner: ""
members: 299500;
activeUsers: 71400;
categories: [];
communityId: "7";
available: true;
popularity: 1
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "CryptoPunks";
description: "Community description goes here. Community description goes here. Community description goes here. Community description goes here. Community description goes here. Community description goes here.";
logo:"qrc:/images/CryptoPunks.png";
banner: "";
members: 4900;
activeUsers: 245600;
categories: [];
communityId: "8";
available: false;
popularity: 8
isPrivate: false
tokenLogo: "";
}
ListElement {
name: "Socks";
description: "Community description goes here.";
logo:"qrc:/images/Socks.png";
banner: "";
members: 4900;
activeUsers: 245600;
categories: [];
communityId: "9";
available: false;
popularity: 9
isPrivate: false
tokenLogo: "";
}
}
property ListModel tagsModel : ListModel {
ListElement { name: "gaming"; emoji: "🎮"}
ListElement { name: "art"; emoji: "🖼️"}
ListElement { name: "crypto"; emoji: "💸"}
ListElement { name: "nsfw"; emoji: "🍆"}
ListElement { name: "markets"; emoji: "💎"}
ListElement { name: "defi"; emoji: "📈"}
ListElement { name: "travel"; emoji: "🚁"}
ListElement { name: "web3"; emoji: "🗺"}
ListElement { name: "sport"; emoji: "🎾"}
ListElement { name: "food"; emoji: "🥑"}
ListElement { name: "enviroment"; emoji: "☠️"}
ListElement { name: "privacy"; emoji: "👻"}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

+5
View File
@@ -11,6 +11,11 @@ int main(int argc, char *argv[])
#endif
SandboxApp app(argc, argv);
app.setOrganizationName("Status");
app.setOrganizationDomain("status.im");
app.setApplicationName("Sandbox");
app.startEngine();
return app.exec();
+81 -31
View File
@@ -2,6 +2,8 @@ import QtQuick 2.14
import QtQuick.Window 2.14
import QtQuick.Controls 2.14
import QtGraphicalEffects 1.13
import QtQuick.Layouts 1.14
import Qt.labs.settings 1.0
import Sandbox 0.1
@@ -31,10 +33,7 @@ StatusWindow {
property real factor: 1.0
Component.onCompleted: {
Theme.palette = lightTheme
rootWindow.updatePosition();
}
Component.onCompleted: rootWindow.updatePosition()
QtObject {
id: appSectionType
@@ -110,12 +109,10 @@ StatusWindow {
anchors.topMargin: 32
anchors.right: parent.right
anchors.rightMargin: 32
onCheckedChanged: {
if (Theme.palette === rootWindow.lightTheme) {
Theme.palette = rootWindow.darkTheme
} else {
Theme.palette = rootWindow.lightTheme
}
lightThemeEnabled: storeSettings.lightTheme
onLightThemeEnabledChanged: {
Theme.palette = lightThemeEnabled ? rootWindow.darkTheme : rootWindow.lightTheme
storeSettings.lightTheme = lightThemeEnabled
}
}
}
@@ -126,11 +123,13 @@ StatusWindow {
StatusAppTwoPanelLayout {
id: mainPageView
function page(name) {
function page(name, fillPage) {
storeSettings.fillPage = fillPage ? true : false
viewLoader.source = Qt.resolvedUrl("./pages/" + name + "Page.qml");
}
function control(name) {
viewLoader.source = Qt.resolvedUrl("./controls/" + name + ".qml");
storeSettings.fillPage = false
}
leftPanel: Item {
@@ -150,76 +149,81 @@ StatusWindow {
spacing: 0
StatusListSectionHeadline { text: "StatusQ.Core" }
StatusNavigationListItem {
StatusNavigationListItem {
title: "Icons"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusListSectionHeadline { text: "StatusQ.Layout" }
StatusNavigationListItem {
StatusNavigationListItem {
title: "Layouts"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title.substring(0, title.length - 1));
}
StatusListSectionHeadline { text: "StatusQ.Controls" }
StatusNavigationListItem {
StatusNavigationListItem {
title: "Buttons"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusSwitchTab"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page("StatusTabSwitch");
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusChatCommandButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "Controls"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
}
StatusNavigationListItem {
title: "StatusTabBarButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusTabBarIconButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusInput"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusSelect"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusAccountSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusAssetSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusColorSelector"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusWalletColorButton"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusWalletColorSelect"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
@@ -235,22 +239,22 @@ StatusWindow {
onClicked: mainPageView.page(title);
}
StatusListSectionHeadline { text: "StatusQ.Components" }
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusAddress"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "List Items"
selected: viewLoader.source.toString().includes(title.replace(/\s+/g, ''))
onClicked: mainPageView.control(title.replace(/\s+/g, ''));
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusChatInfoToolBar"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
StatusNavigationListItem {
title: "Others"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.control(title);
@@ -275,8 +279,18 @@ StatusWindow {
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusListPicker"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusCommunityCard"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusListSectionHeadline { text: "StatusQ.Popup" }
StatusNavigationListItem {
StatusNavigationListItem {
title: "StatusPopupMenu"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
@@ -293,6 +307,21 @@ StatusWindow {
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusColorSelectorGrid"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title);
}
StatusNavigationListItem {
title: "StatusImageCropPanel"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title, true);
}
StatusNavigationListItem {
title: "StatusColorSpace"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title, true);
}
}
}
}
@@ -300,8 +329,11 @@ StatusWindow {
rightPanel: Item {
id: rightPanel
anchors.fill: parent
ScrollView {
visible: !storeSettings.fillPage
anchors.fill: parent
anchors.topMargin: 64
contentHeight: (pageWrapper.height + pageWrapper.anchors.topMargin) * rootWindow.factor
contentWidth: (pageWrapper.width * rootWindow.factor)
clip: true
@@ -310,14 +342,16 @@ StatusWindow {
id: pageWrapper
width: rightPanel.width
anchors.top: parent.top
anchors.topMargin: 64
height: Math.max(rootWindow.height, viewLoader.height + 128)
scale: rootWindow.factor
Loader {
id: viewLoader
active: !storeSettings.fillPage
anchors.centerIn: parent
source: mainPageView.control("Icons")
source: storeSettings.selected.length === 0 ? mainPageView.control("Icons") : storeSettings.selected
onSourceChanged: {
storeSettings.selected = viewLoader.source
if (source.toString().includes("Icons")) {
item.iconColor = Theme.palette.primaryColor1;
}
@@ -325,6 +359,15 @@ StatusWindow {
}
}
}
Loader {
active: storeSettings.fillPage
anchors.fill: parent
anchors.topMargin: 64
visible: storeSettings.fillPage
clip: true
source: viewLoader.source
}
}
}
}
@@ -442,4 +485,11 @@ StatusWindow {
rootWindow.toggleFullScreen()
}
}
Settings {
id: storeSettings
property string selected: ""
property bool lightTheme: true
property bool fillPage: false
}
}
@@ -0,0 +1,36 @@
import QtQuick 2.14
import StatusQ.Core 0.1
import StatusQ.Controls 0.1
import StatusQ.Core.Theme 0.1
Item {
id: root
width: 800
height: 100
Row {
id: selectedColor
anchors.top: parent.top
anchors.left: colorSelectionGrid.left
spacing: 10
StatusBaseText {
text: "SelectedColor is"
}
Rectangle {
width: 100
height: 20
radius: width/2
color: colorSelectionGrid.selectedColor
}
}
StatusColorSelectorGrid {
id: colorSelectionGrid
anchors.top: selectedColor.bottom
anchors.topMargin: 10
anchors.horizontalCenter: parent.horizontalCenter
titleText: "COLOR"
selectedColorIndex: 2
}
}
+110
View File
@@ -0,0 +1,110 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import Sandbox 0.1
Item {
ColumnLayout {
anchors.centerIn: parent
StatusBaseText {
text: qsTr("Thickness")
}
StatusSlider {
id: thicknessSlider
from: colorSpace.width / 8
to: colorSpace.width / 16
value: colorSpace.width / 10
Layout.fillWidth: true
}
StatusBaseText {
text: qsTr("Min saturate: ") + colorSpace.minSaturate.toFixed(2)
}
StatusSlider {
id: minSatSlider
from: 0
to: 0.5
value: 0
Layout.fillWidth: true
}
StatusBaseText {
text: qsTr("Max saturate: ") + colorSpace.maxSaturate.toFixed(2)
}
StatusSlider {
id: maxSatSlider
from: 0.51
to: 1.0
value: 1.0
Layout.fillWidth: true
}
StatusBaseText {
text: qsTr("Min value: ") + colorSpace.minValue.toFixed(2)
}
StatusSlider {
id: minValSlider
from: 0
to: 0.5
value: 0
Layout.fillWidth: true
}
StatusBaseText {
text: qsTr("Max value: ") + colorSpace.maxValue.toFixed(2)
}
StatusSlider {
id: maxValSlider
from: 0.51
to: 1.0
value: 1.0
Layout.fillWidth: true
}
StatusColorSpace {
id: colorSpace
color: "#ed77eb"
thickness: thicknessSlider.value
minSaturate: minSatSlider.value
maxSaturate: maxSatSlider.value
minValue: minValSlider.value
maxValue: maxValSlider.value
}
StatusBaseText {
text: qsTr("Color") + ": " + colorSpace.color
}
Rectangle {
color: colorSpace.color
implicitHeight: 48
radius: 10
Layout.fillWidth: true
StatusBaseText {
anchors.centerIn: parent
color: Theme.palette.white
font.pixelSize: 15
text: "Quick brown fox jumps over the lazy dog"
}
}
StatusButton {
text: "Randomize"
onPressed: colorSpace.color = Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
}
}
}
+47
View File
@@ -0,0 +1,47 @@
import QtQuick 2.0
import QtQuick.Layouts 1.13
import StatusQ.Components 0.1
import "../demoapp/data" 1.0
GridLayout {
QtObject {
id: d
function navigateToCommunity(communityID) {
console.log("Clicked community: " + communityID)
}
}
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
columns: 2
columnSpacing: 28
rowSpacing: 28
Repeater {
model: Models.curatedCommunitiesModel
delegate: StatusCommunityCard {
locale: "en"
communityId: model.communityId
loaded: model.available
logo: model.logo
banner: model.banner
name: model.name
description: model.description
members: model.members
activeUsers: model.activeUsers
popularity: model.popularity
isPrivate: model.isPrivate
tokenLogo: model.tokenLogo
categories: ListModel {
ListElement { name: "Crypto"; emoji: "🔗"}
ListElement { name: "Privacy"; emoji: "👻"}
ListElement { name: "Social"; emoji: "☕"}
}
onClicked: { d.navigateToCommunity(communityId) }
}
}
}
@@ -0,0 +1,94 @@
import QtQuick 2.14
import QtQuick.Layouts 1.14
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import QtGraphicalEffects 1.14
Item {
id: root
implicitWidth: mainLayout.implicitWidth
implicitHeight: mainLayout.implicitHeight
property var testControls: [ctrl1, ctrl2, ctrl3]
property bool globalStylePreferRound: true
ColumnLayout {
id: mainLayout
anchors.fill: parent
RowLayout {
ColumnLayout {
Text {
text: `AR: ${ctrl1.aspectRatio.toFixed(2)}`
}
StatusImageCropPanel {
id: ctrl1
Layout.fillWidth: true
Layout.fillHeight: true
source: "qrc:/demoapp/data/logo-test-image.png"
windowStyle: globalStylePreferRound ? StatusImageCrop.WindowStyle.Rounded : StatusImageCrop.WindowStyle.Rectangular
}
Text {
text: `AR: ${ctrl2.aspectRatio.toFixed(2)}`
}
StatusImageCropPanel {
id: ctrl2
Layout.fillWidth: true
Layout.fillHeight: true
source: "qrc:/demoapp/data/logo-test-image.png"
windowStyle: globalStylePreferRound ? StatusImageCrop.WindowStyle.Rectangular : StatusImageCrop.WindowStyle.Rounded
aspectRatio: 16/9
enableCheckers: true
}
}
ColumnLayout {
Text {
text: `AR: ${ctrl3.aspectRatio.toFixed(2)}`
}
StatusImageCropPanel {
id: ctrl3
Layout.fillWidth: true
Layout.fillHeight: true
source: "qrc:/demoapp/data/logo-test-image.png"
windowStyle: globalStylePreferRound ? StatusImageCrop.WindowStyle.Rounded : StatusImageCrop.WindowStyle.Rectangular
aspectRatio: 0.8
}
}
}
Shortcut {
sequence: StandardKey.ZoomIn
onActivated: {
for(let i in testControls) {
const c = testControls[i]
c.setCropRect(ctrl1.inflateRectBy(c.cropRect, -0.05))
}
}
}
Shortcut {
sequence: StandardKey.ZoomOut
onActivated: {
for(let i in testControls) {
const c = testControls[i]
c.setCropRect(ctrl1.inflateRectBy(c.cropRect, 0.05))
}
}
}
Shortcut {
sequences: ["Ctrl+W"]
onActivated: globalStylePreferRound = !globalStylePreferRound
}
}
}
+84 -2
View File
@@ -57,11 +57,38 @@ Column {
input.clearable: true
}
Item {
implicitWidth: 480
implicitHeight: 82
z: 100000
StatusSeedPhraseInput {
id: statusSeedInput
anchors.left: parent.left
anchors.right: parent.right
height: parent.height
textEdit.input.anchors.leftMargin: 16
textEdit.input.anchors.rightMargin: 16
textEdit.input.anchors.topMargin: 11
textEdit.label: "Input with drop down selection list"
leftComponentText: "1"
inputList: ListModel {
ListElement {
seedWord: "panda"
}
ListElement {
seedWord: "posible"
}
ListElement {
seedWord: "wing"
}
}
}
}
StatusInput {
label: "Label"
charLimit: 30
errorMessage: "Error message"
input.clearable: true
input.valid: false
input.placeholderText: "Placeholder"
@@ -102,10 +129,24 @@ Column {
]
}
StatusInput {
label: "Input with <i>StatusRegularExpressionValidator</i>"
charLimit: 30
input.placeholderText: `Must match regex(${validators[0].regularExpression.toString()}) and <= 30 chars`
validationMode: StatusInput.ValidationMode.IgnoreInvalidInput
validators: [
StatusRegularExpressionValidator {
regularExpression: /^[0-9A-Za-z_\$-\s]*$/
errorMessage: "Bad input!"
}
]
}
StatusInput {
label: "Label"
input.placeholderText: "Input width component (right side)"
input.component: StatusIcon {
input.rightComponent: StatusIcon {
icon: "cancel"
height: 16
color: Theme.palette.dangerColor1
@@ -130,4 +171,45 @@ Column {
input.minimumHeight: 80
input.maximumHeight: 200
}
StatusInput {
property bool toggled: true
label: "Input with emoji icon"
input.placeholderText: "Enter Name"
input.icon.emoji: toggled ? "😁" : "🧸"
input.icon.color: "blue"
input.isIconSelectable: true
onIconClicked: {
toggled = !toggled
}
}
StatusInput {
property bool toggled: true
label: "Input with selectable icon which is not an emoji"
input.placeholderText: "Enter Name"
input.icon.emoji: ""
input.icon.name: toggled ? "filled-account" : "image"
input.icon.color: "blue"
input.isIconSelectable: true
onIconClicked: {
toggled = !toggled
}
}
StatusInput {
label: "Input with inline token selector"
input.leftComponent: StatusTokenInlineSelector {
tokens: [{amount: 0.1, token: "ETH"},
{amount: 10, token: "SNT"},
{amount: 15, token: "MANA"}]
StatusToolTip {
id: toolTip
text: "posted"
}
onTriggered: toolTip.visible = true
}
input.edit.readOnly: true
}
}
+81
View File
@@ -0,0 +1,81 @@
import QtQuick 2.0
import QtQuick.Layouts 1.14
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Core 0.1
import "../demoapp/data" 1.0
GridLayout {
id: root
columns: 1
rowSpacing: 150
GridLayout {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
rows: 4
columns: 2
rowSpacing: 170
columnSpacing: 150
z: 100
StatusListPicker {
id: languagePicker
z: 100
inputList: Models.languagePickerModel
placeholderSearchText: qsTr("Search Languages")
menuAlignment: StatusListPicker.MenuAlignment.Left
}
StatusListPicker {
id: languagePicker2
z: 100
inputList: Models.languageNoImagePickerModel
placeholderSearchText: qsTr("Search Languages")
menuAlignment: StatusListPicker.MenuAlignment.Center
}
StatusListPicker {
id: currencyPicker
inputList: Models.currencyPickerModel
placeholderSearchText: qsTr("Search Currencies")
multiSelection: true
}
StatusListPicker {
id: currencyPicker2
inputList: Models.currencyPickerModel2
placeholderSearchText: qsTr("Search Currencies")
multiSelection: true
printSymbol: true
enableSelectableItem: false
}
}
StatusBaseText {
id: pageDesc
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
height: 100
width: 500
text: "4 different configurations for the `StatusListPicker` component:\n
* Single selection. \n
* Single selection but dynamically changed to multiple selection (model provides multiple selected items).\n
* Multiple selection.\n
* Multiple selection and displayed name is the symbol + shortName\n"
color: Theme.palette.baseColor1
font.pixelSize: 15
}
// Outsite area
MouseArea {
height: root.height
width: root.width
onClicked: {
languagePicker.close()
languagePicker2.close()
currencyPicker.close()
currencyPicker2.close()
}
}
}
+27
View File
@@ -0,0 +1,27 @@
import QtQuick 2.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import Sandbox 0.1
Column {
spacing: 8
StatusTabBar {
StatusTabButton {
width: implicitWidth
text: "Button 1"
}
StatusTabButton {
width: implicitWidth
text: "Button 2"
}
StatusTabButton {
width: implicitWidth
text: "Button 3"
badge.value: 42
}
}
}
+14 -4
View File
@@ -9,17 +9,21 @@ Item {
property ListModel asortedContacts: ListModel {
ListElement {
publicId: "0x0"
name: "Maria"
name: "emily.eth"
icon: ""
isIdenticon: false
onlineStatus: 3
isReadonly: false
tagIcon: ""
}
ListElement {
publicId: "0x1"
name: "James"
name: "vitalikbuterin"
icon: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
isIdenticon: false
onlineStatus: 1
isReadonly: false
tagIcon: ""
}
ListElement {
publicId: "0x2"
@@ -27,13 +31,17 @@ Item {
icon: ""
isIdenticon: false
onlineStatus: 2
isReadonly: false
tagIcon: ""
}
ListElement {
publicId: "0x3"
name: "Tracy"
name: "carmen.eth"
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
isIdenticon: true
onlineStatus: 3
isReadonly: true
tagIcon: "crown"
}
ListElement {
publicId: "0x4"
@@ -41,6 +49,8 @@ Item {
icon: ""
isIdenticon: false
onlineStatus: 3
isReadonly: false
tagIcon: ""
}
}
@@ -51,6 +61,6 @@ Item {
anchors.centerIn: parent
namesModel: root.asortedContacts
toLabelText: qsTr("To: ")
warningText: qsTr("5 USER LIMIT REACHED")
warningText: qsTr("USER LIMIT REACHED")
}
}
+8 -7
View File
@@ -15,10 +15,11 @@ Item {
width: parent.width
height: childrenRect.height
model: [
{"title":"anna.eth wants to verify your identity", "subTitle":"Provide the code in the letter I sent to you on February 1st.", "icon":"contact", "loading":false, "type":0,"url":""},
{"title":"Verification Request Sent", "subTitle":"", "icon":"checkmark-circle", "loading":false, "type":1,"url":""},
{"title":"Collectible is being minted...", "subTitle":"View on Etherscan", "icon":"", "loading":true, "type":0,"url":"http://google.com"},
{"title":"Contact request sent", "subTitle":"", "icon":"checkmark-circle", "loading":false, "type":1,"url":""}
{"title":"anna.eth wants to verify your identity", "subTitle":"Provide the code in the letter I sent to you on February 1st.", "icon":"contact", "loading":false, "type":0,"url":"", "duration":0},
{"title":"Verification Request Sent", "subTitle":"", "icon":"checkmark-circle", "loading":false, "type":1,"url":"", "duration":4000},
{"title":"Collectible is being minted...", "subTitle":"View on Etherscan", "icon":"", "loading":true, "type":0,"url":"http://google.com", "duration":0},
{"title":"Contact request sent", "subTitle":"", "icon":"checkmark-circle", "loading":false, "type":1,"url":"", "duration":4000},
{"title":"Test User", "subTitle":"Hello message...", "icon":"", "loading":false, "type":0,"url":"", "duration":4000}
]
delegate: StatusToastMessage {
primaryText: modelData.title
@@ -27,12 +28,12 @@ Item {
loading: modelData.loading
type: modelData.type
linkUrl: modelData.url
duration: modelData.duration
onLinkActivated: {
Qt.openUrlExternally(link);
}
//simulate open
Component.onCompleted: {
open = true;
onClose: {
console.warn("toast closed: ", modelData.title)
}
}
}
@@ -12,6 +12,6 @@ Column {
spacing: 8
StatusWalletColorSelect {
model: Theme.palette.accountColors
model: Theme.palette.userCustomizationColors
}
}
+39 -2
View File
@@ -16,7 +16,7 @@
<file>pages/StatusTabSwitchPage.qml</file>
<file>pages/StatusWalletColorButtonPage.qml</file>
<file>pages/StatusWalletColorSelectPage.qml</file>
<file>pages/StatusPasswordStrengthIndicatorPage.qml</file>
<file>pages/StatusPasswordStrengthIndicatorPage.qml</file>
<file>controls/Buttons.qml</file>
<file>controls/Controls.qml</file>
<file>controls/Icons.qml</file>
@@ -24,6 +24,8 @@
<file>controls/ListItems.qml</file>
<file>controls/Others.qml</file>
<file>controls/Popups.qml</file>
<file>demoapp/ChatChannelView.qml</file>
<file>demoapp/CreateChatView.qml</file>
<file>demoapp/DemoCommunityDetailModal.qml</file>
<file>demoapp/DemoContactRequestsModal.qml</file>
<file>demoapp/StatusAppChatView.qml</file>
@@ -31,5 +33,40 @@
<file>demoapp/StatusAppProfileSettingsView.qml</file>
<file>demoapp/data/Models.qml</file>
<file>demoapp/data/qmldir</file>
<file>demoapp/data/logo-test-image.png</file>
<file>DemoApp.qml</file>
<file>ThemeSwitch.qml</file>
<file>pages/StatusColorSelectorGridPage.qml</file>
<file>pages/StatusListPickerPage.qml</file>
<file>pages/StatusPinInputPage.qml</file>
<file>pages/StatusTagSelectorPage.qml</file>
<file>pages/StatusToastMessagePage.qml</file>
<file>pages/StatusWizardStepperPage.qml</file>
<file>pages/StatusTabBarButtonPage.qml</file>
<file>pages/StatusColorSpacePage.qml</file>
<file>images/CryptoKitties.png</file>
<file>images/CryptoPunks.png</file>
<file>images/Dragonerum.png</file>
<file>images/FriendsBenefits.png</file>
<file>images/logo-test-image.png</file>
<file>images/P2PCrypto.png</file>
<file>images/SNT.png</file>
<file>images/Socks.png</file>
<file>images/StatusPunks.png</file>
<file>images/CommunityBanner1.png</file>
<file>images/Coinbase.png</file>
<file>images/CoinBaseCommunityBanner.png</file>
<file>images/DribbbleCommunityBanner.png</file>
<file>images/Ethereum.png</file>
<file>images/EthereumCommunityBanner.png</file>
<file>images/Fluff.png</file>
<file>images/Rarible.png</file>
<file>images/RaribleCommunityBanner.png</file>
<file>images/Spotify.png</file>
<file>images/SpotifyCommunityBanner.png</file>
<file>images/SR.png</file>
<file>images/SuperRareCommunityBanner.png</file>
<file>images/RARI.png</file>
<file>images/SRToken.png</file>
</qresource>
</RCC>
</RCC>
+9 -3
View File
@@ -1,4 +1,10 @@
make clean
qmake sandbox.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 && /usr/bin/make qmake_all
make
#!/bin/bash
make clean
if [[ $OSTYPE == 'darwin'* ]]
then
qmake sandbox.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 && /usr/bin/make qmake_all
else
qmake sandbox.pro CONFIG+=debug CONFIG+=x86_64 && /usr/bin/make qmake_all
fi
make
+1 -1
View File
@@ -32,7 +32,7 @@ Rectangle {
anchors.centerIn: parent
text: {
if (statusBadge.value > 99) {
return "99+";
return qsTr("99+");
}
return statusBadge.value;
}
@@ -27,7 +27,6 @@ Item {
id: statusChatInfoButton
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
anchors.right: (implicitWidth > parent.width - 50) ? statusMenuButton.left : undefined
anchors.rightMargin: 5
type: StatusChatInfoButton.Type.OneToOneChat
@@ -37,7 +36,6 @@ Item {
StatusRoundButton {
id: statusMenuButton
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
visible: popupMenuSlot.active
@@ -104,5 +102,4 @@ Item {
}
}
}
}
+10 -6
View File
@@ -15,8 +15,9 @@ Column {
width: 288
property string categoryId: ""
property var model: []
property var model: null
property bool draggableItems: false
property bool highlightItem: true
property alias statusChatListItems: statusChatListItems
@@ -90,8 +91,8 @@ Column {
}
StatusChatListItem {
id: statusChatListItem
opacity: dragSensor.active ? 0.0 : 1.0
originalOrder: model.position
chatId: model.itemId
@@ -101,11 +102,14 @@ Column {
muted: model.muted
hasUnreadMessages: model.hasUnreadMessages
notificationsCount: model.notificationsCount
highlightWhenCreated: model.highlight
selected: model.active
icon.color: model.color
image.isIdenticon: model.isIdenticon
highlightWhenCreated: !!model.highlight
selected: (model.active && statusChatList.highlightItem)
icon.emoji: model.emoji
icon.color: !!model.color ? model.color : Theme.palette.userCustomizationColors[model.colorId]
image.isIdenticon: false
image.source: model.icon
ringSettings.ringSpecModel: model.colorHash
sensor.cursorShape: dragSensor.cursorShape
onClicked: {
@@ -14,10 +14,10 @@ Item {
implicitWidth: chatListsAndCategories.width
property StatusTooltipSettings categoryAddButtonToolTip: StatusTooltipSettings {
text: "Add channel inside category"
text: qsTr("Add channel inside category")
}
property StatusTooltipSettings categoryMenuButtonToolTip: StatusTooltipSettings {
text: "More"
text: qsTr("More")
}
property var model: []
@@ -68,7 +68,6 @@ Item {
StatusChatList {
id: statusChatList
anchors.horizontalCenter: parent.horizontalCenter
visible: statusChatList.model.count > 0
onChatItemSelected: statusChatListAndCategories.chatItemSelected(categoryId, id)
onChatItemUnmuted: statusChatListAndCategories.chatItemUnmuted(id)
@@ -48,7 +48,6 @@ Column {
popupMenuSlot.item.popup(mouse.x + 4, mouse.y + 6);
return
}
statusChatListCategory.opened = !opened;
}
}
onTitleClicked: statusChatListCategory.opened = !opened
@@ -39,21 +39,21 @@ StatusListItem {
id: addButton
icon.name: "add"
icon.width: 20
visible: statusChatListCategoryItem.showAddButton &&
visible: statusChatListCategoryItem.showAddButton &&
(statusChatListCategoryItem.highlighted ||
statusChatListCategoryItem.sensor.containsMouse)
onClicked: statusChatListCategoryItem.addButtonClicked(mouse)
tooltip.text: "Add channel inside category"
tooltip.text: qsTr("Add channel inside category")
},
StatusChatListCategoryItemButton {
id: menuButton
icon.name: "more"
icon.width: 21
visible: statusChatListCategoryItem.showMenuButton &&
visible: statusChatListCategoryItem.showMenuButton &&
(statusChatListCategoryItem.highlighted ||
statusChatListCategoryItem.sensor.containsMouse)
onClicked: statusChatListCategoryItem.menuButtonClicked(mouse)
tooltip.text: "More"
tooltip.text: qsTr("More")
},
StatusChatListCategoryItemButton {
id: toggleButton
+36 -33
View File
@@ -5,11 +5,12 @@ import QtGraphicalEffects 1.13
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Core.Utils 0.1
import StatusQ.Components 0.1
import StatusQ.Controls 0.1
Rectangle {
id: statusChatListItem
id: root
objectName: "chatItem"
property int originalOrder: -1
@@ -28,8 +29,10 @@ Rectangle {
width: 24
height: 24
color: Theme.palette.miscColor5
letterSize: 15
emoji: ""
charactersLen: root.type === StatusChatListItem.Type.OneToOneChat ? 2 : 1
}
property alias ringSettings: identicon.ringSettings
property int type: StatusChatListItem.Type.PublicChat
property bool highlighted: false
property bool highlightWhenCreated: false
@@ -75,16 +78,16 @@ Rectangle {
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: statusChatListItem.clicked(mouse)
onClicked: root.clicked(mouse)
StatusSmartIdenticon {
id: identicon
anchors.left: parent.left
anchors.leftMargin: 8
anchors.verticalCenter: parent.verticalCenter
image: statusChatListItem.image
icon: statusChatListItem.icon
name: statusChatListItem.name
image: root.image
icon: root.icon
name: root.name
}
StatusIcon {
@@ -94,21 +97,21 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
width: 14
visible: statusChatListItem.type !== StatusChatListItem.Type.OneToOneChat
visible: root.type !== StatusChatListItem.Type.OneToOneChat
opacity: {
if (statusChatListItem.muted && !hoverHander.hovered && !statusChatListItem.highlighted) {
if (root.muted && !hoverHander.hovered && !root.highlighted) {
return 0.4
}
return statusChatListItem.hasUnreadMessages ||
statusChatListItem.notificationsCount > 0 ||
statusChatListItem.selected ||
statusChatListItem.highlighted ||
return root.hasUnreadMessages ||
root.notificationsCount > 0 ||
root.selected ||
root.highlighted ||
statusBadge.visible ||
hoverHander.hovered ? 1.0 : 0.7
}
icon: {
switch (statusChatListItem.type) {
switch (root.type) {
case StatusChatListItem.Type.PublicCat:
return Theme.palette.name == "light" ? "tiny/public-chat" : "tiny/public-chat-white"
break;
@@ -133,27 +136,27 @@ Rectangle {
anchors.rightMargin: 6
anchors.verticalCenter: parent.verticalCenter
text: (statusChatListItem.type === StatusChatListItem.Type.PublicChat &&
!statusChatListItem.name.startsWith("#") ?
"#" + statusChatListItem.name :
statusChatListItem.name)
text: (root.type === StatusChatListItem.Type.PublicChat &&
!root.name.startsWith("#") ?
"#" + root.name :
root.name)
elide: Text.ElideRight
color: {
if (statusChatListItem.muted && !hoverHander.hovered && !statusChatListItem.highlighted) {
if (root.muted && !hoverHander.hovered && !root.highlighted) {
return Theme.palette.directColor5
}
return statusChatListItem.hasUnreadMessages ||
statusChatListItem.notificationsCount > 0 ||
statusChatListItem.selected ||
statusChatListItem.highlighted ||
statusChatListItem.highlightWhenCreated ||
return root.hasUnreadMessages ||
root.notificationsCount > 0 ||
root.selected ||
root.highlighted ||
root.highlightWhenCreated ||
hoverHander.hovered ||
statusBadge.visible ? Theme.palette.directColor1 : Theme.palette.directColor4
}
font.weight: !statusChatListItem.muted &&
(statusChatListItem.hasUnreadMessages ||
statusChatListItem.notificationsCount > 0 ||
statusChatListItem.highlightWhenCreated ||
font.weight: !root.muted &&
(root.hasUnreadMessages ||
root.notificationsCount > 0 ||
root.highlightWhenCreated ||
statusBadge.visible) ? Font.Bold : Font.Medium
font.pixelSize: 15
}
@@ -166,18 +169,18 @@ Rectangle {
width: 14
opacity: mutedIconSensor.containsMouse ? 1.0 : 0.2
icon: Theme.palette.name === "light" ? "tiny/muted" : "tiny/muted-white"
visible: statusChatListItem.muted
visible: root.muted
MouseArea {
id: mutedIconSensor
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: statusChatListItem.unmute()
onClicked: root.unmute()
}
StatusToolTip {
text: "Unmute"
text: qsTr("Unmute")
visible: mutedIconSensor.containsMouse
}
}
@@ -189,11 +192,11 @@ Rectangle {
anchors.right: parent.right
anchors.rightMargin: 8
color: statusChatListItem.muted ? Theme.palette.primaryColor2 : Theme.palette.primaryColor1
color: root.muted ? Theme.palette.primaryColor2 : Theme.palette.primaryColor1
border.width: 4
border.color: color
value: statusChatListItem.notificationsCount
visible: statusChatListItem.notificationsCount > 0
value: root.notificationsCount
visible: root.notificationsCount > 0
}
}
}
+130 -126
View File
@@ -1,24 +1,22 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.13
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
Rectangle {
Item {
id: statusChatToolBar
implicitWidth: 518
height: 56
color: Theme.palette.statusAppLayout.backgroundColor
property alias chatInfoButton: statusChatInfoButton
property alias menuButton: menuButton
property alias notificationButton: notificationButton
property alias membersButton: membersButton
property alias searchButton: searchButton
property int notificationCount: 0
property int padding: 8
property int notificationCount: 0
property Component popupMenu
property var toolbarComponent
signal chatInfoButtonClicked()
signal menuButtonClicked()
@@ -26,150 +24,156 @@ Rectangle {
signal membersButtonClicked()
signal searchButtonClicked()
implicitWidth: 518
implicitHeight: 60
onPopupMenuChanged: {
if (!!popupMenu) {
popupMenuSlot.sourceComponent = popupMenu
}
}
StatusChatInfoButton {
id: statusChatInfoButton
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 12
width: Math.min(implicitWidth, parent.width - actionButtons.implicitWidth - anchors.leftMargin * 2)
onClicked: statusChatToolBar.chatInfoButtonClicked()
}
RowLayout {
width: parent.width
spacing: padding / 2
Row {
id: actionButtons
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
spacing: 8
StatusFlatRoundButton {
id: searchButton
width: 32
height: 32
icon.name: "search"
type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.searchButtonClicked()
// initializing the tooltip
tooltip.text: "Search"
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
Loader {
id: loader
sourceComponent: statusChatToolBar.toolbarComponent
Layout.fillWidth: true
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
Layout.topMargin: padding
Layout.leftMargin: padding
}
StatusFlatRoundButton {
id: membersButton
width: 32
height: 32
icon.name: "group-chat"
type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.membersButtonClicked()
RowLayout {
id: actionButtons
Layout.alignment: Qt.AlignTop | Qt.AlignRight
Layout.topMargin: padding
Layout.rightMargin: padding
spacing: 8
// initializing the tooltip
tooltip.text: "Members"
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
}
StatusFlatRoundButton {
id: searchButton
width: 32
height: 32
icon.name: "search"
type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.searchButtonClicked()
StatusFlatRoundButton {
id: menuButton
width: 32
height: 32
icon.name: "more"
type: StatusFlatRoundButton.Type.Secondary
visible: !!statusChatToolBar.popupMenu
// initializing the tooltip
tooltip.visible: !!tooltip.text && menuButton.hovered && !popupMenuSlot.item.opened
tooltip.text: "More"
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
property bool showMoreMenu: false
onClicked: {
menuButton.highlighted = true
let originalOpenHandler = popupMenuSlot.item.openHandler
let originalCloseHandler = popupMenuSlot.item.closeHandler
popupMenuSlot.item.openHandler = function () {
if (!!originalOpenHandler) {
originalOpenHandler()
}
}
popupMenuSlot.item.closeHandler = function () {
menuButton.highlighted = false
if (!!originalCloseHandler) {
originalCloseHandler()
}
}
popupMenuSlot.item.openHandler = originalOpenHandler
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
statusChatToolBar.menuButtonClicked()
// initializing the tooltip
tooltip.text: qsTr("Search")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
}
Loader {
id: popupMenuSlot
active: !!statusChatToolBar.popupMenu
StatusFlatRoundButton {
id: membersButton
width: 32
height: 32
icon.name: "group-chat"
type: StatusFlatRoundButton.Type.Secondary
onClicked: statusChatToolBar.membersButtonClicked()
// initializing the tooltip
tooltip.text: qsTr("Members")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
}
}
Rectangle {
height: 24
width: 1
color: Theme.palette.directColor7
anchors.verticalCenter: parent.verticalCenter
visible: notificationButton.visible &&
(menuButton.visible || membersButton.visible || searchButton.visible)
}
StatusFlatRoundButton {
id: menuButton
width: 32
height: 32
icon.name: "more"
type: StatusFlatRoundButton.Type.Secondary
visible: !!statusChatToolBar.popupMenu
StatusFlatRoundButton {
id: notificationButton
width: 32
height: 32
// initializing the tooltip
tooltip.visible: !!tooltip.text && menuButton.hovered && !popupMenuSlot.item.opened
tooltip.text: qsTr("More")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
icon.name: "notification"
icon.height: 21
type: StatusFlatRoundButton.Type.Secondary
property bool showMoreMenu: false
onClicked: {
menuButton.highlighted = true
// initializing the tooltip
tooltip.text: "Activity"
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
let originalOpenHandler = popupMenuSlot.item.openHandler
let originalCloseHandler = popupMenuSlot.item.closeHandler
onClicked: statusChatToolBar.notificationButtonClicked()
StatusBadge {
id: statusBadge
visible: value > 0
anchors.top: parent.top
anchors.left: parent.right
anchors.topMargin: -3
anchors.leftMargin: {
if (statusBadge.value > 99) {
return -22
popupMenuSlot.item.openHandler = function () {
if (!!originalOpenHandler) {
originalOpenHandler()
}
}
if (statusBadge.value > 9) {
return -21
popupMenuSlot.item.closeHandler = function () {
menuButton.highlighted = false
if (!!originalCloseHandler) {
originalCloseHandler()
}
}
return -18
popupMenuSlot.item.openHandler = originalOpenHandler
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
statusChatToolBar.menuButtonClicked()
}
value: statusChatToolBar.notificationCount
border.width: 2
border.color: parent.hovered ? Theme.palette.baseColor2 : Theme.palette.statusAppLayout.backgroundColor
Loader {
id: popupMenuSlot
active: !!statusChatToolBar.popupMenu
}
}
Rectangle {
height: 24
width: 1
color: Theme.palette.directColor7
Layout.alignment: Qt.AlignVCenter
visible: notificationButton.visible &&
(menuButton.visible || membersButton.visible || searchButton.visible)
}
StatusFlatRoundButton {
id: notificationButton
width: 32
height: 32
icon.name: "notification"
icon.height: 21
type: StatusFlatRoundButton.Type.Secondary
// initializing the tooltip
tooltip.text: qsTr("Activity")
tooltip.orientation: StatusToolTip.Orientation.Bottom
tooltip.y: parent.height + 12
onClicked: statusChatToolBar.notificationButtonClicked()
StatusBadge {
id: statusBadge
visible: value > 0
anchors.top: parent.top
anchors.left: parent.right
anchors.topMargin: -3
anchors.leftMargin: {
if (statusBadge.value > 99) {
return -22
}
if (statusBadge.value > 9) {
return -21
}
return -18
}
value: statusChatToolBar.notificationCount
border.width: 2
border.color: parent.hovered ? Theme.palette.baseColor2 : Theme.palette.statusAppLayout.backgroundColor
}
}
}
}
}
+201
View File
@@ -0,0 +1,201 @@
import QtQuick 2.14
import QtGraphicalEffects 1.0
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
Item {
id: root
property int thickness: width * 0.1
property real minSaturate: 0.0
property real minValue: 0.0
property real maxSaturate: 1.0
property real maxValue: 1.0
property color color: "red"
property color rootColor: Qt.hsva(color.hsvHue, 1, 1, 1)
function pickColorFromHueGauge(x, y) {
// Get angle of picked color
let theta = Math.atan2(y - hueGauge.height / 2, x - hueGauge.width / 2) * 0.5 / Math.PI;
if (theta < 0.0)
theta += 1.0;
// Convert angle value to color
return Qt.hsva(1 - theta, 1, 1, 1)
}
function pickColorFromSatValRect(x, y) {
// x for saturation, reversed y for value
let sat = mapFromRange(Math.min(Math.max(x, 0), satValRect.width),
minSaturate, maxSaturate, satValRect.width);
let val = 1 - mapFromRange(Math.min(Math.max(y, 0), satValRect.height),
1 - maxValue, 1 - minValue, satValRect.height);
return Qt.hsva(rootColor.hsvHue, sat, val, 1);
}
function angleOnHueGauge(pickingColor) {
// color hue to angle
return (1 - pickingColor.hsvHue) * 2 * Math.PI;
}
// TODO: mapToRange & mapFromRange to helper js
function mapToRange(value, minValue, maxValue, range) {
return (value - minValue) / (maxValue - minValue) * range;
}
function mapFromRange(pos, minValue, maxValue, range) {
return pos / range * (maxValue - minValue) + minValue;
}
onColorChanged: {
// update root color if only we are not picking on satValRect
if (!d.pickingSatVal)
rootColor = Qt.hsva(color.hsvHue, 1, 1, 1)
}
implicitWidth: 340
implicitHeight: 340
QtObject {
id: d
property bool pickingSatVal: false
}
ConicalGradient {
id: hueGauge
anchors.fill: parent
angle: 90.0
gradient: Gradient {
GradientStop { position: 0.000; color: Qt.hsva(1.000, 1, 1, 1) }
GradientStop { position: 0.167; color: Qt.hsva(0.833, 1, 1, 1) }
GradientStop { position: 0.333; color: Qt.hsva(0.666, 1, 1, 1) }
GradientStop { position: 0.500; color: Qt.hsva(0.500, 1, 1, 1) }
GradientStop { position: 0.667; color: Qt.hsva(0.333, 1, 1, 1) }
GradientStop { position: 0.833; color: Qt.hsva(0.166, 1, 1, 1) }
GradientStop { position: 1.000; color: Qt.hsva(0.000, 1, 1, 1) }
}
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Item {
width: root.width
height: root.height
Rectangle {
anchors.fill: parent
radius: Math.min(width, height) / 2
}
}
}
MouseArea {
id: hueArea
property bool pressedOnGauge: false
anchors.fill: parent
preventStealing: true
onPressed: {
// Check we clicked on gauge
let dist = Math.sqrt(Math.pow(width / 2 - mouseX, 2) +
Math.pow(height / 2 - mouseY, 2));
let radius = Math.min(width, height) / 2;
if (dist < radius - thickness || dist > radius)
return;
pressedOnGauge = true;
pickRootColor();
}
onReleased: pressedOnGauge = false
onPositionChanged: if (pressedOnGauge) pickRootColor()
function pickRootColor() {
// Update both colors
rootColor = pickColorFromHueGauge(mouseX, mouseY);
color.hsvHue = rootColor.hsvHue;
color.hsvSaturation = Math.min(maxSaturate, Math.max(minSaturate, color.hsvSaturation));
color.hsvValue = Math.min(maxValue, Math.max(minValue, color.hsvValue));
}
}
}
Rectangle {
anchors.fill: parent
anchors.margins: root.thickness
radius: Math.min(width, height) / 2
color: Theme.palette.baseColor5
Rectangle {
id: satValRect
anchors.centerIn: parent
width: parent.width * 0.55
height: width
border.color: Theme.palette.baseColor3
gradient: Gradient {
orientation: Gradient.Horizontal
GradientStop { position: -minSaturate; color: "white" }
GradientStop { position: 2.0 - maxSaturate; color: rootColor }
}
Rectangle {
anchors.fill: parent
gradient: Gradient {
orientation: Gradient.Vertical
GradientStop { position: maxValue - 1; color: "transparent" }
GradientStop { position: 1.0 + minValue; color: "black" }
}
}
MouseArea {
id: satValArea
anchors.fill: parent
preventStealing: true
onPressed: {
d.pickingSatVal = true;
pickColor();
}
onReleased: d.pickingSatVal = false
onPositionChanged: pickColor()
function pickColor() {
root.color = pickColorFromSatValRect(mouseX, mouseY);
}
}
Rectangle {
id: satValLens
x: mapToRange(root.color.hsvSaturation, minSaturate, maxSaturate,
satValRect.width) - radius
y: mapToRange(1 - root.color.hsvValue, 1 - maxValue, 1 - minValue,
satValRect.height) - radius
width: thickness * 1.3
height: width
radius: height / 2
border.width: 2
border.color: Theme.palette.baseColor3
color: root.color
visible: x + 1 >= -radius && x - 1 <= satValRect.width - radius &&
y + 1 >= -radius && y - 1 <= satValRect.height - radius
}
}
}
Rectangle {
id: hueLens
property real theta: angleOnHueGauge(rootColor);
property real dist: (hueGauge.width - width) / 2 + thickness / 6;
anchors.centerIn: parent
anchors.horizontalCenterOffset: dist * Math.cos(theta);
anchors.verticalCenterOffset: dist * Math.sin(theta);
width: thickness * 1.3
height: width
radius: height / 2
border.width: 2
border.color: Theme.palette.baseColor3
color: rootColor
}
}
@@ -0,0 +1,469 @@
import QtQuick 2.13
import QtQuick.Layouts 1.14
import QtGraphicalEffects 1.0
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
/*!
\qmltype StatusCommunityCard
\inherits Rectangle
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief It is a community card item that provides relevant information about a community model. Inherits \l{https://doc.qt.io/qt-5/qml-qtquick-rectangle.html}{Rectangle}.
The \c StatusCommunityCard is a community card clickable item that represents a data model. The data model is commonly a JavaScript array or a ListModel object.
Example of how the component looks like:
\image status_community_card.png
Example of how to use it:
\qml
StatusCommunityCard {
locale: "en"
communityId: model.communityId
loaded: model.available
logo: model.icon
name: model.name
description: model.description
members: model.members
popularity: model.popularity
categories: model.categories
onClicked: { d.navigateToCommunity(communityId) }
}
\endqml
For a list of components available see StatusQ.
*/
Rectangle {
id: root
/*!
\qmlproperty string StatusCommunityCard::communityId
This property holds the community identifier value.
*/
property string communityId: ""
/*!
\qmlproperty bool StatusCommunityCard::loaded
This property holds a boolean value that represents if the community information is loaded or not.
*/
property bool loaded: true
/*!
\qmlproperty url StatusCommunityCard::logo
This property holds the community logo source.
*/
property url logo: ""
/*!
\qmlproperty string StatusCommunityCard::name
This property holds the community name.
*/
property string name: ""
/*!
\qmlproperty string StatusCommunityCard::description
This property holds the community description.
*/
property string description: ""
/*!
\qmlproperty int StatusCommunityCard::members
This property holds the community members value.
*/
property int members: 0
/*!
\qmlproperty int StatusCommunityCard::activeUsers
This property holds the community active users value.
*/
property int activeUsers: 0
/*!
\qmlproperty int StatusCommunityCard::popularity
This property holds the community popularity (community rate).
*/
property int popularity: 0
/*!
\qmlproperty string StatusCommunityCard::categories
This property holds the data that will be populated as the tags row of the community.
Here an example of the model roles expected:
\qml
categories: ListModel {
ListElement { name: "gaming"; emoji: "🎮"; selected: false}
ListElement { name: "art"; emoji: "🖼️"; selected: false}
ListElement { name: "crypto"; emoji: "💸"; selected: false}
ListElement { name: "nsfw"; emoji: "🍆"; selected: false}
ListElement { name: "markets"; emoji: "💎"; selected: false}
}
\endqml
*/
property ListModel categories: ListModel {}
/*!
\qmlproperty string StatusCommunityCard::locale
This property holds the application locale used to give format to members number representation.
If not provided, default value is "en".
*/
property string locale: "en"
/*!
\qmlproperty url StatusCommunityCard::banner
This property holds the community banner image url.
*/
property url banner: ""
/*!
\qmlproperty color StatusCommunityCard::communityColor
This property holds the community color.
If not provided, default value in Light Theme is "#4360DF" and in Dark Theme is "#88B0FF".
*/
property color communityColor: Theme.palette.primaryColor1
/*!
\qmlproperty bool StatusCommunityCard::isPrivate
This property holds if the community is private.
If not provided, default value is false.
*/
property bool isPrivate: false
/*!
\qmlproperty url StatusCommunityCard::tokenLogo
This property holds the image of the token needed if the community is private.
*/
property url tokenLogo: ""
/*!
\qmlsignal StatusCommunityCard::clicked(string communityId)
This signal is emitted when the card item is clicked.
*/
signal clicked(string communityId)
QtObject {
id: d
property int cardWidth: 335
property int bannerHeigth: 64
property int cardHeigth: 190
property int totalHeigth: 230
property int margins: 12
property int bannerRadius: 20
property int cardRadius: 16
property color cardColor: Theme.palette.indirectColor1
property color fontColor: Theme.palette.directColor1
property color loadingColor1: Theme.palette.baseColor5
property color loadingColor2: Theme.palette.baseColor4
function numberFormat(number) {
var res = number
const million = 1000000
const ks = 1000
if(number > million) {
res = number / million
res = Number(number / million).toLocaleString(Qt.locale(root.locale), 'f', 1) + 'M'
}
else if(number > ks) {
res = number / ks
res = Number(number / ks).toLocaleString(Qt.locale(root.locale), 'f', 1) + 'K'
}
else
res = Number(number).toLocaleString(Qt.locale(root.locale), 'f', 0)
return res
}
}
width: d.cardWidth
height: d.totalHeigth
radius: d.bannerRadius
color: "transparent"
layer.enabled: true
layer.effect: DropShadow {
source: root
horizontalOffset: 0
verticalOffset: 2
radius: sensor.containsMouse ? 30 : d.bannerRadius
samples: 25
spread: 0
color: sensor.containsMouse ? Theme.palette.backdropColor : Theme.palette.dropShadow
}
// Community banner:
Item {
id: banner
anchors.top: parent.top
width: d.cardWidth
height: d.bannerHeigth
Rectangle {
id: mask
anchors.fill: parent
radius: d.bannerRadius
color: root.loaded ? root.communityColor : d.loadingColor2
}
Image {
id: image
source: root.banner
anchors.fill: parent
anchors.centerIn: parent
fillMode: Image.PreserveAspectFit
smooth: true
visible: !root.loaded || !root.banner
}
OpacityMask {
anchors.fill: image
source: image
maskSource: mask
}
}
// Community logo:
Rectangle {
z: content.z + 1
anchors.top: parent.top
anchors.topMargin: 16
anchors.left: parent.left
anchors.leftMargin: 12
width: 48
height: width
radius: width / 2
color: root.loaded ? d.cardColor : d.loadingColor1
StatusRoundedImage {
visible: root.loaded
anchors.centerIn: parent
width: parent.width - 4
height: width
image.source: root.logo
color: "transparent"
}
} // End of community logo
// Content card
Rectangle {
id: content
z: banner.z + 1
visible: root.loaded
anchors.top: parent.top
anchors.topMargin: 40
width: d.cardWidth
height: d.cardHeigth
color: d.cardColor
radius: d.cardRadius
clip: true
// Community restriccions
Rectangle {
visible: root.isPrivate
anchors.top: parent.top
anchors.topMargin: 8
anchors.right: parent.right
anchors.rightMargin: anchors.topMargin
width: 48
height: 24
color: d.loadingColor2
radius: 200
StatusIcon {
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 6
anchors.left: parent.left
icon: "tiny/unlocked"
width: 16
height: 16
color: Theme.palette.baseColor1
}
StatusRoundedImage {
anchors.rightMargin: 2
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
width: 20
height: width
image.source: root.tokenLogo
color: "transparent"
}
}
// Community info
ColumnLayout {
anchors.fill: parent
anchors.topMargin: 32
anchors.leftMargin: d.margins
anchors.rightMargin: d.margins
anchors.bottomMargin: d.margins
clip: true
spacing: 6
StatusBaseText {
Layout.alignment: Qt.AlignVCenter
text: root.name
font.weight: Font.Bold
font.pixelSize: 19
color: d.fontColor
}
StatusBaseText {
Layout.fillWidth: true
Layout.fillHeight: true
text: root.description
font.pixelSize: 15
lineHeight: 1.2
color: d.fontColor
maximumLineCount: 2
wrapMode: Text.WordWrap
elide: Text.ElideRight
clip: true
}
}
ColumnLayout {
anchors.fill: parent
anchors.topMargin: 116
anchors.leftMargin: d.margins
anchors.rightMargin: d.margins
anchors.bottomMargin: d.margins
clip: true
spacing: 18
Row {
Layout.alignment: Qt.AlignVCenter
spacing: 20
// Members
Row {
height: membersTxt.height
spacing: 4
StatusIcon {
anchors.verticalCenter: parent.verticalCenter
icon: "tiny/members"
width: 16
height: 16
}
StatusBaseText {
id: membersTxt
Layout.alignment: Qt.AlignVCenter
text: d.numberFormat(root.members)
font.pixelSize: 15
color: d.fontColor
}
}
// Active users:
Row {
height: activeUsersTxt.height
spacing: 4
StatusIcon {
anchors.verticalCenter: parent.verticalCenter
icon: "tiny/flash"
width: 14
height: 14
}
StatusBaseText {
id: activeUsersTxt
Layout.alignment: Qt.AlignVCenter
text: d.numberFormat(root.activeUsers)
font.pixelSize: 15
color: d.fontColor
}
}
}
// TODO: Replace by `StatusListItemTagRow` - To be done!
Row {
visible: root.categories.count > 0
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
spacing: 8
clip: true
Repeater {
model: root.categories
delegate: StatusListItemTag {
border.color: Theme.palette.baseColor2
color: "transparent"
height: 24
radius: 20
closeButtonVisible: false
icon.emoji: model.emoji
icon.height: 24
icon.width: icon.height
icon.color: "transparent"
icon.isLetterIdenticon: true
title: model.name
titleText.font.pixelSize: 13
titleText.color: d.fontColor
}
}
}
}
} // End of content card
// Loading card
Rectangle {
visible: !root.loaded
anchors.top: parent.top
anchors.topMargin: 40
width: d.cardWidth
height: d.cardHeigth
color: d.cardColor
radius: d.cardRadius
clip: true
Rectangle {
anchors.top: parent.top
anchors.topMargin: 8
anchors.right: parent.right
anchors.rightMargin: anchors.topMargin
width: 48
height: 24
color: d.loadingColor2
radius: 200
}
ColumnLayout {
anchors.fill: parent
anchors.topMargin: 32
anchors.margins: d.margins
clip: true
spacing: 9
Rectangle {
width: 84
height: 16
color: d.loadingColor1
radius: 5
}
Rectangle {
width: 311
height: 16
color: d.loadingColor1
radius: 5
}
Rectangle {
width: 271
height: 16
color: d.loadingColor1
radius: 5
}
Row {
Layout.topMargin: 22 - 9
spacing: 16
Repeater {
model: 2
delegate: Row {
spacing: 4
Rectangle {
width: 14
height: 14
color: d.loadingColor1
radius: width / 2
}
Rectangle {
width: 50
height: 12
color: d.loadingColor2
radius: 5
}
}
}
}
Row {
Layout.topMargin: 21 - 9
spacing: 8
Repeater {
model: 3
delegate:
Rectangle {
width: 76
height: 24
color: d.loadingColor2
radius: 20
}
}
}
}
} // End of loading card
MouseArea {
id: sensor
enabled: root.loaded
anchors.fill: parent
cursorShape: root.loaded ? Qt.PointingHandCursor : Qt.ArrowCursor
hoverEnabled: true
onClicked: root.clicked(root.communityId)
}
}
@@ -14,6 +14,7 @@ StatusListItem {
components: [
StatusBadge {
visible: statusContactRequestsListItem.requestsCount > 0
value: statusContactRequestsListItem.requestsCount
anchors.verticalCenter: parent.verticalCenter
border.width: 4
+19
View File
@@ -0,0 +1,19 @@
import QtQuick 2.13
import StatusQ.Core 0.1
Image {
id: root
property string emojiId: ""
width: 14
height: 14
sourceSize.width: width
sourceSize.height: height
fillMode: Image.PreserveAspectFit
mipmap: true
antialiasing: true
source: emojiId ? `../../assets/twemoji/svg/${emojiId}.svg` : ""
}
@@ -12,6 +12,7 @@ Rectangle {
property alias additionalText: additionalText.text
property alias button: button
property alias expandableComponent: expandableRegion.sourceComponent
property alias expandableItem: expandableRegion.item
property int type: StatusExpandableItem.Type.Primary
property bool expandable: true
@@ -185,7 +186,7 @@ Rectangle {
anchors.leftMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Primary) ? 48 : 0
anchors.right: parent.right
anchors.rightMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Primary) ? 16 : 0
active: false
visible: false
}
onExpandedChanged: {
@@ -202,13 +203,13 @@ Rectangle {
name: "EXPANDED"
PropertyChanges {target: expandImage; icon: "chevron-up"}
PropertyChanges {target: statusExpandableItem; height: 82 + expandableRegion.height + 22}
PropertyChanges {target: expandableRegion; active: true}
PropertyChanges {target: expandableRegion; visible: true}
},
State {
name: "COLLAPSED"
PropertyChanges {target: expandImage; icon: "chevron-down"}
PropertyChanges {target: statusExpandableItem; height: 82}
PropertyChanges {target: expandableRegion; active: false}
PropertyChanges {target: expandableRegion; visible: false}
}
]
@@ -0,0 +1,271 @@
import QtQuick 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Controls 0.1
/*!
\qmltype StatusImageCropPanel
\inherits Item
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief Draw a crop-window onto an image and allows manipulating the position of the crop-window. Inherits \l{https://doc.qt.io/qt-5/qml-qtquick-item.html}{Item}.
Adds mouse pan and zoom functionality on top of StatusImageCrop functionality. Also adds small
practical features and optimizes drawing by minimizing StatusImageCrop area
\sa StatusImageCrop for more details
Example of how to use it:
\qml
StatusImageCropPanel {
width: 400
height: 200
source: "qrc:/demoapp/data/logo-test-image.png"
windowStyle: StatusImageCrop.WindowStyle.Rectangular
Component.onCompleted: setCropRect(Qt.rect(10, 0, sourceSize.width - 20, sourceSize.height))
}
\endqml
For a list of components available see StatusQ.
*/
Item {
id: root
implicitWidth: mainLayout.implicitWidth
implicitHeight: mainLayout.implicitHeight
/*!
\qmlproperty real StatusImageCrop::aspectRatio
Initial aspect-ratio of the crop-window
*/
property real aspectRatio: 1
/*!
\qmlproperty bool StatusImageCrop::interactive
If true allows user to interact with the image. Set to false for previewing existing crop-data
*/
property bool interactive: true
/*!
\qmlproperty bool StatusImageCrop::margins
Space to keep around the control borders and crop area
*/
property int margins: 10
/*!
\qmlproperty url StatusImageCropPanel::source
\sa StatusImageCrop::source
*/
/*required*/ property alias source: cropEditor.source
/*!
\qmlproperty WindowStyle StatusImageCropPanel::windowStyle
\sa StatusImageCrop::windowStyle
*/
property alias windowStyle: cropEditor.windowStyle
/*!
\qmlproperty int StatusImageCropPanel::radius
\sa StatusImageCrop::radius
*/
property alias radius: cropEditor.radius
/*!
\qmlproperty color StatusImageCropPanel::wallColor
\sa StatusImageCrop::wallColor
*/
property alias wallColor: cropEditor.wallColor
/*!
\qmlproperty real StatusImageCropPanel::wallTransparency
\sa StatusImageCrop::wallTransparency
*/
property alias wallTransparency: cropEditor.wallTransparency
/*!
\qmlproperty rect StatusImageCropPanel::cropRect
\sa StatusImageCrop::cropRect
*/
readonly property alias cropRect: cropEditor.cropRect
/*!
\qmlproperty real StatusImageCrop::scrollZoomFactor
How fast is image scaled (zoomed) when using mouse scroll
*/
property real scrollZoomFactor: 0.5
/*!
\qmlproperty bool StatusImageCropPanel::enableCheckers
Shows helper guiding checkers pattern where image is not covering
*/
property bool enableCheckers: root.interactive
/*!
\qmlproperty size StatusImageCropPanel::sourceSize
\sa StatusImageCrop::sourceSize
*/
property alias sourceSize: cropEditor.sourceSize
/*
\qmlmethod StatusImageCropPanel::setCropRect(rect)
\sa StatusImageCrop::cropRect
*/
function setCropRect(newRect) {
cropEditor.setCropRect(newRect)
aspectRatio = cropEditor.aspectRatio
}
QtObject {
id: d
readonly property int referenceWindowWidth: 1000
function updateAspectRatio(newAR) {
if(root.sourceSize.width === 0 || root.sourceSize.height === 0)
return
cropEditor.setCropRect(cropEditor.fillContentInWindow(root.sourceSize, Qt.size(referenceWindowWidth, referenceWindowWidth / root.aspectRatio)))
}
}
Component.onCompleted: d.updateAspectRatio(root.aspectRatio)
onAspectRatioChanged: d.updateAspectRatio(root.aspectRatio)
onSourceSizeChanged: d.updateAspectRatio(root.aspectRatio)
ColumnLayout {
id: mainLayout
anchors.fill: parent
Item {
id: cropSpaceItem
Layout.fillWidth: true
Layout.fillHeight: true
clip: true
Rectangle {
id: leftOverlay
anchors.left: parent.left
anchors.top: parent.top
anchors.right: cropEditor.left
anchors.bottom: parent.bottom
color: wallColor
opacity: wallTransparency
z: cropEditor.z + 1
}
Rectangle {
id: topOverlay
anchors.left: leftOverlay.right
anchors.top: parent.top
anchors.right: rightOverlay.left
anchors.bottom: cropEditor.top
color: wallColor
opacity: wallTransparency
z: cropEditor.z + 1
}
StatusImageCrop {
id: cropEditor
anchors.centerIn: parent
width: aspectRatio < cropSpaceItem.width/cropSpaceItem.height ? cropSpaceItem.height * aspectRatio : cropSpaceItem.width - root.margins * 2
height: aspectRatio < cropSpaceItem.width/cropSpaceItem.height ? cropSpaceItem.height - root.margins * 2 : cropSpaceItem.width / aspectRatio
}
Rectangle {
id: rightOverlay
anchors.left: cropEditor.right
anchors.top: parent.top
anchors.right: parent.right
anchors.bottom: parent.bottom
color: wallColor
opacity: wallTransparency
z: cropEditor.z + 1
}
Rectangle {
id: bottomOverlay
anchors.left: leftOverlay.right
anchors.top: cropEditor.bottom
anchors.right: rightOverlay.left
anchors.bottom: parent.bottom
color: wallColor
opacity: wallTransparency
z: cropEditor.z + 1
}
// Checkers
Canvas {
visible: root.enableCheckers
anchors.fill: parent
onPaint: {
var ctx = getContext("2d")
for(let xI = 0; xI < Math.ceil(width/10); xI++) {
for(let yI = 0; yI < Math.ceil(height/10); yI++) {
ctx.fillStyle = (xI % 2) === (yI % 2) ? "#FFFFFE" : "#DBDBDB"
ctx.fillRect(xI * 10, yI * 10, 10, 10)
}
}
}
z: cropEditor.z - 1
}
// Drag and zoom
MouseArea {
anchors.fill: parent
enabled: root.interactive
property var lastDragPoint: null
onReleased: lastDragPoint = null
onMouseXChanged: updateDrag(Qt.point(mouse.x, mouse.y))
onMouseYChanged: updateDrag(Qt.point(mouse.x, mouse.y))
onWheel: {
const delta = wheel.angleDelta.y / 120
cropEditor.setCropRect(cropEditor.getZoomRect(cropEditor.zoomScale + delta * root.scrollZoomFactor))
}
function moveRect(r /*rect*/, delta /*real*/) {
return Qt.rect(r.x + delta.x, r.y + delta.y, r.width, r.height)
}
function scaleSize(sz /*size*/, s /*size*/) {
return Qt.point(sz.width * s, sz.height * s)
}
function updateDrag(p) {
let delta = (lastDragPoint ? Qt.size(lastDragPoint.x - p.x, lastDragPoint.y - p.y) : Qt.size(0, 0))
delta = scaleSize(delta, 1/cropEditor.scrToImgScale)
cropEditor.setCropRect(moveRect(cropEditor.cropRect, delta))
lastDragPoint = p
}
}
}
RowLayout {
visible: root.interactive
StatusIcon {
icon: "remove-circle"
Layout.preferredWidth: 20
Layout.preferredHeight: 20
}
StatusSlider {
Layout.fillWidth: true
Layout.topMargin: 20
Layout.bottomMargin: 25
Layout.alignment: Qt.AlignVCenter
enabled: root.interactive
from: cropEditor.minZoomScale
to: cropEditor.maxZoomScale
value: cropEditor.zoomScale
live: false
onMoved: cropEditor.setCropRect(cropEditor.getZoomRect(valueAt(visualPosition)))
}
StatusIcon {
icon: "add-circle"
Layout.preferredWidth: 20
Layout.preferredHeight: 20
}
}
}
}
@@ -1,30 +1,60 @@
import QtQuick 2.13
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Core.Utils 0.1
Rectangle {
id: statusLetterIdenticon
id: root
property alias identiconText: identiconText
property string name
property string emoji
property string emojiSize: Emoji.size.small
property int letterSize: 21
property int charactersLen: 1
color: Theme.palette.miscColor5
width: 40
height: 40
radius: width / 2
StatusEmoji {
visible: root.emoji
anchors.centerIn: parent
width: Math.round(parent.width / 2)
height: Math.round(parent.height / 2)
emojiId: Emoji.iconId(root.emoji, root.emojiSize) || ""
}
StatusBaseText {
id: identiconText
text: ((statusLetterIdenticon.name.charAt(0) === "#")
|| (statusLetterIdenticon.name.charAt(0) === "@") ?
statusLetterIdenticon.name.charAt(1) : statusLetterIdenticon.name.charAt(0)).toUpperCase()
visible: !root.emoji
anchors.alignWhenCentered: false
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
width: parent.width
height: parent.height
font.weight: Font.Bold
font.pixelSize: statusLetterIdenticon.letterSize
color: Qt.rgba(255, 255, 255, 0.7)
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: root.letterSize
color: d.luminance(root.color) > 0.5 ? Qt.rgba(0, 0, 0, 0.5) : Qt.rgba(255, 255, 255, 0.7)
text: {
const shift = (root.name.charAt(0) === "#") ||
(root.name.charAt(0) === "@")
return root.name.substring(shift, shift + charactersLen).toUpperCase()
}
}
QtObject {
id: d
function luminance(color) {
let r = Math.pow(color.r, 2.2) * 0.2126
let g = Math.pow(color.g, 2.2) * 0.7151
let b = Math.pow(color.b, 2.2) * 0.0721
return r + g + b
}
}
}
+84 -24
View File
@@ -14,15 +14,19 @@ Rectangle {
property string title: ""
property string titleAsideText: ""
property string subTitle: ""
property string tertiaryTitle: ""
property string tertiaryTitle: ""
property string label: ""
property real leftPadding: 16
property real rightPadding: 16
property bool enabled: true
property bool highlighted: false
property bool propagateTitleClicks: true
property bool propagateTitleClicks: true
property int type: StatusListItem.Type.Primary
property list<Item> components
property var bottomModel: []
property Component bottomDelegate
property var tagsModel: []
property Component tagsDelegate
property StatusIconSettings icon: StatusIconSettings {
height: isLetterIdenticon ? 40 : 20
@@ -30,6 +34,7 @@ Rectangle {
rotation: 0
isLetterIdenticon: false
letterSize: 21
charactersLen: 1
color: isLetterIdenticon ? background.color : type === StatusListItem.Type.Danger ?
Theme.palette.dangerColor1 : Theme.palette.primaryColor1
background: StatusIconBackgroundSettings {
@@ -52,9 +57,9 @@ Rectangle {
isIdenticon: false
}
property StatusIdenticonRingSettings ringSettings: StatusIdenticonRingSettings {
totalRingUnits: 1
initalAngleRad: 0
ringPxSize: 1.5
distinctiveColors: Theme.palette.identiconRingColors
}
property alias sensor: sensor
@@ -67,8 +72,10 @@ Rectangle {
property alias statusListItemSubTitle: statusListItemSubTitle
property alias statusListItemTertiaryTitle: statusListItemTertiaryTitle
property alias statusListItemComponentsSlot: statusListItemComponentsSlot
property alias statusListItemTagsSlot: statusListItemTagsSlot
property alias statusListItemInlineTagsSlot: statusListItemTagsSlotInline
signal clicked(string itemId)
signal clicked(string itemId, var mouse)
signal titleClicked(string titleId)
enum Type {
@@ -78,7 +85,12 @@ Rectangle {
}
implicitWidth: 448
implicitHeight: Math.max(64, statusListItemTitleArea.height + 16)
implicitHeight: {
if (bottomModel.length === 0) {
return Math.max(64, statusListItemTitleArea.height + 16)
}
return Math.max(64, statusListItemTitleArea.height + 90)
}
color: {
if (sensor.containsMouse || statusListItem.highlighted) {
switch(type) {
@@ -113,7 +125,7 @@ Rectangle {
preventStealing: true
onClicked: {
statusListItem.clicked(statusListItem.itemId)
statusListItem.clicked(statusListItem.itemId, mouse)
}
StatusSmartIdenticon {
@@ -127,7 +139,8 @@ Rectangle {
name: statusListItem.title
active: statusListItem.icon.isLetterIdenticon ||
!!statusListItem.icon.name ||
!!statusListItem.image.source.toString()
!!statusListItem.image.source.toString() ||
!!statusListItem.icon.emoji
badge.border.color: statusListItem.color
ringSettings: statusListItem.ringSettings
}
@@ -147,7 +160,8 @@ Rectangle {
anchors.right: statusListItemLabel.visible ? statusListItemLabel.left : statusListItemComponentsSlot.left
anchors.leftMargin: iconOrImage.active ? 16 : statusListItem.leftPadding
anchors.rightMargin: statusListItem.rightPadding
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenter: bottomModel.length === 0 ? parent.verticalCenter : undefined
height: childrenRect.height
StatusBaseText {
@@ -155,26 +169,37 @@ Rectangle {
text: statusListItem.title
font.pixelSize: 15
height: visible ? contentHeight : 0
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
elide: Text.ElideRight
anchors.left: parent.left
anchors.right: !statusListItem.titleAsideText && !titleIconsRow.sourceComponent ? parent.right : undefined
anchors.top: bottomModel.length === 0 ? undefined: parent.top
anchors.topMargin: bottomModel.length === 0 ? undefined : 20
width: Math.min(implicitWidth, parent.width)
color: {
if (!statusListItem.enabled) {
return Theme.palette.baseColor1
}
switch (statusListItem.type) {
case StatusListItem.Type.Primary:
return Theme.palette.directColor1
case StatusListItem.Type.Secondary:
return Theme.palette.primaryColor1
case StatusListItem.Type.Danger:
return Theme.palette.dangerColor1
}
if (!statusListItem.enabled) {
return Theme.palette.baseColor1
}
switch (statusListItem.type) {
case StatusListItem.Type.Primary:
return Theme.palette.directColor1
case StatusListItem.Type.Secondary:
return Theme.palette.primaryColor1
case StatusListItem.Type.Danger:
return Theme.palette.dangerColor1
}
}
StatusToolTip {
id: statusListItemTitleTooltip
text: statusListItemTitle.text
delay: 0
visible: statusListItemTitle.truncated && statusListItemTitleMouseArea.containsMouse
}
MouseArea {
id: statusListItemTitleMouseArea
anchors.fill: parent
cursorShape: containsMouse? Qt.PointingHandCursor : Qt.ArrowCursor
enabled: statusListItem.enabled
cursorShape: sensor.enabled && containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
hoverEnabled: true
propagateComposedEvents: statusListItem.propagateTitleClicks
onClicked: {
@@ -189,6 +214,8 @@ Rectangle {
anchors.left: statusListItemTitle.right
anchors.leftMargin: 4
anchors.verticalCenter: statusListItemTitle.verticalCenter
anchors.top: bottomModel.length === 0 ? undefined: parent.top
anchors.topMargin: bottomModel.length === 0 ? undefined : 20
text: statusListItem.titleAsideText
font.pixelSize: 10
color: Theme.palette.baseColor1
@@ -232,11 +259,42 @@ Rectangle {
width: contentItem.width
implicitHeight: visible ? 22 : 0
}
Row {
id: statusListItemTagsSlotInline
anchors.top: statusListItemTertiaryTitle.bottom
width: parent.width
spacing: 10
clip: true
Repeater {
model: tagsModel
delegate: tagsDelegate
}
}
}
Row {
id: statusListItemTagsSlot
anchors.topMargin: 16
anchors.top: iconOrImage.bottom
anchors.left: parent.left
anchors.leftMargin: 16
width: statusListItemBadge.width
spacing: 10
anchors.verticalCenter: parent.verticalCenter
Repeater {
model: bottomModel
delegate: bottomDelegate
}
}
StatusBaseText {
id: statusListItemLabel
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenter: bottomModel.length === 0 ? parent.verticalCenter : undefined
anchors.top: bottomModel.length === 0 ? undefined: parent.top
anchors.topMargin: bottomModel.length === 0 ? undefined : 16
anchors.right: statusListItemComponentsSlot.left
anchors.rightMargin: statusListItemComponentsSlot.width > 0 ? 10 : 0
@@ -250,7 +308,9 @@ Rectangle {
id: statusListItemComponentsSlot
anchors.right: parent.right
anchors.rightMargin: statusListItem.rightPadding
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenter: bottomModel.length === 0 ? parent.verticalCenter : undefined
anchors.top: bottomModel.length === 0 ? undefined: parent.top
anchors.topMargin: bottomModel.length === 0 ? undefined : 12
spacing: 10
}
}
@@ -57,6 +57,8 @@ Control {
visible: root.icon.isLetterIdenticon
color: root.icon.color
name: root.primaryText
emoji: root.icon.emoji
emojiSize: root.icon.emojiSize
}
StatusBaseText {
font.weight: Font.Medium
@@ -0,0 +1,79 @@
import QtQuick 2.13
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
Rectangle {
id: root
width: layout.width + layout.anchors.margins
height: 30
color: Theme.palette.primaryColor3
radius: 15
property alias titleText: titleText
property string title: ""
property bool closeButtonVisible: true
signal clicked()
property StatusImageSettings image: StatusImageSettings {
width: 20
height: 20
isIdenticon: false
}
property StatusIconSettings icon: StatusIconSettings {
height: 20
width: 20
rotation: 0
isLetterIdenticon: false
letterSize: 10
color: Theme.palette.primaryColor1
background: StatusIconBackgroundSettings {
width: 15
height: 15
color: Theme.palette.primaryColor3
}
}
RowLayout {
id: layout
height: parent.height
anchors.margins: 6
StatusSmartIdenticon {
id: iconOrImage
Layout.leftMargin: 4
image: root.image
icon: root.icon
name: root.title
active: root.icon.isLetterIdenticon ||
!!root.icon.name ||
!!root.image.source.toString()
}
StatusBaseText {
id: titleText
color: Theme.palette.primaryColor1
text: root.title
Layout.rightMargin: closeButtonVisible ? 0 : 5
}
StatusIcon {
id: closeIcon
color: Theme.palette.primaryColor1
icon: "close-circle"
visible: closeButtonVisible
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
root.clicked()
}
}
}
}
}
+392
View File
@@ -0,0 +1,392 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
/*!
\qmltype StatusListPicker
\inherits Item
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief It is a combination of StatusPickerButton and a drop-down list component that provides a way of presenting a list of selectable options to the user. Inherits \l{https://doc.qt.io/qt-5/qml-qtquick-item.html}{Item}.
The \c StatusListPicker is populated with a data model. The data model is commonly a JavaScript array or a ListModel object.
StatusListPicker can be made as a single or multiple options picker by setting its StatusListPicker::multiSelection property properly or will be auto-set if the model contains / provides more than one selected items.
The StatusPickerButton text holds the text of the current item selected in the list picker. If there is more than one item selected, a string composed will be displayed.
The drop-down list incorporates a searcher by the following model roles: `name` or / and `shortName`.
NOTE: Make sure to set the appropriate z-index when instantiating the component in order to place it on top of your view in order to display the drop-down data properly.
Make sure to position the component inside its parent also when it is spanned in order to achieve a better user experience.
Example of how the component looks like:
\image status_list_picker.png
Example of how to use it:
\qml
StatusListPicker {
id: currencyPicker
inputList: Models.currencyPickerModel
searchText: qsTr("Search Language")
multiSelection: true
printSymbol: true
}
\endqml
For a list of components available see StatusQ.
*/
Item {
id: root
/*!
\qmlproperty string StatusListPicker::inputList
This property holds the data that will be populated in the list picker.
NOTE: This model property should not change so it is an in / out property where the selected role will be dynamically changed according to user actions.
Here an example of the model roles expected:
\qml
inputList: ListModel {
ListElement {
key: 0
name: "United States Dollar"
shortName: "USD"
symbol: "$"
imageSource: "../../assets/twemoji/26x26/1f4b4.png"
category: "fiat"
selected: true
}
ListElement {
key: 1
name: "British Pound"
shortName: "GBP"
symbol: "£"
imageSource: "../../assets/twemoji/26x26/1f4b5.png"
category: "fiat"
selected: false
}
}
\endqml
*/
property ListModel inputList: ListModel { }
/*!
\qmlproperty string StatusListPicker::searchText
This property holds the search text the searcher input displays by default.
*/
property string searchText: ""
/*!
\qmlproperty string StatusListPicker::placeholderSearchText
This property holds the placeholder text the searcher input displays by default.
*/
property string placeholderSearchText: qsTr("Search")
/*!
\qmlproperty string StatusListPicker::multiSelection
This property holds whether the list picker is a single or a multiple picker option by displaying a StatusRadioButton or StatusCheckBox instead.
*/
property bool multiSelection: false
/*!
\qmlproperty string StatusListPicker::printSymbol
This property holds whether the selected items will display a composition of the role `symbol` in the StatusPickerButton text or just only the role `shortName`.
*/
property bool printSymbol: false
/*!
\qmlproperty string StatusListPicker::maxPickerHeight
This property holds the maximum drop-down list height allowed. The drop-down list height will be set as the minimum value between the list content height and the maxPickerHeight property.
*/
property int maxPickerHeight: 718
/*!
\qmlproperty string StatusListPicker::enableSelectableItem
This property holds if the item in the list will be highlighted when hovering and clickable in its complete area or just not highlighted and able to be selected by clicking only the checbox or radiobutton area.
*/
property bool enableSelectableItem: true
/*!
\qmlproperty string StatusListPicker::menuAlignment
This property holds the allignment of the menu in terms of the button
*/
property int menuAlignment: StatusListPicker.MenuAlignment.Right
/*!
\qmlproperty enum StatusListPicker::MenuAlignment
This property holds the allignment of the menu in terms of the button
values can be Left, Right or Center
*/
enum MenuAlignment {
Left,
Right,
Center
}
/*
\qmlmethod StatusListPicker::close()
It can be used to force to close the drop-down picker list whenever the consumer needs it. For example by adding an outside MouseArea to close the picker when user clicks outsite the component:
\qml
// Outsite area
MouseArea {
height: root.height
width: root.width
onClicked: { currencyPicker.close() }
}
\endqml
*/
function close() {
picker.visible = false
// Reset searcher:
root.searchText = ""
}
/*!
\qmlsignal StatusListPicker::itemPickerChanged(string key, bool selected)
This signal is emitted when an item changes its selected value.
*/
signal itemPickerChanged(string key, bool selected)
QtObject {
id: d
property var filteredModel: ListModel { }
// Used to set up component and the needed private properties
function initialize() {
if(filteredModel.count === 0) {
// It is necessary to load the model, not loaded yet!
var selected = 0
var selectionText = ""
for(var i = 0; i < root.inputList.count; i++) {
var item = root.inputList.get(i)
d.filteredModel.append(item)
if(item.selected) selected++;
}
// If the given model has more than one selected elements, the behaviour of the list picker will be as a multiple selector with checkboxes although it is
// set in the radiobutton mode. Radiobutton mode is only for mutial-exclusion.
if(selected > 1)
multiSelection = true
// Update selected items text:
d.getSelectedItemsText()
}
}
// Used to update model elements given a specific text by filtering them for its `name` and / or `shortName`.
function applyFilter(text) {
const input = text.toLowerCase()
filteredModel.clear()
for(var i = 0; i < root.inputList.count; i++) {
let item = root.inputList.get(i)
if(item.name.toLowerCase().includes(input) || item.shortName.toLowerCase().includes(input))
filteredModel.append(item)
}
}
function formatSymbolShortNameText(symbol, shortName) {
var formattedText = ""
if(root.printSymbol && symbol)
formattedText = symbol + shortName
else
formattedText = shortName
return formattedText
}
function getSelectedItemsText() {
var res = ""
for(var i = 0; i < root.inputList.count; i++) {
var item = root.inputList.get(i)
if(item.selected) {
if(res != "")
res += ", "
res += d.formatSymbolShortNameText(item.symbol, item.shortName)
}
}
return res
}
// Used to update the base input list model with the new selected property
function updateInputListModel(key, selected, isSingleSelection) {
// If it is a single selection we must ensure that when a new key is selected others are cleared.
// It must be done manually because as there is the option of filterning, the model visualized changes
// and it could be possible to have a filtered list without an element selected (but in the base model
// it is) so, the binding to not selected will not be executed, as in the current filtered model
// there are no changes to update, just only the selected one.
for(var i = 0; i < root.inputList.count; i++) {
if(root.inputList.get(i).key === key) {
root.inputList.get(i).selected = selected
}
else if(isSingleSelection && selected) {
// Clear all the list
root.inputList.get(i).selected = false
}
}
}
}
width: 110
height: 38
Component.onCompleted: d.initialize()
StatusPickerButton {
id: btn
anchors.fill: parent
bgColor: Theme.palette.primaryColor3
contentColor: Theme.palette.primaryColor1
text: picker.selectedItemsText
textPixelSize: 13
type: StatusPickerButton.Type.Down
onClicked: {
picker.visible = !picker.visible
// Restart list position:
content.positionViewAtBeginning()
content.forceActiveFocus()
}
}
Rectangle {
id: picker
property string selectedItemsText: ""
width: content.itemWidth
height: Math.min(content.contentHeight + content.anchors.topMargin + content.anchors.bottomMargin, root.maxPickerHeight)
anchors.left: root.menuAlignment === StatusListPicker.MenuAlignment.Left ? btn.left : undefined
anchors.right: root.menuAlignment === StatusListPicker.MenuAlignment.Right ? btn.right : undefined
anchors.horizontalCenter: root.menuAlignment === StatusListPicker.MenuAlignment.Center ? btn.horizontalCenter : undefined
anchors.top: btn.bottom
anchors.topMargin: 4
visible: false
color: Theme.palette.statusPopupMenu.backgroundColor
radius: 8
layer.enabled: true
layer.effect: DropShadow {
source: picker
horizontalOffset: 0
verticalOffset: 4
radius: 12
samples: 25
spread: 0.2
color: Theme.palette.dropShadow
}
ListView {
id: content
property int itemHeight: 40
property int itemWidth: 360
model: d.filteredModel
width: itemWidth
anchors.top: parent.top
anchors.topMargin: 8
anchors.bottom: parent.bottom
anchors.bottomMargin: 8
currentIndex: -1
clip: true
headerPositioning: ListView.OverlayHeader
header: Rectangle {
id: header
width: content.itemWidth
height: searchInput.height + 24
color: Theme.palette.statusPopupMenu.backgroundColor
z: 3 // Above delegate (z=1) and above section.delegate (z = 2)
StatusBaseInput {
id: searchInput
implicitHeight: 36
width: content.itemWidth - 2 * 18
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
topPadding: 0
bottomPadding: 0
placeholderText: root.placeholderSearchText
text: root.searchText
icon.name: "search"
onTextChanged: {
d.applyFilter(text)
root.searchText = text
}
}
}// End of search input item
delegate: StatusItemPicker {
width: content.itemWidth
height: content.itemHeight
color: mouseArea.containsMouse ? Theme.palette.baseColor4 : "transparent"
image: StatusImageSettings {
source: model.imageSource ? model.imageSource : ""
width: 15
height: 15
isIdenticon: false
}
name: model.name
shortName: model.shortName
selectorType: root.multiSelection ? StatusItemPicker.SelectorType.CheckBox : StatusItemPicker.SelectorType.RadioButton
selected: model.selected
radioGroup: radioBtnGroup
onCheckedChanged: {
d.updateInputListModel(model.key, checked, selectorType === StatusItemPicker.SelectorType.RadioButton)
if(selectorType === StatusItemPicker.SelectorType.RadioButton && checked) {
// Update selected item text
picker.selectedItemsText = d.formatSymbolShortNameText(model.symbol, model.shortName)
}
else {
// Update selected items text (multiple selection, text chain).
picker.selectedItemsText = d.getSelectedItemsText()
}
// Used to notify selected property changes in the specific item picker.
itemPickerChanged(model.key, checked)
}
MouseArea {
id: mouseArea
enabled: root.enableSelectableItem
anchors.fill: parent
cursorShape: root.enableSelectableItem ? Qt.PointingHandCursor : Qt.ArrowCursor
hoverEnabled: true
onClicked: {
if(selectorType === StatusItemPicker.SelectorType.RadioButton) {
// Just only allow to select, not unselect in case of single selection (radiobutton)
if(!selected) selected = !selected
}
else
// In case of multiple selections you can both select and unselect.
selected = !selected
}
}
}
section.property: "category"
section.criteria: ViewSection.FullString
section.delegate: Item {
width: content.itemWidth
height: content.itemHeight
StatusBaseText {
anchors.leftMargin: 18
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
text: section
color: Theme.palette.baseColor1
font.pixelSize: 15
elide: Text.ElideRight
}
}// End of Category item
onActiveFocusChanged: { if(!activeFocus) root.close() }
// Not visual element to control mutual-exclusion of radiobuttons that are not sharing the same parent (inside list view)
ButtonGroup {
id: radioBtnGroup
}
}// End of Content
}// End of Rectangle picker
}
+110 -24
View File
@@ -2,49 +2,127 @@ import QtQuick 2.0
import StatusQ.Core.Theme 0.1
import StatusQ.Core 0.1
/*!
\qmltype StatusMemberListItem
\inherits StatusListItem
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief It is a list item with a specific format to display members of a community or chat. Inherits from \c StatusListItem.
The \c StatusMemberListItem is a clickable / hovering list item with a specific format to display members of a community or chat.
It displays the member avatar, trust and mutual contact indicators, nick name, user name, chat key and information about the member connectivity.
Example of how the control looks like:
\image status_member_list_item.png
Example of how to use it:
\qml
StatusMemberListItem {
nickName: "carmen.eth"
isOnline: false
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
}
StatusMemberListItem {
nickName: "This girl I know from work"
userName: "annabelle"
isOnline: true
}
\endqml
For a list of components available see StatusQ.
*/
StatusListItem {
id: root
/*!
\qmlproperty string StatusMemberListItem::nickName
This property holds the nick name of the member represented.
*/
property string nickName: ""
/*!
\qmlproperty string StatusMemberListItem::userName
This property holds the user name of the member represented.
*/
property string userName: ""
property string chatKey: ""
property bool isMutualContact: false
property var trustIndicator: StatusContactVerificationIcons.TrustedType.None
property bool isOnline: false
/*!
\qmlproperty string StatusMemberListItem::pubKey
This property holds the chat public key of the member represented.
*/
property string pubKey: ""
/*!
\qmlproperty string StatusMemberListItem::isContact
This property holds if the member represented is contact.
*/
property bool isContact: false
/*!
\qmlproperty string StatusMemberListItem::isVerified
This property holds if the member represented is verified contact.
*/
property bool isVerified: false
/*!
\qmlproperty string StatusMemberListItem::isUntrustworthy
This property holds if the member represented is untrustworthy.
*/
property bool isUntrustworthy: false
/*!
\qmlproperty string StatusMemberListItem::status
This property holds the connectivity status of the member represented.
0 - offline
1 - online
2 - doNotDisturb
3 - idle
*/
// FIXME: move Constants.userStatus from status-desktop
property int status: 0
/*!
\qmlproperty string StatusMemberListItem::isAdmin
This property holds the admin status of the member represented.
*/
property bool isAdmin: false
// Subtitle composition:
function composeSubtitile() {
var compose = ""
if(root.userName !== "")
compose = "(" + root.userName + ")"
QtObject {
id: d
if(compose !== "" && root.chatKey !== "")
// Composition
compose += " • " + composeShortKeyChat(root.chatKey)
// Subtitle composition:
function composeSubtitile() {
var compose = ""
if(root.userName !== "" && root.nickName !== "")
compose = "(" + root.userName + ")"
else if(root.chatKey !== "")
compose = composeShortKeyChat(root.chatKey)
if(compose !== "" && root.pubKey !== "")
// Composition
compose += " • " + composeShortKeyChat(root.pubKey)
return compose
}
else if(root.pubKey !== "")
compose = composeShortKeyChat(root.pubKey)
// Short keychat composition:
function composeShortKeyChat(chatKey) {
return chatKey.substring(0, 5) + "..." + chatKey.substring(chatKey.length - 3)
return compose
}
// Short keychat composition:
function composeShortKeyChat(pubKey) {
return pubKey.substring(0, 5) + "..." + pubKey.substring(pubKey.length - 3)
}
}
// root object settings:
title: root.nickName
title: (root.nickName === "") ? root.userName : root.nickName
statusListItemTitleIcons.sourceComponent: StatusContactVerificationIcons {
isMutualContact: root.isMutualContact
trustIndicator: root.trustIndicator
isMutualContact: root.isContact
trustIndicator: {
if (root.isVerified) return StatusContactVerificationIcons.TrustedType.Verified
else if (root.isUntrustworthy) return StatusContactVerificationIcons.TrustedType.Untrustworthy
return StatusContactVerificationIcons.TrustedType.None
}
}
subTitle: composeSubtitile()
subTitle: d.composeSubtitile()
statusListItemSubTitle.font.pixelSize: 10
icon.isLetterIdenticon: !root.image.source.toString()
statusListItemIcon.badge.visible: true
statusListItemIcon.badge.color: root.isOnline ? Theme.palette.successColor1 : Theme.palette.baseColor1
statusListItemIcon.badge.color: root.status === 1 ? Theme.palette.successColor1 : Theme.palette.baseColor1 // FIXME
color: sensor.containsMouse ? Theme.palette.baseColor2 : Theme.palette.baseColor4
// Default sizes / positions by design
@@ -60,4 +138,12 @@ StatusListItem {
statusListItemIcon.badge.border.width: 2
statusListItemIcon.badge.implicitHeight: 12 // 8 px + 2 px * 2 borders
statusListItemIcon.badge.implicitWidth: 12 // 8 px + 2 px * 2 borders
components: [
StatusIcon {
anchors.verticalCenter: parent.verticalCenter
visible: root.isAdmin
icon: "crown"
color: Theme.palette.directColor1
}
]
}
@@ -32,7 +32,7 @@ StatusListItem {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: statusNavigationListItem.clicked(mouse)
onClicked: statusNavigationListItem.clicked(statusNavigationListItem.itemId, mouse)
}
components: [
+11 -3
View File
@@ -28,11 +28,19 @@ Rectangle {
id: image
width: statusRoundImage.width
height: statusRoundImage.height
sourceSize.width: parent.width * 2
sourceSize.height: parent.height * 2
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
cache: true
onSourceChanged: {
if (sourceSize.width < width || sourceSize.height < height) {
sourceSize = Qt.binding(function() {
return Qt.size(width * 2, height * 2)
})
}
else {
sourceSize = undefined
}
}
}
Loader {
@@ -23,9 +23,9 @@ Loader {
}
property StatusIdenticonRingSettings ringSettings: StatusIdenticonRingSettings {
totalRingUnits: 1
initalAngleRad: 0
ringPxSize: 1.5
ringPxSize: Math.max(1.5, statusSmartIdenticon.image.width / 24.0)
distinctiveColors: Theme.palette.identiconRingColors
}
sourceComponent: statusSmartIdenticon.icon.isLetterIdenticon ? letterIdenticon :
@@ -83,7 +83,10 @@ Loader {
height: statusSmartIdenticon.icon.height
color: statusSmartIdenticon.icon.color
name: statusSmartIdenticon.name
emoji: statusSmartIdenticon.icon.emoji
emojiSize: statusSmartIdenticon.icon.emojiSize
letterSize: statusSmartIdenticon.icon.letterSize
charactersLen: statusSmartIdenticon.icon.charactersLen
}
}
+342 -53
View File
@@ -1,44 +1,244 @@
import QtQuick 2.14
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.14
import QtGraphicalEffects 1.0
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
/*!
\qmltype StatusTagSelector
\inherits Item
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief Displays a tag selector component together with a list of where to select and add the tags from.
Inherits \l{https://doc.qt.io/qt-5/qml-qtquick-item.html}{Item}.
The \c StatusTagSelector displays a list of asorted elements together with a text input where tags are added. As the user
types some text, the list elements are filtered and if the user selects any of those a new tag is created.
For example:
\qml
StatusTagSelector {
width: 650
height: 44
anchors.centerIn: parent
namesModel: ListModel {
ListElement {
pubKey: "0x0"
name: "Maria"
icon: ""
onlineStatus: 3
}
ListElement {
pubKey: "0x1"
name: "James"
icon: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
onlineStatus: 1
}
ListElement {
pubKey: "0x2"
name: "Paul"
icon: ""
onlineStatus: 2
}
}
toLabelText: qsTr("To: ")
warningText: qsTr("USER LIMIT REACHED")
}
\endqml
\image status_tag_selector.png
For a list of components available see StatusQ.
*/
Item {
id: root
implicitWidth: 448
implicitHeight: 44
/*!
\qmlproperty real StatusTagSelector::maxHeight
This property holds the maximum height of the component.
*/
property real maxHeight: (488 + contactsLabel.height + contactsLabel.anchors.topMargin) //default min
/*!
\qmlproperty alias StatusTagSelector::textEdit
This property holds a reference to the TextEdit component.
*/
property alias textEdit: edit
/*!
\qmlproperty alias StatusTagSelector::text
This property holds a reference to the TextEdit's text property.
*/
property alias text: edit.text
/*!
\qmlproperty string StatusTagSelector::warningText
This property sets the warning text.
*/
property string warningText: ""
/*!
\qmlproperty string StatusTagSelector::toLabelText
This property sets the 'to' label text.
*/
property string toLabelText: ""
/*!
\qmlproperty string StatusTagSelector::listLabel
This property sets the elements list label text.
*/
property string listLabel: ""
/*!
\qmlproperty int StatusTagSelector::nameCountLimit
This property sets the tags count limit.
*/
property int nameCountLimit: 5
property ListModel namesModel: ListModel { }
/*!
\qmlproperty var StatusTagSelector::ringSpecModelGetter
This property holds the function to calculate the ring spec model
based on the public key.
*/
property var ringSpecModelGetter: (pubKey) => { /*return ringSpecModel*/ }
/*!
\qmlproperty var StatusTagSelector::compressKeyGetter
This property holds the function to calculate the compressed
key based on the public key.
*/
property var compressedKeyGetter: (pubKey) => { /*return compressed key;*/ }
/*!
\qmlproperty var StatusTagSelector::colorIdForPubkeyGetter
This property holds the function to calculate the color Id
based on the public key.
*/
property var colorIdForPubkeyGetter: (pubKey) => { /*return color Id;*/ }
/*!
\qmlproperty ListModel StatusTagSelector::sortedList
This property holds the sorted list model.
*/
property ListModel sortedList: ListModel { }
/*!
\qmlproperty ListModel StatusTagSelector::namesModel
This property holds the asorted names model.
*/
property ListModel namesModel: ListModel { }
/*!
\qmlproperty bool StatusTagSelector::showSortedListOnlyWhenText
This property will decide if the sorted list view info is displayed before entering some text in the input or after.
By default is set to false.
*/
property bool showSortedListOnlyWhenText: false
/*!
\qmlproperty bool StatusTagSelector::orderByReadonly
This property will decide if the displayed tag names will be ordered from left to right starting with the items that are marked as `isReadonly`.
By default is set to true (readonly names at left).
*/
property bool orderByReadonly: true
/*!
\qmlmethod
This function is used to find an entry in a model.
*/
function find(model, criteria) {
for (var i = 0; i < model.count; ++i) if (criteria(model.get(i))) return model.get(i);
return null;
}
function insertTag(name, id) {
if (!find(namesModel, function(item) { return item.publicId === id }) && namesModel.count < root.nameCountLimit) {
namesModel.insert(namesModel.count, {"name": name, "publicId": id});
/*!
\qmlmethod
This function is used to insert a new tag.
*/
function insertTag(name, id, isReadonly, tagIcon) {
if (!find(namesModel, function(item) { return item.pubKey === id }) && namesModel.count < root.nameCountLimit) {
if(orderByReadonly && isReadonly)
namesModel.insert(0, {"name": name, "pubKey": id, "isReadonly": !!isReadonly, "tagIcon": tagIcon ? tagIcon : ""});
else
namesModel.insert(namesModel.count, {"name": name, "pubKey": id, "isReadonly": !!isReadonly, "tagIcon": tagIcon ? tagIcon : ""});
addMember(id);
edit.clear();
}
}
/*!
\qmlmethod
This function is used to sort the source model.
*/
function sortModel(inputModel) {
sortedList.clear();
if (text !== "") {
for (var i = 0; i < inputModel.count; i++ ) {
var entry = inputModel.get(i);
if (entry.displayName.toLowerCase().includes(text.toLowerCase()) &&
!find(namesModel, function(item) { return item.name === entry.displayName })) {
sortedList.append({"pubKey": entry.pubKey,
"displayName": entry.displayName,
"localNickname": entry.localNickname,
"isVerified": entry.isVerified,
"isUntrustworthy": entry.isUntrustworthy,
"isContact": entry.isMutualContact,
"ringSpecModel": entry.ringSpecModel,
"icon": entry.icon,
"onlineStatus": entry.onlineStatus,
"tagIcon": entry.tagIcon ? entry.tagIcon : "",
"isReadonly": !!entry.isReadonly});
userListView.model = sortedList;
}
}
} else {
userListView.model = inputModel;
}
}
/*!
\qmlsignal
This signal is emitted when a new tag is created.
*/
signal addMember(string memberId)
/*!
\qmlsignal
This signal is emitted when a tag is removed.
*/
signal removeMember(string memberId)
QtObject {
id: d
property real suggestionContainerHeight: suggestionsContainer.visible ? contactsLabel.height + contactsLabel.anchors.topMargin +
suggestionsContainer.anchors.topMargin + suggestionsContainer.anchors.bottomMargin +
2 * bgRect.anchors.margins +
userListView.anchors.topMargin + userListView.anchors.bottomMargin +
(userListView.model.count * 64): 0
function orderNamesModel() {
if(root.orderByReadonly) {
for(var i = 0; i < namesModel.count; i++) {
var entry = namesModel.get(i)
if(entry.isReadonly) {
namesModel.move(i, 0, 1)
}
}
}
}
}
implicitWidth: 448
implicitHeight: (tagSelectorRect.height + d.suggestionContainerHeight) > root.maxHeight ? root.maxHeight : (tagSelectorRect.height + d.suggestionContainerHeight)
onOrderByReadonlyChanged: { d.orderNamesModel() }
Component.onCompleted: {
// Component initialization:
d.orderNamesModel()
}
Rectangle {
anchors.fill: parent
id: tagSelectorRect
width: parent.width
height: 44
radius: 8
color: Theme.palette.baseColor2
RowLayout {
anchors.fill: parent
anchors.leftMargin: 16
@@ -46,13 +246,15 @@ Item {
spacing: 8
StatusBaseText {
Layout.preferredWidth: 22
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.alignment: Qt.AlignVCenter
color: Theme.palette.baseColor1
text: root.toLabelText
visible: (parent.width>22)
}
ScrollView {
Layout.fillWidth: true
Layout.preferredWidth: (parent.width - 177) > 0 ? ((namesList.contentWidth > (parent.width - 177)) ?
(parent.width - 177) : namesList.contentWidth) : 0
implicitHeight: 30
Layout.alignment: Qt.AlignVCenter
visible: (namesList.count > 0)
@@ -66,67 +268,60 @@ Item {
model: namesModel
orientation: ListView.Horizontal
spacing: 8
onContentWidthChanged: {
positionViewAtEnd();
function scrollToEnd() {
if (contentWidth > width) {
contentX = contentWidth;
}
}
delegate: Rectangle {
id: nameDelegate
width: (nameText.contentWidth + 34)
height: 30
color: mouseArea.containsMouse ? Theme.palette.miscColor1 : Theme.palette.primaryColor1
radius: 8
StatusBaseText {
id: nameText
anchors.left: parent.left
anchors.leftMargin: 8
anchors.verticalCenter: parent.verticalCenter
color: Theme.palette.indirectColor1
text: name
}
StatusIcon {
anchors.left: nameText.right
anchors.verticalCenter: parent.verticalCenter
color: Theme.palette.indirectColor1
icon: "close"
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
removeMember(publicId);
namesModel.remove(index, 1);
}
onWidthChanged: { scrollToEnd(); }
onCountChanged: { scrollToEnd(); }
delegate: StatusTagItem {
isReadonly: model.isReadonly
text: model.name
icon: model.tagIcon
onClicked: {
removeMember(model.pubKey);
namesModel.remove(index, 1);
}
}
}
}
TextEdit {
TextInput {
id: edit
verticalAlignment: Text.AlignVCenter
focus: true
color: Theme.palette.directColor1
clip: true
font.pixelSize: 15
wrapMode: TextEdit.NoWrap
font.family: Theme.palette.baseFont.name
Layout.fillWidth: true
Layout.preferredHeight: 44
verticalAlignment: Text.AlignVCenter
visible: (namesModel.count < 5)
enabled: visible
focus: true
font.pixelSize: 15
font.family: Theme.palette.baseFont.name
color: Theme.palette.directColor1
visible: (parent.width>22)
Keys.onPressed: {
if ((event.key === Qt.Key_Backspace || event.key === Qt.Key_Escape)
&& getText(cursorPosition, (cursorPosition-1)) === "") {
removeMember(namesModel.get(namesList.count-1).publicId);
&& getText(cursorPosition, (cursorPosition-1)) === ""
&& (namesList.count-1) >= 0) {
removeMember(namesModel.get(namesList.count-1).pubKey);
namesModel.remove((namesList.count-1), 1);
}
if ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && (sortedList.count > 0)) {
root.insertTag(sortedList.get(userListView.currentIndex).name,
sortedList.get(userListView.currentIndex).pubKey,
sortedList.get(userListView.currentIndex).isReadonly,
sortedList.get(userListView.currentIndex).tagIcon);
}
}
Keys.onUpPressed: { userListView.decrementCurrentIndex(); }
Keys.onDownPressed: { userListView.incrementCurrentIndex(); }
}
StatusBaseText {
id: warningTextLabel
visible: (namesModel.count === root.nameCountLimit)
Layout.preferredWidth: 120
Layout.preferredWidth: visible ? 120 : 0
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
font.pixelSize: 10
color: Theme.palette.dangerColor1
@@ -134,4 +329,98 @@ Item {
}
}
}
StatusBaseText {
id: contactsLabel
font.pixelSize: 15
anchors.left: parent.left
anchors.leftMargin: 8
anchors.top: tagSelectorRect.bottom
anchors.topMargin: visible ? 32 : 0
height: visible ? contentHeight : 0
visible: (root.sortedList.count === 0)
color: Theme.palette.baseColor1
text: root.listLabel
}
Control {
id: suggestionsContainer
width: 360
anchors {
top: (root.sortedList.count > 0) ? tagSelectorRect.bottom : contactsLabel.bottom
topMargin: 8//Style.current.halfPadding
bottom: parent.bottom
bottomMargin: 16//Style.current.padding
}
clip: true
visible: (!root.showSortedListOnlyWhenText && ((root.sortedList.count > 0) || (edit.text === ""))) ||
((edit.text !== "") && (root.sortedList.count > 0))
x: ((root.namesModel.count > 0) && (root.sortedList.count > 0) && ((edit.x + 8) <= (root.width - suggestionsContainer.width)))
? (edit.x + 8) : 0
background: Rectangle {
id: bgRect
anchors.fill: parent
anchors.margins: 8
visible: (root.sortedList.count > 0)
color: Theme.palette.statusPopupMenu.backgroundColor
radius: 8
layer.enabled: true
layer.effect: DropShadow {
source: bgRect
horizontalOffset: 0
verticalOffset: 4
radius: 12
samples: 25
spread: 0.2
color: Theme.palette.dropShadow
}
}
contentItem: ListView {
id: userListView
anchors {
fill: parent
topMargin: 16
leftMargin: 8
rightMargin: 8
}
ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AsNeeded
}
boundsBehavior: Flickable.StopAtBounds
onCountChanged: {
userListView.currentIndex = 0;
}
delegate: StatusMemberListItem {
anchors.left: parent.left
anchors.leftMargin: bgRect.visible ? 8 : 0
anchors.right: parent.right
anchors.rightMargin: bgRect.visible ? 8 : 0
height: visible ? 64 : 0
visible: {
for (let i = 0; i < namesModel.count; i++) {
if (namesModel.get(i).pubKey === model.pubKey) {
return false
}
}
return true
}
nickName: model.localNickname
userName: model.displayName
pubKey: root.compressedKeyGetter(model.pubKey)
isVerified: model.isVerified
isUntrustworthy: model.isUntrustworthy
isContact: model.isContact
image.source: model.icon
image.isIdenticon: false
icon.color: Theme.palette.userCustomizationColors[root.colorIdForPubkeyGetter(model.pubKey)]
status: model.onlineStatus
statusListItemIcon.badge.border.color: sensor.containsMouse ? Theme.palette.baseColor2 : Theme.palette.baseColor4
ringSettings.ringSpecModel: root.ringSpecModelGetter(model.pubKey)
color: (sensor.containsMouse || highlighted) ? Theme.palette.baseColor2 : "transparent"
onClicked: {
root.insertTag(model.displayName, model.pubKey, model.isAdmin, model.isAdmin ? "crown" : "");
}
}
}
}
}
+124 -8
View File
@@ -7,30 +7,114 @@ import StatusQ.Core 0.1
import StatusQ.Controls 0.1
import StatusQ.Core.Theme 0.1
/*!
\qmltype StatusToastMessage
\inherits Control
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief Displays a toast message in the UI. Inherits \l{https://doc.qt.io/qt-5/qml-qtquick-controls2-control.html}{Control}.
The \c StatusToastMessage displays a toast message in the UI either standalone or as part
of a stack of toast messages.
For example:
\qml
StatusToastMessage {
primaryText: qsTr("Collectible is being minted...")
secondaryText: qsTr("View on Etherscan")
loading: true
type: 0
linkUrl: "http://google.com"
duration: 5000
}
\endqml
\image status_toast_message.png
For a list of components available see StatusQ.
*/
Control {
id: root
width: 343
height: !!secondaryText ? 68 : 48
anchors.right: parent.right
property bool open: false
/*!
\qmlproperty bool StatusToastMessage::open
This property represents all steps and their descriptions as provided by the user.
*/
property bool open: true
/*!
\qmlproperty string StatusToastMessage::primaryText
This property represents the title text of the ToastMessage.
*/
property string primaryText: ""
/*!
\qmlproperty string StatusToastMessage::secondaryText
This property represents the subtitle text of the ToastMessage.
*/
property string secondaryText: ""
/*!
\qmlproperty bool StatusToastMessage::loading
This property represents activates/deactivates the loading indicator of the ToastMessage.
*/
property bool loading: false
property string iconName: ""
/*!
\qmlproperty string StatusToastMessage::linkUrl
This property represents all steps and their descriptions as provided by the user.
*/
property string linkUrl: ""
/*!
\qmlproperty int StatusToastMessage::duration
This property represents duration in milliseconds, for how long a toast will be visible. If 0 is set for
duration, that means a toast won't dissapear without user's interaction (click on close).
*/
property int duration: 0
/*!
\qmlproperty StatusIconSettings StatusToastMessage::icon
This property holds a set of settings for the icon of the ToastMessage.
*/
property StatusIconSettings icon: StatusIconSettings {
width: 23
height: 23
}
/*!
\qmlproperty int StatusToastMessage::type
This property holds the type of the ToastMessage. Values are:
\list
\li Default
\li Success
\endlist
*/
property int type: StatusToastMessage.Type.Default
enum Type {
Default,
Success
}
/*!
\qmlmethod
This function is used to open the ToastMessage setting all its properties.
Examples of usage:
\qml
StatusToastMessage {
id: toastMessage
}
MouseArea {
anchors.fill: parent
onClicked: {
toastMessage.open(qsTr("Verification Request Sent"), "", "checkmark-circle", 1, false,"");
}
}
\endqml
*/
function open(title, subTitle, iconName, type, loading, url) {
root.primaryText = title;
root.secondaryText = subTitle;
@@ -41,12 +125,36 @@ Control {
root.open = true;
}
/*!
\qmlsignal
This signal is emitted when the ToastMessage is closed (after animation).
*/
signal close()
/*!
\qmlsignal
This signal is emitted when the ToastMessage contains a url and this url
is clicked by the user.
*/
signal linkActivated(var link)
QtObject {
id: d
readonly property string openedState: "opened"
readonly property string closedState: "closed"
}
Timer {
interval: root.duration
running: root.duration > 0
onTriggered: {
root.open = false;
}
}
states: [
State {
name: "opened"
name: d.openedState
when: root.open
PropertyChanges {
target: root
@@ -55,16 +163,13 @@ Control {
}
},
State {
name: "closed"
name: d.closedState
when: !root.open
PropertyChanges {
target: root
anchors.rightMargin: -width
opacity: 0.0
}
StateChangeScript {
script: { root.close(); }
}
}
]
@@ -72,6 +177,12 @@ Control {
Transition {
to: "*"
NumberAnimation { properties: "anchors.rightMargin,opacity"; duration: 400 }
onRunningChanged: {
if(!running && state == d.closedState) {
root.close();
}
}
}
]
@@ -114,9 +225,14 @@ Control {
radius: (root.width/2)
color: (root.type === StatusToastMessage.Type.Success) ?
Theme.palette.successColor2 : Theme.palette.primaryColor3
visible: loader.sourceComponent != undefined
Loader {
id: loader
anchors.centerIn: parent
sourceComponent: root.loading ? loadingInd : statusIcon
sourceComponent: root.loading ? loadingInd :
root.icon.name != ""? statusIcon :
undefined
Component {
id: loadingInd
StatusLoadingIndicator {
+33 -2
View File
@@ -6,10 +6,42 @@ import StatusQ.Core 0.1
import StatusQ.Controls 0.1
import StatusQ.Core.Theme 0.1
/*!
\qmltype StatusWizardStepper
\inherits Item
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief Displays a step sequence provided by the stepsModel. Inherits \l{https://doc.qt.io/qt-5/qml-qtquick-item.html}{Item}.
The \c StatusWizardStepper steps and their descriptions as provided by the stepsModel.
For example:
\qml
StatusWizardStepper {
id: wizardStepper
stepsModel: ListModel {
ListElement {description: qsTr("Send Request"); loadingTime: 0; stepCompleted: false}
ListElement {description: qsTr("Receive Response"); loadingTime: 0; stepCompleted: false}
ListElement {description: qsTr("Confirm Identity"); loadingTime: 0; stepCompleted: false}
}
}
\endqml
\image status_wizard_stepper.png
For a list of components available see StatusQ.
*/
Item {
property int maxDuration: 2000
id: wizardWrapper
width: parent.width
height: 56
/*!
\qmlproperty ListModel StatusWizardStepper::stepsModel
This property represents all steps and their descriptions as provided by the user.
*/
property ListModel stepsModel: ListModel { }
ListView {
@@ -35,8 +67,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -12
from: 0
//TODO what is to: here?
to: 2000
to: wizardWrapper.maxDuration
value: loadingTime
backgroundColor: "transparent"
backgroundBorderColor: Theme.palette.primaryColor1
+6
View File
@@ -10,6 +10,7 @@ StatusChatListCategoryItem 0.1 StatusChatListCategoryItem.qml
StatusChatListAndCategories 0.1 StatusChatListAndCategories.qml
StatusChatToolBar 0.1 StatusChatToolBar.qml
StatusContactRequestsIndicatorListItem 0.1 StatusContactRequestsIndicatorListItem.qml
StatusEmoji 0.1 StatusEmoji.qml
StatusContactVerificationIcons 0.1 StatusContactVerificationIcons.qml
StatusDescriptionListItem 0.1 StatusDescriptionListItem.qml
StatusLetterIdenticon 0.1 StatusLetterIdenticon.qml
@@ -23,6 +24,8 @@ StatusRoundIcon 0.1 StatusRoundIcon.qml
StatusRoundedImage 0.1 StatusRoundedImage.qml
StatusMacWindowButtons 0.1 StatusMacWindowButtons.qml
StatusListItemBadge 0.1 StatusListItemBadge.qml
StatusListItemTag 0.1 StatusListItemTag.qml
StatusListPicker 0.1 StatusListPicker.qml
StatusExpandableItem 0.1 StatusExpandableItem.qml
StatusSmartIdenticon 0.1 StatusSmartIdenticon.qml
StatusMessage 0.1 StatusMessage.qml
@@ -30,3 +33,6 @@ StatusMessageDetails 0.1 StatusMessageDetails.qml
StatusTagSelector 0.1 StatusTagSelector.qml
StatusToastMessage 0.1 StatusToastMessage.qml
StatusWizardStepper 0.1 StatusWizardStepper.qml
StatusImageCropPanel 0.1 StatusImageCropPanel.qml
StatusColorSpace 0.0 StatusColorSpace.qml
StatusCommunityCard 0.1 StatusCommunityCard.qml
@@ -26,6 +26,7 @@ Item {
property var assetFound
property double minRequiredAssetBalance: 0
property int dropdownWidth: width
property int chainId: 0
property alias dropdownAlignment: select.menuAlignment
property bool isValid: true
property bool readOnly: false
@@ -46,7 +47,7 @@ Item {
if (showBalanceForAssetSymbol == "" || minRequiredAssetBalance == 0 || !assetFound) {
return root.isValid
}
root.isValid = assetFound.balance >= minRequiredAssetBalance
root.isValid = assetFound.totalBalance >= minRequiredAssetBalance
return root.isValid
}
@@ -55,7 +56,7 @@ Item {
return
}
if (selectedAccount.color) {
selectedIconImg.color = Utils.getThemeAccountColor(selectedAccount.color, Theme.palette.accountColors) || Theme.palette.accountColors[0]
selectedIconImg.color = Utils.getThemeAccountColor(selectedAccount.color, Theme.palette.userCustomizationColors) || Theme.palette.userCustomizationColors[0]
}
if (selectedAccount.name) {
selectedTextField.text = selectedAccount.name
@@ -67,7 +68,7 @@ Item {
textSelectedAddressFiatBalance.text = selectedAccount.currencyBalance + " " + currency.toUpperCase()
}
if (selectedAccount.assets && showBalanceForAssetSymbol) {
assetFound = Utils.findAssetBySymbol(selectedAccount.assets, showBalanceForAssetSymbol)
assetFound = Utils.findAssetByChainAndSymbol(root.chainId, selectedAccount.assets, showBalanceForAssetSymbol)
if (!assetFound) {
console.warn("Cannot find asset '", showBalanceForAssetSymbol, "'. Ensure this asset has been added to the token list.")
}
@@ -82,7 +83,7 @@ Item {
if (!assetFound) {
return
}
txtAssetBalance.text = root.assetBalanceTextFn(assetFound.balance)
txtAssetBalance.text = root.assetBalanceTextFn(assetFound.totalBalance)
txtAssetSymbol.text = " " + assetFound.symbol
}
@@ -208,7 +209,7 @@ Item {
width: 20
height: 20
icon: "filled-account"
color: Utils.getThemeAccountColor(model.color, Theme.palette.accountColors) || Theme.palette.accountColors[0]
color: Utils.getThemeAccountColor(model.color, Theme.palette.userCustomizationColors) || Theme.palette.userCustomizationColors[0]
}
Column {
+4 -4
View File
@@ -116,12 +116,12 @@ Item {
anchors.verticalCenter: parent.verticalCenter
StatusBaseText {
font.pixelSize: 15
text: parseFloat(balance).toFixed(4) + " " + symbol
text: parseFloat(totalBalance).toFixed(4) + " " + symbol
}
StatusBaseText {
font.pixelSize: 15
anchors.right: parent.right
text: getCurrencyBalanceString(currencyBalance)
text: getCurrencyBalanceString(totalCurrencyBalance)
color: Theme.palette.baseColor1
}
}
@@ -130,14 +130,14 @@ Item {
}
Component.onCompleted: {
if(index === 0 ) {
selectedAsset = { name: name, symbol: symbol, address: address, balance: balance, currencyBalance: currencyBalance}
selectedAsset = { name: name, symbol: symbol, totalBalance: totalBalance, totalCurrencyBalance: totalCurrencyBalance}
}
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: itemContainer
onClicked: {
selectedAsset = {name: name, symbol: symbol, address: address, balance: balance, currencyBalance: currencyBalance}
selectedAsset = {name: name, symbol: symbol, totalBalance: totalBalance, totalCurrencyBalance: totalCurrencyBalance}
select.selectMenu.close()
}
}

Some files were not shown because too many files have changed in this diff Show More