Compare commits

...
Author SHA1 Message Date
Alexandra Betouni d9ced073ea feat(StatusQ): Making UI components resizable
Needed for: https://github.com/status-im/status-desktop/issues/6071
2022-06-28 15:00:25 +03:00
Mikhail Rogachev 84c529d58d feat(StatusStackModal): Component to replace nested StausModals (#733) 2022-06-27 12:23:36 -04:00
Noelia fe355eebf8 fix(StatusChatToolBar): Updated activity center button size
Activity center button has now the same size than the other toolbar buttons.

Fixes https://github.com/status-im/status-desktop/issues/6216
2022-06-27 07:52:14 +02:00
Noelia b064f9ebd8 feat(StatusRoundButton): Added Tertiary type
- Transparent background but when hovered, like Primary type in idle state.

- Updated sandbox with the new type.
2022-06-27 07:50:22 +02:00
Sale Djenic 604bb7a74c fix(StatusToastMessage): clicked signal added 2022-06-23 19:52:23 +02:00
Jonathan Rainville 7d064d6c6e chore(StatusFlatRoundButon): fix warning related to hovered property 2022-06-23 11:44:06 -04:00
Noelia 1730fe756d fix(StatusCommunityCard): Added implicit width and height (#739)
Fixes https://github.com/status-im/status-desktop/issues/6206
2022-06-22 16:48:10 -04:00
Igor Sirotin 996717885d feat(icons): Added unpin icon (#738) 2022-06-22 16:47:51 +03:00
Igor Sirotin 34c223b581 feat(StatusListItem): Added loading and loadingFailed properties (#736) 2022-06-22 10:40:17 +03:00
Mikhail Rogachev 7b35be6691 fix(StatusCommunityTag): fix StatusCommunityTag and and ETH icon (#734) 2022-06-20 18:09:38 +03:00
Igor Sirotin 2186259c06 fix(contributing.md): Added Popup sizing guidelines (#728) 2022-06-17 14:37:52 +03:00
Mikhail Rogachev 69b5cb1988 feat(StatusCommunityTags): Add community tags component (#718) 2022-06-14 16:23:18 +03:00
Boris Melnik cb900fe494 feat(StatusQ.Controls): Introduce StatusActivityCenterButton (#705) 2022-06-14 13:01:08 +03:00
Igor Sirotin 1d618f72f7 fix(StatusBaseButton): Passed icon.rotation property to the icon component (#727) 2022-06-14 12:21:53 +03:00
Khushboo-dev-cpp d5df8b42a7 feat(StatusFloatingButtonsSelector): Implements the floating buttons selector widget (#681)
To be used in with StatusModal or independently
2022-06-14 11:07:08 +05:30
Igor Sirotin c0639d8b8e fix(StatusTabButton): Hide bottom dash in disabled state (#729) 2022-06-13 17:53:30 +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
258 changed files with 18926 additions and 2377 deletions
+1
View File
@@ -16,3 +16,4 @@ sandbox/qmlcache_loader.cpp
doc/html
CMakeLists.txt.user
.vscode
build/
+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: 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
*/
+21 -10
View File
@@ -14,9 +14,9 @@ import "demoapp/data" 1.0
Rectangle {
id: demoApp
height: 602
width: 1002
border.width: 1
height: Theme.dp(602)
width: Theme.dp(1002)
border.width: Theme.dp(1)
border.color: Theme.palette.baseColor2
property string titleStyle: "osx"
@@ -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
}
@@ -49,7 +50,7 @@ Rectangle {
StatusMacTrafficLights {
anchors.left: parent.left
anchors.top: parent.top
anchors.margins: 13
anchors.margins: Theme.dp(13)
z: statusAppLayout.z + 1
visible: titleStyle === "osx"
}
@@ -111,13 +112,18 @@ Rectangle {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
onClicked: {
if(model.sectionType === appSectionType.chat)
{
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
@@ -137,7 +143,7 @@ Rectangle {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
onClicked: {
if(model.sectionType === appSectionType.community)
{
@@ -169,7 +175,7 @@ Rectangle {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
icon.width: Theme.dp(14)
iconRotation: 180
type: StatusMenuItem.Type.Danger
}
@@ -205,6 +211,11 @@ Rectangle {
StatusAppProfileSettingsView { }
}
Component {
id: statusCommunityPortalView
StatusAppCommunitiesPortalView { }
}
DemoContactRequestsModal {
id: demoContactRequestsModal
anchors.centerIn: parent
+8 -4
View File
@@ -2,11 +2,14 @@ import QtQuick 2.14
import QtQuick.Controls 2.14
import StatusQ.Controls 0.1
import StatusQ.Core.Theme 0.1
Item {
id: themeSwitchWrapper
signal checkedChanged()
property alias lightThemeEnabled: switchControl.checked
width: themeSwitch.width
height: themeSwitch.height
@@ -17,28 +20,29 @@ Item {
Row {
id: themeSwitch
spacing: 2
spacing: Theme.dp(2)
Text {
text: "🌤"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
anchors.verticalCenter: parent.verticalCenter
}
StatusSwitch {
id: switchControl
onCheckedChanged: themeSwitchWrapper.checkedChanged()
StatusToolTip {
text: "Toggle Theme"
visible: sensor.containsMouse
orientation: StatusToolTip.Orientation.Bottom
y: themeSwitchWrapper.y + 16
y: themeSwitchWrapper.y + Theme.dp(16)
}
}
Text {
text: "🌙"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
anchors.verticalCenter: parent.verticalCenter
}
}
+51 -23
View File
@@ -3,16 +3,17 @@ 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
spacing: Theme.dp(10)
Grid {
id: buttonGridWidth
columns: 3
columnSpacing: 38
rowSpacing: 10
columns: Theme.dp(3)
columnSpacing: Theme.dp(38)
rowSpacing: Theme.dp(10)
horizontalItemAlignment: Grid.AlignHCenter
@@ -173,25 +174,44 @@ Column {
loading: true
}
// transparent
StatusRoundButton {
type: StatusRoundButton.Type.Tertiary
icon.name: "info"
}
StatusRoundButton {
type: StatusRoundButton.Type.Tertiary
icon.name: "info"
enabled: false
}
StatusRoundButton {
type: StatusRoundButton.Type.Tertiary
icon.name: "info"
loading: true
}
// Rounded blue
StatusFlatRoundButton {
width: 44
height: 44
width: Theme.dp(44)
height: Theme.dp(44)
icon.name: "info"
}
StatusFlatRoundButton {
width: 44
height: 44
width: Theme.dp(44)
height: Theme.dp(44)
icon.name: "info"
enabled: false
}
StatusFlatRoundButton {
width: 44
height: 44
width: Theme.dp(44)
height: Theme.dp(44)
icon.name: "info"
loading: true
}
@@ -200,24 +220,24 @@ Column {
StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary
width: 44
height: 44
width: Theme.dp(44)
height: Theme.dp(44)
icon.name: "info"
}
StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary
width: 44
height: 44
width: Theme.dp(44)
height: Theme.dp(44)
icon.name: "info"
enabled: false
}
StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary
width: 44
height: 44
width: Theme.dp(44)
height: Theme.dp(44)
icon.name: "info"
loading: true
}
@@ -307,12 +327,20 @@ 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;
}
}
// Button with emoji
StatusButton {
text: "Button with Emoji"
icon.emoji: "🖼️"
}
}
+31 -21
View File
@@ -9,22 +9,22 @@ import Sandbox 0.1
GridLayout {
columns: 1
columnSpacing: 5
rowSpacing: 5
columnSpacing: Theme.dp(5)
rowSpacing: Theme.dp(5)
StatusSelectableText {
color: Theme.palette.baseColor1
text: "This is a multiline paragraph that can be selected and copied. A paragraph is a group of words put together to form a group that is usually longer than a sentence. Paragraphs are often made up of several sentences. There are usually between three and eight sentences. Paragraphs can begin with an indentation (about five spaces), or by missing a line out, and then starting again."
font.pixelSize: 15
width: 300
font.pixelSize: Theme.dp(15)
width: Theme.dp(300)
multiline: true
}
StatusSelectableText {
color: Theme.palette.baseColor1
text: "<p>This is a selectable link in rich text format to test <a href='www.google.com'>www.google.com</a></p>"
font.pixelSize: 15
width: 200
font.pixelSize: Theme.dp(15)
width: Theme.dp(200)
}
StatusIconTabButton {
@@ -57,21 +57,21 @@ GridLayout {
visible: parent.hovered
text: "Right"
orientation: StatusToolTip.Orientation.Right
x: parent.width + 16
x: parent.width + Theme.dp(16)
y: parent.height / 2 - height / 2 + 4
}
StatusToolTip {
visible: parent.hovered
text: "Bottom"
orientation: StatusToolTip.Orientation.Bottom
y: parent.height + 12
y: parent.height + Theme.dp(12)
}
StatusToolTip {
visible: parent.hovered
text: "Left"
orientation: StatusToolTip.Orientation.Left
x: -parent.width /2 -8
y: parent.height / 2 - height / 2 + 4
x: -parent.width /2 - Theme.dp(8)
y: parent.height / 2 - height / 2 + Theme.dp(4)
}
}
@@ -95,7 +95,7 @@ GridLayout {
tooltip.text: "Profile"
badge.value: 0
badge.visible: true
badge.anchors.leftMargin:-16
badge.anchors.leftMargin:-Theme.dp(16)
}
StatusNavBarTabButton {
@@ -131,8 +131,8 @@ GridLayout {
}
Item {
implicitWidth: 100
implicitHeight: 48
implicitWidth: Theme.dp(100)
implicitHeight: Theme.dp(48)
StatusChatInfoButton {
title: "Iuri Matias elided"
subTitle: "Contact"
@@ -141,13 +141,13 @@ GridLayout {
type: StatusChatInfoButton.Type.OneToOneChat
muted: true
pinnedMessagesCount: 1
width: 100
width: Theme.dp(100)
}
}
Item {
implicitWidth: 100
implicitHeight: 48
implicitWidth: Theme.dp(100)
implicitHeight: Theme.dp(48)
StatusChatInfoButton {
title: "Iuri Matias big not elided"
subTitle: "Contact"
@@ -156,7 +156,7 @@ GridLayout {
type: StatusChatInfoButton.Type.OneToOneChat
muted: true
pinnedMessagesCount: 1
width: 400
width: Theme.dp(400)
}
}
@@ -183,22 +183,32 @@ GridLayout {
}
StatusSlider {
width: 360
width: Theme.dp(360)
from: 0
to: 100
value: 40
}
StatusLabeledSlider {
width: Theme.dp(360)
model: [ qsTr("XS"), qsTr("S"), qsTr("M"), qsTr("L"), qsTr("XL"), qsTr("XXL")]
}
StatusLabeledSlider {
width: Theme.dp(360)
model: [ qsTr("50%"), qsTr("100%"), qsTr("150%"), qsTr("200%")]
}
StatusBanner {
id: banner
width: 360
topPadding: 20
width: Theme.dp(360)
topPadding: Theme.dp(20)
type: StatusBanner.Type.Danger
statusText: "Banner"
}
StatusProgressBar {
id: progressBar
id: progressBar
text: "Weak"
value: 0.5
fillColor : Theme.palette.pinColor1
+3 -2
View File
@@ -1,11 +1,12 @@
import QtQuick 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
GridLayout {
columns: 6
columnSpacing: 5
rowSpacing: 5
columnSpacing: Theme.dp(5)
rowSpacing: Theme.dp(5)
property color iconColor
Repeater {
+99 -34
View File
@@ -10,31 +10,96 @@ import StatusQ.Layout 0.1
import StatusQ.Popups 0.1
Column {
spacing: 5
spacing: Theme.dp(10)
StatusChatToolBar {
chatInfoButton.title: "Some contact"
chatInfoButton.subTitle: "Contact"
chatInfoButton.icon.color: Theme.palette.miscColor7
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
toolbarComponent: chatInfoButton1
width: Theme.dp(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: Theme.dp(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: Theme.dp(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: Theme.dp(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 {
@@ -42,6 +107,8 @@ Column {
Button {
id: btn
text: "Append"
width: Theme.dp(100)
height: Theme.dp(40)
onClicked: {
buttons.append({
name: "Test community",
@@ -77,7 +144,7 @@ Column {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
}
}
@@ -120,7 +187,7 @@ Column {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
}
communityNavBarButton: StatusNavBarTabButton {
@@ -134,7 +201,7 @@ Column {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
popupMenu: StatusPopupMenu {
@@ -159,7 +226,7 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
icon.width: Theme.dp(14)
iconRotation: 180
type: StatusMenuItem.Type.Danger
}
@@ -205,7 +272,7 @@ Column {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
}
communityNavBarButton: StatusNavBarTabButton {
@@ -219,7 +286,7 @@ Column {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
popupMenu: StatusPopupMenu {
@@ -244,8 +311,8 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.width: Theme.dp(14)
iconRotation: Theme.dp(180)
type: StatusMenuItem.Type.Danger
}
}
@@ -295,7 +362,7 @@ Column {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
}
communityNavBarButton: StatusNavBarTabButton {
@@ -309,7 +376,7 @@ Column {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
popupMenu: StatusPopupMenu {
@@ -334,8 +401,8 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.width: Theme.dp(14)
iconRotation: Theme.dp(180)
type: StatusMenuItem.Type.Danger
}
}
@@ -390,7 +457,7 @@ Column {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
}
communityNavBarButton: StatusNavBarTabButton {
@@ -404,7 +471,7 @@ Column {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
popupMenu: StatusPopupMenu {
@@ -429,15 +496,13 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.width: Theme.dp(14)
iconRotation: Theme.dp(180)
type: StatusMenuItem.Type.Danger
}
}
}
}
}
}
+73 -15
View File
@@ -4,11 +4,12 @@ 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
columnSpacing: 5
rowSpacing: 5
columnSpacing: Theme.dp(5)
rowSpacing: Theme.dp(5)
StatusNavigationListItem {
title: "Menu Item"
@@ -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
@@ -155,7 +156,7 @@ GridLayout {
subTitle: "Subtitle"
tertiaryTitle: "Tertiary title"
statusListItemTitle.font.pixelSize: 17
statusListItemTitle.font.pixelSize: Theme.dp(17)
statusListItemTitle.font.weight: Font.Bold
}
@@ -165,7 +166,7 @@ GridLayout {
tertiaryTitle: "Tertiary title"
icon.name: "info"
statusListItemTitle.font.pixelSize: 17
statusListItemTitle.font.pixelSize: Theme.dp(17)
statusListItemTitle.font.weight: Font.Bold
}
@@ -338,12 +339,30 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
}
}
StatusListItem {
title: "List Item with Inline Tags"
icon.isLetterIdenticon: true
tagsModel : 2
tagsDelegate: StatusListItemTag {
color: "blue"
height: Theme.dp(24)
radius: Theme.dp(6)
closeButtonVisible: false
icon.emoji: "😁"
icon.emojiSize: Emoji.size.verySmall
icon.isLetterIdenticon: true
title: "helloworld.eth"
titleText.font.pixelSize: Theme.dp(12)
titleText.color: Theme.palette.indirectColor1
}
}
StatusListItem {
title: "List Item with Emoji"
subTitle: "Emoji"
icon.emoji: "😁"
icon.color: "yellow"
icon.letterSize: 14
icon.letterSize: Theme.dp(14)
icon.isLetterIdenticon: true
}
@@ -375,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}
@@ -397,23 +416,62 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
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
}
StatusBaseText {
Layout.fillWidth: true
Layout.topMargin: 16
text: "Loading features:"
font.pixelSize: 17
}
StatusListItem {
title: "Nokia 3310"
subTitle: "Incoming device"
label: "loading: true"
icon.emoji: "😁"
icon.color: "hotpink"
icon.letterSize: 14
icon.isLetterIdenticon: true
loading: true
}
StatusListItem {
title: "Nokia 3310"
subTitle: "Device"
label: "loadingFailed: true"
icon.emoji: "😁"
icon.color: "hotpink"
icon.letterSize: 14
icon.isLetterIdenticon: true
loadingFailed: 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: Theme.dp(5)
rowSpacing: Theme.dp(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: Theme.dp(16)
}
}
}
}
+79 -23
View File
@@ -4,9 +4,12 @@ import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Components 0.1
import StatusQ.Popups 0.1
import StatusQ.Core.Utils 0.1
Column {
spacing: 20
spacing: Theme.dp(20)
StatusButton {
text: "Simple modal"
@@ -83,6 +86,12 @@ Column {
onClicked: advancedHeaderFooterModal.open()
}
StatusButton {
text: "Modal with Floating header Buttons"
onClicked: floatingHeaderModal.open()
}
StatusModal {
id: simpleModal
anchors.centerIn: parent
@@ -135,11 +144,11 @@ Column {
headerActionButton: StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary
width: 32
height: 32
width: Theme.dp(32)
height: Theme.dp(32)
icon.width: 20
icon.height: 20
icon.width: Theme.dp(20)
icon.height: Theme.dp(20)
icon.name: "info"
}
@@ -184,17 +193,17 @@ Column {
contentItem: StatusBaseText {
anchors.centerIn: parent
text: "Some text content"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.directColor1
}
headerActionButton: StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary
width: 32
height: 32
width: Theme.dp(32)
height: Theme.dp(32)
icon.width: 20
icon.height: 20
icon.width: Theme.dp(20)
icon.height: Theme.dp(20)
icon.name: "info"
}
}
@@ -209,7 +218,7 @@ Column {
id: text
anchors.centerIn: parent
text: "Some text content"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.directColor1
}
@@ -234,7 +243,7 @@ Column {
contentItem: StatusBaseText {
anchors.centerIn: parent
text: "Some text content"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.directColor1
}
@@ -260,7 +269,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
contentItem: StatusBaseText {
anchors.centerIn: parent
text: "Some text content"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.directColor1
}
@@ -287,7 +296,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
contentItem: StatusBaseText {
anchors.centerIn: parent
text: "Some text content"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.directColor1
}
@@ -314,7 +323,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
contentItem: StatusBaseText {
anchors.centerIn: parent
text: "Some text content"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.directColor1
}
@@ -365,39 +374,86 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
showFooter: false
showAdvancedHeader: true
showAdvancedFooter: true
height: 200
height: Theme.dp(200)
advancedHeaderComponent: Rectangle {
width: parent.width
height: 50
height: Theme.dp(50)
color: Theme.palette.baseColor1
border.width: 1
border.width: Theme.dp(1)
StatusBaseText {
anchors.centerIn: parent
text: "Add any header here"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.directColor1
}
}
advancedFooterComponent: Rectangle {
width: parent.width
height: 50
height: Theme.dp(50)
color: Theme.palette.baseColor1
border.width: 1
border.width: Theme.dp(1)
StatusBaseText {
anchors.centerIn: parent
text: "Add any footer here"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.directColor1
}
}
}
StatusModal {
id: floatingHeaderModal
anchors.centerIn: parent
height: Theme.dp(200)
showHeader: false
showFooter: false
showAdvancedHeader: true
hasFloatingButtons: true
advancedHeaderComponent: StatusFloatingButtonsSelector {
id: floatingHeader
model: dummyAccountsModel
delegate: Rectangle {
width: button.width
height: button.height
radius: Theme.dp(8)
visible: visibleIndices.includes(index)
StatusButton {
id: button
topPadding: Theme.dp(8)
bottomPadding: 0
implicitHeight: Theme.dp(32)
defaultLeftPadding: Theme.dp(4)
text: name
icon.emoji: !!emoji ? emoji: ""
icon.emojiSize: Emoji.size.middle
icon.name: !emoji ? "filled-account": ""
normalColor: "transparent"
highlighted: index === floatingHeader.currentIndex
onClicked: {
floatingHeader.currentIndex = index
}
}
}
popupMenuDelegate: StatusListItem {
implicitWidth: Theme.dp(272)
title: name
onClicked: floatingHeader.itemSelected(index)
visible: !visibleIndices.includes(index)
}
}
}
ListModel {
id: dummyAccountsModel
ListElement{name: "Account 1"; iconName: "filled-account"}
ListElement{name: "Account 1"; iconName: "filled-account"; emoji: "🥑"}
ListElement{name: "Account 2"; iconName: "filled-account"}
ListElement{name: "Account 3"; iconName: "filled-account"}
ListElement{name: "Account 4"; iconName: "filled-account"}
ListElement{name: "Account 5"; iconName: "filled-account"}
ListElement{name: "Account 6"; iconName: "filled-account"}
ListElement{name: "Account 7"; iconName: "filled-account"}
}
StatusSpellcheckingMenuItems {
+13 -13
View File
@@ -12,7 +12,7 @@ import StatusQ.Core.Theme 0.1
ListView {
id: messageList
anchors.fill: parent
anchors.margins: 15
anchors.margins: Theme.dp(15)
clip: true
delegate: StatusMessage {
id: delegate
@@ -34,8 +34,8 @@ ListView {
secondaryName: model.localName !== "" && model.ensName.startsWith("@") ? model.ensName: ""
chatID: model.chatKey
profileImage: StatusImageSettings {
width: 40
height: 40
width: Theme.dp(40)
height: Theme.dp(40)
source: model.profileImage
isIdenticon: model.isIdenticon
}
@@ -55,8 +55,8 @@ ListView {
amISender: model.isReply ? model.replyAmISender : ""
displayName: model.isReply ? model.replySenderName: ""
profileImage: StatusImageSettings {
width: 20
height: 20
width: Theme.dp(20)
height: Theme.dp(20)
source: model.isReply ? model.replyProfileImage: ""
isIdenticon: model.isReply ? model.replyIsIdenticon: ""
}
@@ -67,23 +67,23 @@ ListView {
quickActions: [
StatusFlatRoundButton {
id: emojiBtn
width: 32
height: 32
width: Theme.dp(32)
height: Theme.dp(32)
icon.name: "reaction-b"
type: StatusFlatRoundButton.Type.Tertiary
tooltip.text: "Add reaction"
},
StatusFlatRoundButton {
id: replyBtn
width: 32
height: 32
width: Theme.dp(32)
height: Theme.dp(32)
icon.name: "reply"
type: StatusFlatRoundButton.Type.Tertiary
tooltip.text: "Reply"
},
StatusFlatRoundButton {
width: 32
height: 32
width: Theme.dp(32)
height: Theme.dp(32)
icon.name: "tiny/edit"
type: StatusFlatRoundButton.Type.Tertiary
tooltip.text: "Edit"
@@ -93,8 +93,8 @@ ListView {
},
StatusFlatRoundButton {
id: otherBtn
width: 32
height: 32
width: Theme.dp(32)
height: Theme.dp(32)
icon.name: "more"
type: StatusFlatRoundButton.Type.Tertiary
tooltip.text: "More"
+43 -7
View File
@@ -10,7 +10,7 @@ import StatusQ.Core.Theme 0.1
Page {
id: root
anchors.fill: parent
anchors.margins: 16
anchors.margins: Theme.dp(16)
property ListModel contactsModel: null
background: null
@@ -19,25 +19,61 @@ Page {
width: parent.width
height: tagSelector.height
anchors.right: parent.right
anchors.rightMargin: 8
anchors.rightMargin: Theme.dp(8)
StatusTagSelector {
id: tagSelector
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.leftMargin: 17
Layout.leftMargin: Theme.dp(17)
maxHeight: root.height
toLabelText: qsTr("To: ")
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 {
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: { sortModel(root.contactsModel); }
Component.onCompleted: {
textEdit.forceActiveFocus();
sortModel(root.contactsModel);
}
}
StatusButton {
implicitHeight: 44
implicitHeight: Theme.dp(44)
Layout.alignment: Qt.AlignTop
enabled: (tagSelector.namesModel.count > 0)
text: "Confirm"
@@ -46,14 +82,14 @@ Page {
contentItem: Item {
anchors.fill: parent
anchors.topMargin: 68
anchors.topMargin: Theme.dp(68)
StatusBaseText {
visible: (contactsModel.count === 0)
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.baseColor1
text: qsTr("You can only send direct messages to your Contacts. \n\n
Send a contact request to the person you would like to chat with, you will be\n able to
+15 -15
View File
@@ -19,24 +19,24 @@ StatusModal {
width: root.width
StatusModalDivider {
bottomPadding: 8
bottomPadding: Theme.dp(8)
}
StatusBaseText {
text: "A community of cat lovers, meow!"
verticalAlignment: Text.AlignVCenter
font.pixelSize: 15
height: 46
font.pixelSize: Theme.dp(15)
height: Theme.dp(46)
color: Theme.palette.directColor1
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
anchors.rightMargin: 16
anchors.leftMargin: Theme.dp(16)
anchors.rightMargin: Theme.dp(16)
}
StatusModalDivider {
topPadding: 8
bottomPadding: 8
topPadding: Theme.dp(8)
bottomPadding: Theme.dp(8)
}
StatusDescriptionListItem {
@@ -49,13 +49,13 @@ StatusModal {
}
StatusModalDivider {
topPadding: 8
bottomPadding: 8
topPadding: Theme.dp(8)
bottomPadding: Theme.dp(8)
}
StatusListItem {
anchors.horizontalCenter: parent.horizontalCenter
statusListItemTitle.font.pixelSize: 17
statusListItemTitle.font.pixelSize: Theme.dp(17)
title: "Members"
icon.name: "group-chat"
label: "184"
@@ -79,13 +79,13 @@ StatusModal {
}
StatusModalDivider {
topPadding: 8
bottomPadding: 8
topPadding: Theme.dp(8)
bottomPadding: Theme.dp(8)
}
StatusListItem {
anchors.horizontalCenter: parent.horizontalCenter
statusListItemTitle.font.pixelSize: 17
statusListItemTitle.font.pixelSize: Theme.dp(17)
title: "Edit community"
icon.name: "edit"
type: StatusListItem.Type.Secondary
@@ -93,7 +93,7 @@ StatusModal {
StatusListItem {
anchors.horizontalCenter: parent.horizontalCenter
statusListItemTitle.font.pixelSize: 17
statusListItemTitle.font.pixelSize: Theme.dp(17)
title: "Transfer ownership"
icon.name: "exchange"
type: StatusListItem.Type.Secondary
@@ -101,7 +101,7 @@ StatusModal {
StatusListItem {
anchors.horizontalCenter: parent.horizontalCenter
statusListItemTitle.font.pixelSize: 17
statusListItemTitle.font.pixelSize: Theme.dp(17)
title: "Leave community"
icon.name: "arrow-right"
icon.rotation: 180
+5 -5
View File
@@ -11,18 +11,18 @@ StatusModal {
header.title: "Contact Requests"
headerActionButton: StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary
width: 32
height: 32
width: Theme.dp(32)
height: Theme.dp(32)
icon.width: 20
icon.height: 20
icon.width: Theme.dp(20)
icon.height: Theme.dp(20)
icon.name: "notification"
}
contentItem: StatusBaseText {
anchors.centerIn: parent
text: "Contact request will be shown here"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
color: Theme.palette.directColor1
}
+37 -34
View File
@@ -20,28 +20,26 @@ StatusAppThreePanelLayout {
StatusNavigationPanelHeadline {
id: headline
anchors.top: parent.top
anchors.topMargin: 16
anchors.topMargin: Theme.dp(16)
anchors.horizontalCenter: parent.horizontalCenter
text: "Chat"
}
RowLayout {
id: searchInputWrapper
width: parent.width
width: Theme.dp(288)
height: searchInput.height
anchors.top: headline.bottom
anchors.topMargin: 16
anchors.right: parent.right
anchors.rightMargin: 8
anchors.topMargin: Theme.dp(16)
anchors.horizontalCenter: parent.horizontalCenter
StatusBaseInput {
id: searchInput
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
Layout.leftMargin: 17
implicitHeight: 36
topPadding: 8
bottomPadding: 0
Layout.alignment: Qt.AlignVCenter
implicitHeight: Theme.dp(36)
topPadding: Theme.dp(8)
bottomPadding: Theme.dp(8)
placeholderText: "Search"
icon.name: "search"
}
@@ -60,9 +58,9 @@ StatusAppThreePanelLayout {
Column {
anchors.top: searchInputWrapper.bottom
anchors.topMargin: 16
width: parent.width
spacing: 8
anchors.topMargin: Theme.dp(16)
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.dp(8)
StatusContactRequestsIndicatorListItem {
anchors.horizontalCenter: parent.horizontalCenter
@@ -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
@@ -184,11 +174,24 @@ StatusAppThreePanelLayout {
StatusMenuItem {
text: "Leave Chat"
icon.name: "arrow-right"
icon.width: 14
icon.width: Theme.dp(14)
iconRotation: 180
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: Theme.dp(70)
property int layoutHMargin: Theme.dp(64)
property int titlePixelSize: Theme.dp(28)
property int subtitlePixelSize: Theme.dp(17)
property int stylePadding: Theme.dp(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: Theme.dp(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: Theme.dp(1234) // by design
spacing: d.stylePadding/2
Repeater {
model: d.tagsModel
delegate: StatusListItemTag {
border.color: Theme.palette.baseColor2
color: "transparent"
height: Theme.dp(32)
radius: Theme.dp(36)
closeButtonVisible: false
icon.emoji: model.emoji
icon.height: Theme.dp(32)
icon.width: icon.heights
icon.color: "transparent"
icon.isLetterIdenticon: true
title: model.name
titleText.font.pixelSize: Theme.dp(15)
titleText.color: Theme.palette.primaryColor1
}
}
}
StatusBaseText {
Layout.leftMargin: d.layoutHMargin
Layout.topMargin: Theme.dp(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: Theme.dp(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) }
}
}
}
}
}
+32 -24
View File
@@ -63,7 +63,7 @@ StatusAppThreePanelLayout {
id: scrollView
anchors.top: statusChatInfoToolBar.bottom
anchors.topMargin: 8
anchors.topMargin: Theme.dp(8)
anchors.bottom: parent.bottom
width: leftPanel.width
@@ -73,7 +73,7 @@ StatusAppThreePanelLayout {
StatusChatListAndCategories {
id: communityCategories
width: leftPanel.width
height: implicitHeight > (leftPanel.height - 64) ? implicitHeight + 8 : leftPanel.height - 64
height: implicitHeight > (leftPanel.height - Theme.dp(64)) ? implicitHeight + Theme.dp(8) : leftPanel.height - Theme.dp(64)
draggableItems: true
draggableCategories: false
@@ -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 {
@@ -239,35 +248,34 @@ StatusAppThreePanelLayout {
anchors.topMargin:16
anchors.left: parent.left
anchors.leftMargin: 16
opacity: (rightPanel.width > 50) ? 1.0 : 0.0
opacity: (rightPanel.width > Theme.dp(50)) ? 1.0 : 0.0
visible: (opacity > 0.1)
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
text: qsTr("Members")
}
ListView {
anchors.top: titleText.bottom
anchors.topMargin: 16
anchors.topMargin: Theme.dp(16)
anchors.left: parent.left
anchors.leftMargin: 8
anchors.leftMargin: Theme.dp(8)
anchors.right: parent.right
anchors.rightMargin: 8
anchors.rightMargin: Theme.dp(8)
anchors.bottom: parent.bottom
anchors.bottomMargin: 16
anchors.bottomMargin: Theme.dp(16)
boundsBehavior: Flickable.StopAtBounds
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
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
}
}
}
@@ -16,14 +16,14 @@ StatusAppTwoPanelLayout {
StatusNavigationPanelHeadline {
id: profileHeadline
anchors.top: parent.top
anchors.topMargin: 16
anchors.topMargin: Theme.dp(16)
anchors.horizontalCenter: parent.horizontalCenter
text: "Profile"
}
ScrollView {
anchors.top: profileHeadline.bottom
anchors.topMargin: 16
anchors.topMargin: Theme.dp(16)
anchors.bottom: parent.bottom
width: parent.width
@@ -34,7 +34,7 @@ StatusAppTwoPanelLayout {
Column {
id: profileMenuItems
anchors.horizontalCenter: parent.horizontalCenter
spacing: 4
spacing: Theme.dp(4)
Repeater {
model: Models.demoProfileGeneralMenuItems
@@ -56,7 +56,7 @@ StatusAppTwoPanelLayout {
Item {
id: invisibleSeparator
height: 16
height: Theme.dp(16)
width: parent.width
}
+548 -120
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,69 +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
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
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
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
}
}
@@ -1019,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: ""
@@ -1031,7 +972,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
}
ListElement {
sectionId: "browser"
sectionType: 3
sectionType: 4
name: "Browser"
active: false
image: ""
@@ -1052,4 +993,491 @@ 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: "👻"}
}
property var communityTags :{"Activism":"✊","Art":"🎨","Blockchain":"🔗","Books & blogs":"📚","Career":"💼","Collaboration":"🤝","Commerce":"🛒","Crypto":"Ξ","Culture":"🎎","DAO":"🚀","DIY":"🔨","DeFi":"📈","Design":"🧩","Education":"🎒","Entertainment":"🍿","Environment":"🌿","Event":"🗓","Fantasy":"🧙‍♂️","Fashion":"🧦","Food":"🌶","Gaming":"🎮","Global":"🌍","Health":"🧠","Hobby":"📐","Innovation":"🧪","Language":"📜","Lifestyle":"✨","Local":"📍","Love":"❤️","Markets":"💎","Movies & TV":"🎞","Music":"🎶","NFT":"🖼","NSFW":"🍆","News":"🗞","Non-profit":"🙏","Org":"🏢","Pets":"🐶","Play":"🎲","Podcast":"🎙️","Politics":"🗳️","Privacy":"👻","Product":"🍱","Psyche":"🍁","Security":"🔒","Social":"☕","Software dev":"👩‍💻","Sports":"⚽️","Tech":"📱","Travel":"🗺","Vehicles":"🚕","Web3":"🌐"}
}
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();
+101 -47
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
@@ -11,15 +13,14 @@ import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Layout 0.1
import StatusQ.Platform 0.1
import StatusQ.Core.Utils 0.1
import "demoapp/data" 1.0
StatusWindow {
id: rootWindow
width: Qt.platform.os == "ios" || Qt.platform.os == "android" ? Screen.width
: 1224
height: Qt.platform.os == "ios" || Qt.platform.os == "android" ? Screen.height
:840
width: Theme.screenWidth
height: Theme.screenHeight
visible: true
title: qsTr("StatusQ Documentation App")
@@ -31,10 +32,7 @@ StatusWindow {
property real factor: 1.0
Component.onCompleted: {
Theme.palette = lightTheme
rootWindow.updatePosition();
}
Component.onCompleted: rootWindow.updatePosition()
QtObject {
id: appSectionType
@@ -60,6 +58,11 @@ StatusWindow {
}
}
readonly property real scaleRatio: Math.min(rootWindow.width / Theme.screenWidth, rootWindow.height / Theme.screenHeight)
onScaleRatioChanged: {
Theme.scaleFactor = scaleRatio;
}
StatusAppLayout {
id: appLayout
anchors.fill: parent
@@ -82,7 +85,7 @@ StatusWindow {
badge.value: model.notificationsCount
badge.visible: model.hasNotification
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
badge.border.width: 2
badge.border.width: Theme.dp(2)
onClicked: {
stackView.clear()
if(model.sectionType === appSectionType.apiDocumentation)
@@ -107,15 +110,13 @@ StatusWindow {
ThemeSwitch {
anchors.top: parent.top
anchors.topMargin: 32
anchors.topMargin: Theme.dp(32)
anchors.right: parent.right
anchors.rightMargin: 32
onCheckedChanged: {
if (Theme.palette === rootWindow.lightTheme) {
Theme.palette = rootWindow.darkTheme
} else {
Theme.palette = rootWindow.lightTheme
}
anchors.rightMargin: Theme.dp(32)
lightThemeEnabled: storeSettings.lightTheme
onLightThemeEnabledChanged: {
Theme.palette = lightThemeEnabled ? rootWindow.darkTheme : rootWindow.lightTheme
storeSettings.lightTheme = lightThemeEnabled
}
}
}
@@ -126,11 +127,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 {
@@ -139,87 +142,92 @@ StatusWindow {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
contentHeight: navigation.height + 56
contentHeight: navigation.height + Theme.dp(56)
contentWidth: navigation.width
clip: true
Column {
id: navigation
anchors.top: parent.top
anchors.topMargin: 48
anchors.topMargin: Theme.dp(48)
anchors.horizontalCenter: parent.horizontalCenter
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 +243,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 +283,23 @@ 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);
}
StatusNavigationListItem {
title: "StatusCommunityTags"
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);
@@ -298,6 +321,16 @@ StatusWindow {
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);
}
}
}
}
@@ -305,8 +338,11 @@ StatusWindow {
rightPanel: Item {
id: rightPanel
anchors.fill: parent
ScrollView {
visible: !storeSettings.fillPage
anchors.fill: parent
anchors.topMargin: Theme.dp(64)
contentHeight: (pageWrapper.height + pageWrapper.anchors.topMargin) * rootWindow.factor
contentWidth: (pageWrapper.width * rootWindow.factor)
clip: true
@@ -315,14 +351,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;
}
@@ -330,6 +368,15 @@ StatusWindow {
}
}
}
Loader {
active: storeSettings.fillPage
anchors.fill: parent
anchors.topMargin: Theme.dp(64)
visible: storeSettings.fillPage
clip: true
source: viewLoader.source
}
}
}
}
@@ -368,12 +415,12 @@ StatusWindow {
id: platformSwitch
anchors.left: demoApp.left
anchors.bottom: demoApp.top
anchors.bottomMargin: 20
spacing: 2
anchors.bottomMargin: Theme.dp(20)
spacing: Theme.dp(2)
Text {
text: "OSX"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
anchors.verticalCenter: parent.verticalCenter
}
@@ -389,7 +436,7 @@ StatusWindow {
Text {
text: "Win"
font.pixelSize: 15
font.pixelSize: Theme.dp(15)
anchors.verticalCenter: parent.verticalCenter
}
}
@@ -401,8 +448,8 @@ StatusWindow {
anchors.fill: demoApp
source: demoApp
horizontalOffset: 0
verticalOffset: 5
radius: 20
verticalOffset: Theme.dp(5)
radius: Theme.dp(20)
samples: 20
color: "#22000000"
}
@@ -412,7 +459,7 @@ StatusWindow {
StatusMacTrafficLights {
anchors.left: parent.left
anchors.top: parent.top
anchors.margins: 13
anchors.margins: Theme.dp(13)
visible: Qt.platform.os == "osx"
@@ -447,4 +494,11 @@ StatusWindow {
rootWindow.toggleFullScreen()
}
}
Settings {
id: storeSettings
property string selected: ""
property bool lightTheme: true
property bool fillPage: false
}
}
+2 -2
View File
@@ -7,10 +7,10 @@ import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Core.Utils 0.1
Column {
spacing: 8
spacing: Theme.dp(8)
StatusAccountSelector {
id: accountSelector
+2 -1
View File
@@ -2,6 +2,7 @@ import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1
import Sandbox 0.1
@@ -14,7 +15,7 @@ Column {
}
Item {
width: 200
width: Theme.dp(200)
height: childrenRect.height
StatusAddress {
text: "0x9ce0056c5fc6bb9459a4dcfa35eaad8c1fee5ce9"
+2 -2
View File
@@ -8,8 +8,8 @@ import StatusQ.Popups 0.1
GridLayout {
columns: 1
columnSpacing: 5
rowSpacing: 5
columnSpacing: Theme.dp(5)
rowSpacing: Theme.dp(5)
StatusChatInfoToolBar {
chatInfoButton.title: "Cryptokitties"
@@ -6,20 +6,20 @@ import StatusQ.Core.Theme 0.1
Item {
id: root
width: 800
height: 100
width: Theme.dp(800)
height: Theme.dp(100)
Row {
id: selectedColor
anchors.top: parent.top
anchors.left: colorSelectionGrid.left
spacing: 10
spacing: Theme.dp(10)
StatusBaseText {
text: "SelectedColor is"
}
Rectangle {
width: 100
height: 20
width: Theme.dp(100)
height: Theme.dp(20)
radius: width/2
color: colorSelectionGrid.selectedColor
}
@@ -28,7 +28,7 @@ Item {
StatusColorSelectorGrid {
id: colorSelectionGrid
anchors.top: selectedColor.bottom
anchors.topMargin: 10
anchors.topMargin: Theme.dp(10)
anchors.horizontalCenter: parent.horizontalCenter
titleText: "COLOR"
selectedColorIndex: 2
+1 -1
View File
@@ -9,7 +9,7 @@ import StatusQ.Controls 0.1
import Sandbox 0.1
Column {
spacing: 8
spacing: Theme.dp(8)
StatusColorSelector {
model: ["red", "blue", "green"]
+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: Theme.dp(48)
radius: Theme.dp(10)
Layout.fillWidth: true
StatusBaseText {
anchors.centerIn: parent
color: Theme.palette.white
font.pixelSize: Theme.dp(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)
}
}
}
+48
View File
@@ -0,0 +1,48 @@
import QtQuick 2.0
import QtQuick.Layouts 1.13
import StatusQ.Components 0.1
import StatusQ.Core.Theme 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: Theme.dp(28)
rowSpacing: Theme.dp(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) }
}
}
}
+83
View File
@@ -0,0 +1,83 @@
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
import "../demoapp/data" 1.0
Item {
property int cntSelectedTags: 0
property int maxSelectedTags: 4
property ListModel tagsModel: ListModel {}
Component.onCompleted: {
tagsModel.clear();
for (const key of Object.keys(Models.communityTags)) {
tagsModel.append({ name: key, emoji: Models.communityTags[key], selected: false });
}
}
ColumnLayout {
id: column
anchors.centerIn: parent
width: Theme.dp(600)
height: Theme.dp(500)
spacing: Theme.dp(20)
StatusInput {
id: tagsFilter
leftPadding: 0
rightPadding: 0
label: qsTr("Select tags that will fit your Community")
input.icon.name: "search"
input.placeholderText: qsTr("Search tags")
Layout.fillWidth: true
}
StatusCommunityTags {
filterString: tagsFilter.text
model: tagsModel
enabled: cntSelectedTags < maxSelectedTags
onClicked: {
cntSelectedTags++;
item.selected = true;
}
Layout.fillWidth: true
}
RowLayout {
StatusBaseText {
text: qsTr("Selected tags")
font.pixelSize: Theme.dp(15)
Layout.fillWidth: true
}
StatusBaseText {
text: cntSelectedTags + "/" + maxSelectedTags
color: Theme.palette.baseColor1
font.pixelSize: Theme.dp(13)
}
}
StatusCommunityTags {
model: tagsModel
showOnlySelected: true
onClicked: {
cntSelectedTags--;
item.selected = false;
}
Layout.fillWidth: true
}
Item {
Layout.fillHeight: true
}
}
}
@@ -5,15 +5,15 @@ import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1
Column {
spacing: 12
width: 800
spacing: Theme.dp(12)
width: Theme.dp(800)
anchors.top:parent.top
leftPadding: 20
rightPadding: 20
leftPadding: Theme.dp(20)
rightPadding: Theme.dp(20)
Rectangle {
width: parent.width
height: 30
height: Theme.dp(30)
color: Theme.palette.baseColor2
StatusBaseText {
anchors.verticalCenter: parent.verticalCenter
@@ -60,7 +60,7 @@ Column {
Rectangle {
width: parent.width
height: 30
height: Theme.dp(30)
color: Theme.palette.baseColor2
StatusBaseText {
anchors.verticalCenter: parent.verticalCenter
@@ -103,7 +103,7 @@ Column {
Rectangle {
width: parent.width
height: 30
height: Theme.dp(30)
color: Theme.palette.baseColor2
StatusBaseText {
anchors.verticalCenter: parent.verticalCenter
@@ -134,15 +134,15 @@ Column {
id: notImplemented
Rectangle {
anchors.centerIn: parent
width: 654
width: Theme.dp(654)
height: infoText.implicitHeight
color: Theme.palette.baseColor5
StatusBaseText {
id: infoText
anchors.centerIn: parent
color: Theme.palette.directColor4
font.pixelSize: 15
lineHeight: 22
font.pixelSize: Theme.dp(15)
lineHeight: Theme.dp(22)
lineHeightMode: Text.FixedHeight
font.weight: Font.Medium
text: qsTr("Not Implemented")
@@ -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
}
}
}
+15 -14
View File
@@ -9,7 +9,7 @@ import StatusQ.Controls.Validators 0.1
import Sandbox 0.1
Column {
spacing: 8
spacing: Theme.dp(8)
StatusInput {
input.placeholderText: "Placeholder"
@@ -58,16 +58,17 @@ Column {
}
Item {
implicitWidth: 480
implicitHeight: 102
implicitWidth: Theme.dp(480)
implicitHeight: Theme.dp(82)
z: 100000
StatusSeedPhraseInput {
id: statusSeedInput
anchors.left: parent.left
anchors.right: parent.right
textEdit.input.anchors.leftMargin: 16
textEdit.input.anchors.rightMargin: 16
textEdit.input.anchors.topMargin: 11
height: parent.height
textEdit.input.anchors.leftMargin: Theme.dp(16)
textEdit.input.anchors.rightMargin: Theme.dp(16)
textEdit.input.anchors.topMargin: Theme.dp(11)
textEdit.label: "Input with drop down selection list"
leftComponentText: "1"
inputList: ListModel {
@@ -88,7 +89,6 @@ Column {
label: "Label"
charLimit: 30
errorMessage: "Error message"
input.clearable: true
input.valid: false
input.placeholderText: "Placeholder"
@@ -97,8 +97,8 @@ Column {
StatusInput {
label: "StatusInput"
secondaryLabel: "with right icon"
input.icon.width: 15
input.icon.height: 11
input.icon.width: Theme.dp(15)
input.icon.height: Theme.dp(11)
input.icon.name: text !== "" ? "checkmark" : ""
input.leftIcon: false
}
@@ -107,7 +107,7 @@ Column {
label: "Label"
secondaryLabel: "secondary label"
input.placeholderText: "Placeholder"
input.implicitHeight: 56
input.implicitHeight: Theme.dp(56)
}
StatusInput {
@@ -148,7 +148,7 @@ Column {
input.placeholderText: "Input width component (right side)"
input.rightComponent: StatusIcon {
icon: "cancel"
height: 16
height: Theme.dp(16)
color: Theme.palette.dangerColor1
}
}
@@ -162,14 +162,14 @@ Column {
StatusInput {
input.multiline: true
input.placeholderText: "Multiline with static height"
input.implicitHeight: 100
input.implicitHeight: Theme.dp(100)
}
StatusInput {
input.multiline: true
input.placeholderText: "Multiline with max/min"
input.minimumHeight: 80
input.maximumHeight: 200
input.minimumHeight: Theme.dp(80)
input.maximumHeight: Theme.dp(200)
}
StatusInput {
@@ -200,6 +200,7 @@ Column {
StatusInput {
label: "Input with inline token selector"
input.leftComponent: StatusTokenInlineSelector {
anchors.verticalCenter: parent.verticalCenter
tokens: [{amount: 0.1, token: "ETH"},
{amount: 10, token: "SNT"},
{amount: 15, token: "MANA"}]
+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: Theme.dp(150)
GridLayout {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
rows: 4
columns: 2
rowSpacing: Theme.dp(170)
columnSpacing: Theme.dp(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: Theme.dp(100)
width: Theme.dp(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: Theme.dp(15)
}
// Outsite area
MouseArea {
height: root.height
width: root.width
onClicked: {
languagePicker.close()
languagePicker2.close()
currencyPicker.close()
currencyPicker2.close()
}
}
}
+2 -1
View File
@@ -3,11 +3,12 @@ import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Platform 0.1
import StatusQ.Core.Theme 0.1
import Sandbox 0.1
Column {
spacing: 8
spacing: Theme.dp(8)
StatusMacNotification {
name: "Some name"
@@ -1,10 +1,11 @@
import QtQuick.Layouts 1.14
import StatusQ.Controls 0.1
import StatusQ.Core.Theme 0.1
GridLayout {
columns: 1
columnSpacing: 5
rowSpacing: 5
columnSpacing: Theme.dp(5)
rowSpacing: Theme.dp(5)
StatusPasswordStrengthIndicator {
id: veryweakPw
+10 -10
View File
@@ -8,7 +8,7 @@ import StatusQ.Controls.Validators 0.1
Column {
id: root
spacing: 25
spacing: Theme.dp(25)
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
// PIN input that accepts only numbers
@@ -16,7 +16,7 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.directColor1
text: "Enter Keycard PIN"
font.pixelSize: 30
font.pixelSize: Theme.dp(30)
font.bold: true
}
@@ -30,23 +30,23 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.dangerColor1
text: "Only numbers allowed"
font.pixelSize: 16
font.pixelSize: Theme.dp(16)
}
StatusBaseText {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.directColor1
text: "Introduced PIN: " + numbersPinInput.pinInput
font.pixelSize: 12
font.pixelSize: Theme.dp(12)
}
// PIN input that accepts input depending on the regular expression definition
StatusBaseText {
topPadding: 100
topPadding: Theme.dp(100)
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.directColor1
text: "Enter another Keycard PIN"
font.pixelSize: 30
font.pixelSize: Theme.dp(30)
font.bold: true
}
@@ -54,8 +54,8 @@ Column {
id: regexPinInput
anchors.horizontalCenter: parent.horizontalCenter
validator: StatusRegularExpressionValidator { regularExpression: /[0-9A-Za-z@]+/ }
circleDiameter: 22
circleSpacing: 22
circleDiameter: Theme.dp(22)
circleSpacing: Theme.dp(22)
pinLen: 7
}
@@ -63,13 +63,13 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.dangerColor1
text: "Only alphanumeric characters and '@' allowed"
font.pixelSize: 16
font.pixelSize: Theme.dp(16)
}
StatusBaseText {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.directColor1
text: "Introduced PIN: " + regexPinInput.pinInput
font.pixelSize: 12
font.pixelSize: Theme.dp(12)
}
}
+2 -2
View File
@@ -9,8 +9,8 @@ import StatusQ.Popups 0.1
GridLayout {
columns: 1
columnSpacing: 5
rowSpacing: 5
columnSpacing: Theme.dp(5)
rowSpacing: Theme.dp(5)
StatusButton {
text: "Simple"
+1 -1
View File
@@ -9,7 +9,7 @@ import StatusQ.Popups 0.1
import Sandbox 0.1
Column {
spacing: 8
spacing: Theme.dp(8)
StatusSelect {
id: select
+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: Theme.dp(8)
StatusTabBar {
StatusTabButton {
width: implicitWidth
text: "Button 1"
}
StatusTabButton {
width: implicitWidth
text: "Button 2"
}
StatusTabButton {
width: implicitWidth
text: "Button 3"
badge.value: 42
}
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ import StatusQ.Controls 0.1
import Sandbox 0.1
Column {
spacing: 8
spacing: Theme.dp(8)
Row {
StatusTabBarIconButton {
+3 -2
View File
@@ -3,11 +3,12 @@ import QtQuick.Layouts 1.14
import QtQuick.Controls 2.13
import StatusQ.Controls 0.1
import StatusQ.Core.Theme 0.1
GridLayout {
columns: 1
columnSpacing: 5
rowSpacing: 5
columnSpacing: Theme.dp(5)
rowSpacing: Theme.dp(5)
StatusSwitchTabBar {
StatusSwitchTabButton {
+16 -5
View File
@@ -1,6 +1,7 @@
import QtQuick 2.14
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
Item {
id: root
@@ -9,17 +10,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 +32,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,13 +50,15 @@ Item {
icon: ""
isIdenticon: false
onlineStatus: 3
isReadonly: false
tagIcon: ""
}
}
StatusTagSelector {
id: tagSelector
width: 650
height: 44
width: Theme.dp(650)
height: Theme.dp(44)
anchors.centerIn: parent
namesModel: root.asortedContacts
toLabelText: qsTr("To: ")
+13 -8
View File
@@ -1,6 +1,7 @@
import QtQuick 2.14
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
Item {
id: root
@@ -9,16 +10,17 @@ Item {
Column {
id: toastArea
anchors.centerIn: parent
spacing: 8
spacing: Theme.dp(8)
Repeater {
id: toastRepeater
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 +29,15 @@ 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)
}
onClicked: {
console.warn("toast clicked")
}
}
}
@@ -11,7 +11,7 @@ Column {
spacing: 8
Row {
spacing: 4
spacing: Theme.dp(4)
StatusWalletColorButton {
icon.color: Theme.palette.miscColor1
selected: true
@@ -9,9 +9,9 @@ import StatusQ.Controls 0.1
import Sandbox 0.1
Column {
spacing: 8
spacing: Theme.dp(8)
StatusWalletColorSelect {
model: Theme.palette.accountColors
model: Theme.palette.userCustomizationColors
}
}
+5 -5
View File
@@ -6,8 +6,8 @@ import StatusQ.Core.Theme 0.1
Item {
id: root
width: 800
height: 100
width: Theme.dp(800)
height: Theme.dp(100)
//Simulate animation between steps
property bool stepsCompleted: false
@@ -44,7 +44,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.directColor1
text: "Press Ctrl+R to run the animation"
font.pixelSize: 17
font.pixelSize: Theme.dp(17)
}
SequentialAnimation {
@@ -91,9 +91,9 @@ Item {
StatusWizardStepper {
id: wizardStepper
width: (parent.width - 50)
width: (parent.width - Theme.dp(50))
anchors.top: indicLabel.bottom
anchors.topMargin: 16
anchors.topMargin: Theme.dp(16)
anchors.horizontalCenter: parent.horizontalCenter
stepsModel: stepsListModel
}
+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>
@@ -0,0 +1,30 @@
import QtQuick 2.14
import QtGraphicalEffects 1.14
Item {
id: root
property Item mask
property color color: "#F6F8FA"
Rectangle {
id: gradient
anchors.fill: parent
visible: false
gradient: Gradient {
orientation: Gradient.Horizontal
SkeletonGradientStop { color: "transparent"; from: -3; }
SkeletonGradientStop { color: "transparent"; from: -2; }
SkeletonGradientStop { color: root.color; from: -1 ; }
SkeletonGradientStop { color: "transparent"; from: 0; }
SkeletonGradientStop { color: "transparent"; from: 1; }
}
}
OpacityMask {
anchors.fill: parent
source: gradient
maskSource: root.mask
}
}
@@ -0,0 +1,23 @@
import QtQuick 2.14
import QtGraphicalEffects 1.14
/*
TODO: This component should be implemented as inline component of `SkeletonAnimation.qml`
when we use Qt > 5.15
*/
GradientStop {
id: root
property real from: 0
color: "transparent"
NumberAnimation on position {
easing.type: Easing.Linear
loops: Animation.Infinite
from: root.from
to: from + 4
duration: 2000
}
}
+4
View File
@@ -0,0 +1,4 @@
module StatusQ.Animations
SkeletonAnimation 0.1 SkeletonAnimation.qml
SkeletonGradientStop 0.1 SkeletonGradientStop.qml
+1 -1
View File
@@ -13,7 +13,7 @@ StatusBaseText {
property real maxWidth: width
font.family: Theme.palette.monoFont.name
font.pixelSize: 13
font.pixelSize: Theme.dp(13)
elide: Text.ElideMiddle
color: Theme.palette.baseColor1
+9 -9
View File
@@ -7,18 +7,18 @@ Rectangle {
property int value
implicitHeight: statusBadge.value > 0 ? 18 + statusBadge.border.width : 10 + statusBadge.border.width
implicitHeight: statusBadge.value > 0 ? Theme.dp(18) + statusBadge.border.width : Theme.dp(10) + statusBadge.border.width
implicitWidth: {
if (statusBadge.value > 99) {
return 28 + statusBadge.border.width
if (statusBadge.value > Theme.dp(99)) {
return Theme.dp(28) + statusBadge.border.width
}
if (statusBadge.value > 9) {
return 26 + statusBadge.border.width
if (statusBadge.value > Theme.dp(9)) {
return Theme.dp(26) + statusBadge.border.width
}
if (statusBadge.value > 0) {
return 18 + statusBadge.border.width
return Theme.dp(18) + statusBadge.border.width
}
return 10 + statusBadge.border.width
return Theme.dp(10) + statusBadge.border.width
}
radius: height / 2
color: Theme.palette.primaryColor1
@@ -26,13 +26,13 @@ Rectangle {
StatusBaseText {
id: value
visible: statusBadge.value > 0
font.pixelSize: statusBadge.value > 99 ? 10 : 12
font.pixelSize: statusBadge.value > Theme.dp(99) ? Theme.dp(10) : Theme.dp(12)
font.weight: Font.Medium
color: Theme.palette.statusBadge.foregroundColor
anchors.centerIn: parent
text: {
if (statusBadge.value > 99) {
return "99+";
return qsTr("99+");
}
return statusBadge.value;
}
@@ -3,12 +3,13 @@ import QtGraphicalEffects 1.13
import StatusQ.Components 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Core.Theme 0.1
Item {
id: statusChatInfoToolBar
implicitWidth: 288
implicitHeight: 56
implicitWidth: Theme.dp(288)
implicitHeight: Theme.dp(56)
property alias chatInfoButton: statusChatInfoButton
property alias menuButton: statusMenuButton
@@ -27,8 +28,7 @@ Item {
id: statusChatInfoButton
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
anchors.right: (implicitWidth > parent.width - 50) ? statusMenuButton.left : undefined
anchors.right: (implicitWidth > parent.width - Theme.dp(50)) ? statusMenuButton.left : undefined
anchors.rightMargin: 5
type: StatusChatInfoButton.Type.OneToOneChat
onClicked: statusChatInfoToolBar.chatInfoButtonClicked()
@@ -37,12 +37,11 @@ Item {
StatusRoundButton {
id: statusMenuButton
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
visible: popupMenuSlot.active
width: visible ? 32 : 0
height: 32
width: visible ? Theme.dp(32) : 0
height: Theme.dp(32)
type: StatusRoundButton.Type.Secondary
icon.name: "add"
@@ -91,7 +90,7 @@ Item {
onClicked: {
statusChatInfoToolBar.addButtonClicked(mouse)
statusMenuButton.state = "pressed"
popupMenuSlot.item.popup(statusMenuButton.width-popupMenuSlot.item.width, statusMenuButton.height + 4)
popupMenuSlot.item.popup(statusMenuButton.width-popupMenuSlot.item.width, statusMenuButton.height + Theme.dp(4))
}
Loader {
@@ -104,5 +103,4 @@ Item {
}
}
}
}
+10 -7
View File
@@ -11,12 +11,13 @@ import StatusQ.Controls 0.1
Column {
id: statusChatList
spacing: 4
width: 288
spacing: Theme.dp(4)
width: Theme.dp(288)
property string categoryId: ""
property var model: null
property bool draggableItems: false
property bool highlightItem: true
property alias statusChatListItems: statusChatListItems
@@ -90,23 +91,25 @@ Column {
}
StatusChatListItem {
id: statusChatListItem
opacity: dragSensor.active ? 0.0 : 1.0
originalOrder: model.position
chatId: model.itemId
categoryId: model.parentItemId? model.parentItemId : ""
name: model.name
icon.emoji: model.emoji
type: !!model.type ? model.type : StatusChatListItem.Type.CommunityChat
muted: model.muted
hasUnreadMessages: model.hasUnreadMessages
notificationsCount: model.notificationsCount
highlightWhenCreated: !!model.highlight
selected: model.active
icon.color: model.color
image.isIdenticon: model.isIdenticon
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: {
@@ -6,6 +6,7 @@ import StatusQ.Core.Utils 0.1
import StatusQ.Components 0.1
import StatusQ.Popups 0.1
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
Item {
id: statusChatListAndCategories
@@ -14,10 +15,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: []
@@ -64,11 +65,10 @@ Item {
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
spacing: 4
spacing: Theme.dp(4)
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
@@ -8,11 +8,11 @@ import StatusQ.Components 0.1
StatusListItem {
id: statusChatListCategoryItem
implicitWidth: 288
implicitHeight: 28
implicitWidth: Theme.dp(288)
implicitHeight: Theme.dp(28)
leftPadding: 8
rightPadding: 8
leftPadding: Theme.dp(8)
rightPadding: Theme.dp(8)
property bool opened: true
property bool highlighted: false
@@ -32,33 +32,33 @@ StatusListItem {
statusListItemTitle.color: Theme.palette.directColor4
statusListItemTitle.font.weight: Font.Medium
statusListItemComponentsSlot.spacing: 1
statusListItemComponentsSlot.spacing: Theme.dp(1)
components: [
StatusChatListCategoryItemButton {
id: addButton
icon.name: "add"
icon.width: 20
visible: statusChatListCategoryItem.showAddButton &&
icon.width: Theme.dp(20)
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 &&
icon.width: Theme.dp(21)
visible: statusChatListCategoryItem.showMenuButton &&
(statusChatListCategoryItem.highlighted ||
statusChatListCategoryItem.sensor.containsMouse)
onClicked: statusChatListCategoryItem.menuButtonClicked(mouse)
tooltip.text: "More"
tooltip.text: qsTr("More")
},
StatusChatListCategoryItemButton {
id: toggleButton
icon.name: "chevron-down"
icon.width: 18
icon.width: Theme.dp(18)
icon.rotation: statusChatListCategoryItem.opened ? 0 : 270
onPressed: {
sensor.enabled = false;
+48 -49
View File
@@ -10,7 +10,7 @@ import StatusQ.Components 0.1
import StatusQ.Controls 0.1
Rectangle {
id: statusChatListItem
id: root
objectName: "chatItem"
property int originalOrder: -1
@@ -22,18 +22,17 @@ Rectangle {
property int notificationsCount: 0
property bool muted: false
property StatusImageSettings image: StatusImageSettings {
width: 24
height: 24
width: Theme.dp(24)
height: Theme.dp(24)
}
property StatusIconSettings icon: StatusIconSettings {
width: 24
height: 24
width: Theme.dp(24)
height: Theme.dp(24)
color: Theme.palette.miscColor5
letterSize: emoji ? 11 : 15
emoji: ""
emojiSize: Emoji.size.verySmall
charactersLen: 1
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
@@ -54,10 +53,10 @@ Rectangle {
CommunityChat // 6
}
implicitWidth: 288
implicitHeight: 40
implicitWidth: Theme.dp(288)
implicitHeight: Theme.dp(40)
radius: 8
radius: Theme.dp(8)
color: {
if (selected) {
@@ -79,40 +78,40 @@ 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 {
id: statusIcon
anchors.left: identicon.right
anchors.leftMargin: 8
anchors.leftMargin: Theme.dp(8)
anchors.verticalCenter: parent.verticalCenter
width: 14
visible: statusChatListItem.type !== StatusChatListItem.Type.OneToOneChat
width: Theme.dp(14)
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;
@@ -134,32 +133,32 @@ Rectangle {
anchors.leftMargin: statusIcon.visible ? 1 : 8
anchors.right: mutedIcon.visible ? mutedIcon.left :
statusBadge.visible ? statusBadge.left : parent.right
anchors.rightMargin: 6
anchors.rightMargin: Theme.dp(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
font.pixelSize: Theme.dp(15)
}
StatusIcon {
@@ -167,21 +166,21 @@ Rectangle {
anchors.right: statusBadge.visible ? statusBadge.left : parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
width: 14
width: Theme.dp(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
}
}
@@ -191,13 +190,13 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 8
anchors.rightMargin: Theme.dp(8)
color: statusChatListItem.muted ? Theme.palette.primaryColor2 : Theme.palette.primaryColor1
border.width: 4
color: root.muted ? Theme.palette.primaryColor2 : Theme.palette.primaryColor1
border.width: Theme.dp(4)
border.color: color
value: statusChatListItem.notificationsCount
visible: statusChatListItem.notificationsCount > 0
value: root.notificationsCount
visible: root.notificationsCount > 0
}
}
}
+99 -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: Theme.dp(8)
property int notificationCount: 0
property Component popupMenu
property var toolbarComponent
signal chatInfoButtonClicked()
signal menuButtonClicked()
@@ -26,150 +24,125 @@ Rectangle {
signal membersButtonClicked()
signal searchButtonClicked()
implicitWidth: Theme.dp(518)
implicitHeight: Theme.dp(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: Theme.dp(32)
height: Theme.dp(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 + Theme.dp(12)
}
Loader {
id: popupMenuSlot
active: !!statusChatToolBar.popupMenu
StatusFlatRoundButton {
id: membersButton
width: Theme.dp(32)
height: Theme.dp(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: Theme.dp(32)
height: Theme.dp(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 + Theme.dp(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: Theme.dp(24)
width: Theme.dp(1)
color: Theme.palette.directColor7
Layout.alignment: Qt.AlignVCenter
visible: notificationButton.visible &&
(menuButton.visible || membersButton.visible || searchButton.visible)
}
StatusActivityCenterButton {
id: notificationButton
width: 32
height: width
unreadNotificationsCount: statusChatToolBar.notificationCount
onClicked: statusChatToolBar.notificationButtonClicked()
}
}
}
}
+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: Theme.dp(340)
implicitHeight: Theme.dp(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
}
}

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