Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd757bfe79 | ||
|
|
10e31737d2 |
@@ -1,5 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
|
||||
project(StatusQ)
|
||||
|
||||
add_subdirectory(tests)
|
||||
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 49 KiB |
@@ -22,7 +22,6 @@
|
||||
\li \l{StatusDescriptionListItem}
|
||||
\li \l{StatusLetterIdenticon}
|
||||
\li \l{StatusListItem}
|
||||
\li \l{StatusListPicker}
|
||||
\li \l{StatusListSectionHeadline}
|
||||
\li \l{StatusLoadingIndicator}
|
||||
\li \l{StatusMemberListItem}
|
||||
@@ -38,6 +37,5 @@
|
||||
\li \l{StatusMessageDetails}
|
||||
\li \l{StatusTagSelector}
|
||||
\li \l{StatusToastMessage}
|
||||
\li \l{StatusWizardStepper}
|
||||
\endlist
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
\li \l{StatusBaseInput}
|
||||
\li \l{StatusIdenticonRing}
|
||||
\li \l{StatusInput}
|
||||
\li \l{StatusItemPicker}
|
||||
\li \l{StatusPickerButton}
|
||||
\li \l{StatusPinInput}
|
||||
\li \l{StatusProgressBar}
|
||||
@@ -44,6 +43,5 @@
|
||||
\li \l{StatusWalletColorSelect}
|
||||
\li \l{StatusRegularExpressionValidator}
|
||||
\li \l{StatusIntValidator}
|
||||
\li \l{StatusSeedPhraseInput}
|
||||
\endlist
|
||||
*/
|
||||
|
||||
@@ -14,9 +14,9 @@ import "demoapp/data" 1.0
|
||||
|
||||
Rectangle {
|
||||
id: demoApp
|
||||
height: Theme.dp(602)
|
||||
width: Theme.dp(1002)
|
||||
border.width: Theme.dp(1)
|
||||
height: 602
|
||||
width: 1002
|
||||
border.width: 1
|
||||
border.color: Theme.palette.baseColor2
|
||||
|
||||
property string titleStyle: "osx"
|
||||
@@ -25,11 +25,10 @@ Rectangle {
|
||||
id: appSectionType
|
||||
readonly property int chat: 0
|
||||
readonly property int community: 1
|
||||
readonly property int communitiesPortal: 2
|
||||
readonly property int wallet: 3
|
||||
readonly property int wallet: 2
|
||||
readonly property int browser: 3
|
||||
readonly property int nodeManagement: 5
|
||||
readonly property int profileSettings: 6
|
||||
readonly property int nodeManagement: 4
|
||||
readonly property int profileSettings: 5
|
||||
readonly property int apiDocumentation: 100
|
||||
readonly property int demoApp: 101
|
||||
}
|
||||
@@ -50,7 +49,7 @@ Rectangle {
|
||||
StatusMacTrafficLights {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.margins: Theme.dp(13)
|
||||
anchors.margins: 13
|
||||
z: statusAppLayout.z + 1
|
||||
visible: titleStyle === "osx"
|
||||
}
|
||||
@@ -112,18 +111,13 @@ Rectangle {
|
||||
badge.value: model.notificationsCount
|
||||
badge.visible: model.hasNotification
|
||||
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
|
||||
badge.border.width: Theme.dp(2)
|
||||
badge.border.width: 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
|
||||
@@ -143,7 +137,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
onClicked: {
|
||||
if(model.sectionType === appSectionType.community)
|
||||
{
|
||||
@@ -175,7 +169,7 @@ Rectangle {
|
||||
StatusMenuItem {
|
||||
text: qsTr("Leave Community")
|
||||
icon.name: "arrow-right"
|
||||
icon.width: Theme.dp(14)
|
||||
icon.width: 14
|
||||
iconRotation: 180
|
||||
type: StatusMenuItem.Type.Danger
|
||||
}
|
||||
@@ -211,11 +205,6 @@ Rectangle {
|
||||
StatusAppProfileSettingsView { }
|
||||
}
|
||||
|
||||
Component {
|
||||
id: statusCommunityPortalView
|
||||
StatusAppCommunitiesPortalView { }
|
||||
}
|
||||
|
||||
DemoContactRequestsModal {
|
||||
id: demoContactRequestsModal
|
||||
anchors.centerIn: parent
|
||||
|
||||
@@ -2,14 +2,11 @@ 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
|
||||
|
||||
@@ -20,29 +17,28 @@ Item {
|
||||
|
||||
Row {
|
||||
id: themeSwitch
|
||||
spacing: Theme.dp(2)
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
text: "🌤"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 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 + Theme.dp(16)
|
||||
y: themeSwitchWrapper.y + 16
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
text: "🌙"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,17 +3,16 @@ 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: Theme.dp(10)
|
||||
spacing: 10
|
||||
Grid {
|
||||
id: buttonGridWidth
|
||||
columns: Theme.dp(3)
|
||||
columnSpacing: Theme.dp(38)
|
||||
rowSpacing: Theme.dp(10)
|
||||
columns: 3
|
||||
columnSpacing: 38
|
||||
rowSpacing: 10
|
||||
|
||||
horizontalItemAlignment: Grid.AlignHCenter
|
||||
|
||||
@@ -174,44 +173,25 @@ 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: Theme.dp(44)
|
||||
height: Theme.dp(44)
|
||||
width: 44
|
||||
height: 44
|
||||
|
||||
icon.name: "info"
|
||||
}
|
||||
|
||||
StatusFlatRoundButton {
|
||||
width: Theme.dp(44)
|
||||
height: Theme.dp(44)
|
||||
width: 44
|
||||
height: 44
|
||||
icon.name: "info"
|
||||
enabled: false
|
||||
}
|
||||
|
||||
StatusFlatRoundButton {
|
||||
width: Theme.dp(44)
|
||||
height: Theme.dp(44)
|
||||
width: 44
|
||||
height: 44
|
||||
icon.name: "info"
|
||||
loading: true
|
||||
}
|
||||
@@ -220,24 +200,24 @@ Column {
|
||||
|
||||
StatusFlatRoundButton {
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
width: Theme.dp(44)
|
||||
height: Theme.dp(44)
|
||||
width: 44
|
||||
height: 44
|
||||
|
||||
icon.name: "info"
|
||||
}
|
||||
|
||||
StatusFlatRoundButton {
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
width: Theme.dp(44)
|
||||
height: Theme.dp(44)
|
||||
width: 44
|
||||
height: 44
|
||||
icon.name: "info"
|
||||
enabled: false
|
||||
}
|
||||
|
||||
StatusFlatRoundButton {
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
width: Theme.dp(44)
|
||||
height: Theme.dp(44)
|
||||
width: 44
|
||||
height: 44
|
||||
icon.name: "info"
|
||||
loading: true
|
||||
}
|
||||
@@ -327,20 +307,12 @@ Column {
|
||||
onClicked: {
|
||||
colorDialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
StatusColorDialog {
|
||||
id: colorDialog
|
||||
anchors.centerIn: parent
|
||||
property bool colorSelected: false
|
||||
onAccepted: {
|
||||
colorSelected = true;
|
||||
ColorDialog {
|
||||
id: colorDialog
|
||||
property bool colorSelected: false
|
||||
onAccepted: {
|
||||
colorSelected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Button with emoji
|
||||
StatusButton {
|
||||
text: "Button with Emoji"
|
||||
icon.emoji: "🖼️️"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,22 +9,22 @@ import Sandbox 0.1
|
||||
|
||||
GridLayout {
|
||||
columns: 1
|
||||
columnSpacing: Theme.dp(5)
|
||||
rowSpacing: Theme.dp(5)
|
||||
columnSpacing: 5
|
||||
rowSpacing: 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: Theme.dp(15)
|
||||
width: Theme.dp(300)
|
||||
font.pixelSize: 15
|
||||
width: 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: Theme.dp(15)
|
||||
width: Theme.dp(200)
|
||||
font.pixelSize: 15
|
||||
width: 200
|
||||
}
|
||||
|
||||
StatusIconTabButton {
|
||||
@@ -57,21 +57,21 @@ GridLayout {
|
||||
visible: parent.hovered
|
||||
text: "Right"
|
||||
orientation: StatusToolTip.Orientation.Right
|
||||
x: parent.width + Theme.dp(16)
|
||||
x: parent.width + 16
|
||||
y: parent.height / 2 - height / 2 + 4
|
||||
}
|
||||
StatusToolTip {
|
||||
visible: parent.hovered
|
||||
text: "Bottom"
|
||||
orientation: StatusToolTip.Orientation.Bottom
|
||||
y: parent.height + Theme.dp(12)
|
||||
y: parent.height + 12
|
||||
}
|
||||
StatusToolTip {
|
||||
visible: parent.hovered
|
||||
text: "Left"
|
||||
orientation: StatusToolTip.Orientation.Left
|
||||
x: -parent.width /2 - Theme.dp(8)
|
||||
y: parent.height / 2 - height / 2 + Theme.dp(4)
|
||||
x: -parent.width /2 -8
|
||||
y: parent.height / 2 - height / 2 + 4
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ GridLayout {
|
||||
tooltip.text: "Profile"
|
||||
badge.value: 0
|
||||
badge.visible: true
|
||||
badge.anchors.leftMargin:-Theme.dp(16)
|
||||
badge.anchors.leftMargin:-16
|
||||
}
|
||||
|
||||
StatusNavBarTabButton {
|
||||
@@ -131,8 +131,8 @@ GridLayout {
|
||||
}
|
||||
|
||||
Item {
|
||||
implicitWidth: Theme.dp(100)
|
||||
implicitHeight: Theme.dp(48)
|
||||
implicitWidth: 100
|
||||
implicitHeight: 48
|
||||
StatusChatInfoButton {
|
||||
title: "Iuri Matias elided"
|
||||
subTitle: "Contact"
|
||||
@@ -141,13 +141,13 @@ GridLayout {
|
||||
type: StatusChatInfoButton.Type.OneToOneChat
|
||||
muted: true
|
||||
pinnedMessagesCount: 1
|
||||
width: Theme.dp(100)
|
||||
width: 100
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
implicitWidth: Theme.dp(100)
|
||||
implicitHeight: Theme.dp(48)
|
||||
implicitWidth: 100
|
||||
implicitHeight: 48
|
||||
StatusChatInfoButton {
|
||||
title: "Iuri Matias big not elided"
|
||||
subTitle: "Contact"
|
||||
@@ -156,7 +156,7 @@ GridLayout {
|
||||
type: StatusChatInfoButton.Type.OneToOneChat
|
||||
muted: true
|
||||
pinnedMessagesCount: 1
|
||||
width: Theme.dp(400)
|
||||
width: 400
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,32 +183,22 @@ GridLayout {
|
||||
}
|
||||
|
||||
StatusSlider {
|
||||
width: Theme.dp(360)
|
||||
width: 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: Theme.dp(360)
|
||||
topPadding: Theme.dp(20)
|
||||
width: 360
|
||||
topPadding: 20
|
||||
type: StatusBanner.Type.Danger
|
||||
statusText: "Banner"
|
||||
}
|
||||
|
||||
StatusProgressBar {
|
||||
id: progressBar
|
||||
id: progressBar
|
||||
text: "Weak"
|
||||
value: 0.5
|
||||
fillColor : Theme.palette.pinColor1
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import QtQuick 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
GridLayout {
|
||||
columns: 6
|
||||
columnSpacing: Theme.dp(5)
|
||||
rowSpacing: Theme.dp(5)
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
property color iconColor
|
||||
|
||||
Repeater {
|
||||
|
||||
@@ -10,96 +10,31 @@ import StatusQ.Layout 0.1
|
||||
import StatusQ.Popups 0.1
|
||||
|
||||
Column {
|
||||
spacing: Theme.dp(10)
|
||||
spacing: 5
|
||||
|
||||
StatusChatToolBar {
|
||||
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
|
||||
}
|
||||
}
|
||||
chatInfoButton.title: "Some contact"
|
||||
chatInfoButton.subTitle: "Contact"
|
||||
chatInfoButton.icon.color: Theme.palette.miscColor7
|
||||
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
|
||||
}
|
||||
|
||||
StatusChatToolBar {
|
||||
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
|
||||
}
|
||||
}
|
||||
chatInfoButton.title: "Some contact"
|
||||
chatInfoButton.subTitle: "Contact"
|
||||
chatInfoButton.icon.color: Theme.palette.miscColor7
|
||||
chatInfoButton.type: StatusChatInfoButton.Type.PublicChat
|
||||
chatInfoButton.pinnedMessagesCount: 1
|
||||
chatInfoButton.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 {
|
||||
@@ -107,8 +42,6 @@ Column {
|
||||
Button {
|
||||
id: btn
|
||||
text: "Append"
|
||||
width: Theme.dp(100)
|
||||
height: Theme.dp(40)
|
||||
onClicked: {
|
||||
buttons.append({
|
||||
name: "Test community",
|
||||
@@ -144,7 +77,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +120,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
}
|
||||
|
||||
communityNavBarButton: StatusNavBarTabButton {
|
||||
@@ -201,7 +134,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
|
||||
popupMenu: StatusPopupMenu {
|
||||
|
||||
@@ -226,7 +159,7 @@ Column {
|
||||
StatusMenuItem {
|
||||
text: qsTr("Leave Community")
|
||||
icon.name: "arrow-right"
|
||||
icon.width: Theme.dp(14)
|
||||
icon.width: 14
|
||||
iconRotation: 180
|
||||
type: StatusMenuItem.Type.Danger
|
||||
}
|
||||
@@ -272,7 +205,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
}
|
||||
|
||||
communityNavBarButton: StatusNavBarTabButton {
|
||||
@@ -286,7 +219,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
|
||||
popupMenu: StatusPopupMenu {
|
||||
|
||||
@@ -311,8 +244,8 @@ Column {
|
||||
StatusMenuItem {
|
||||
text: qsTr("Leave Community")
|
||||
icon.name: "arrow-right"
|
||||
icon.width: Theme.dp(14)
|
||||
iconRotation: Theme.dp(180)
|
||||
icon.width: 14
|
||||
iconRotation: 180
|
||||
type: StatusMenuItem.Type.Danger
|
||||
}
|
||||
}
|
||||
@@ -362,7 +295,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
}
|
||||
|
||||
communityNavBarButton: StatusNavBarTabButton {
|
||||
@@ -376,7 +309,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
|
||||
popupMenu: StatusPopupMenu {
|
||||
|
||||
@@ -401,8 +334,8 @@ Column {
|
||||
StatusMenuItem {
|
||||
text: qsTr("Leave Community")
|
||||
icon.name: "arrow-right"
|
||||
icon.width: Theme.dp(14)
|
||||
iconRotation: Theme.dp(180)
|
||||
icon.width: 14
|
||||
iconRotation: 180
|
||||
type: StatusMenuItem.Type.Danger
|
||||
}
|
||||
}
|
||||
@@ -457,7 +390,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
}
|
||||
|
||||
communityNavBarButton: StatusNavBarTabButton {
|
||||
@@ -471,7 +404,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
|
||||
popupMenu: StatusPopupMenu {
|
||||
|
||||
@@ -496,13 +429,15 @@ Column {
|
||||
StatusMenuItem {
|
||||
text: qsTr("Leave Community")
|
||||
icon.name: "arrow-right"
|
||||
icon.width: Theme.dp(14)
|
||||
iconRotation: Theme.dp(180)
|
||||
icon.width: 14
|
||||
iconRotation: 180
|
||||
type: StatusMenuItem.Type.Danger
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import StatusQ.Core.Utils 0.1
|
||||
|
||||
GridLayout {
|
||||
columns: 1
|
||||
columnSpacing: Theme.dp(5)
|
||||
rowSpacing: Theme.dp(5)
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
|
||||
StatusNavigationListItem {
|
||||
title: "Menu Item"
|
||||
@@ -26,7 +26,7 @@ GridLayout {
|
||||
badge.value: 1
|
||||
}
|
||||
StatusNavigationListItem {
|
||||
title: "Menu Item (selected) with very long text"
|
||||
title: "Menu Item (selected)"
|
||||
selected: true
|
||||
icon.name: "info"
|
||||
badge.value: 1
|
||||
@@ -156,7 +156,7 @@ GridLayout {
|
||||
subTitle: "Subtitle"
|
||||
tertiaryTitle: "Tertiary title"
|
||||
|
||||
statusListItemTitle.font.pixelSize: Theme.dp(17)
|
||||
statusListItemTitle.font.pixelSize: 17
|
||||
statusListItemTitle.font.weight: Font.Bold
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ GridLayout {
|
||||
tertiaryTitle: "Tertiary title"
|
||||
icon.name: "info"
|
||||
|
||||
statusListItemTitle.font.pixelSize: Theme.dp(17)
|
||||
statusListItemTitle.font.pixelSize: 17
|
||||
statusListItemTitle.font.weight: Font.Bold
|
||||
}
|
||||
|
||||
@@ -345,14 +345,14 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
tagsModel : 2
|
||||
tagsDelegate: StatusListItemTag {
|
||||
color: "blue"
|
||||
height: Theme.dp(24)
|
||||
radius: Theme.dp(6)
|
||||
height: 24
|
||||
radius: 6
|
||||
closeButtonVisible: false
|
||||
icon.emoji: "😁"
|
||||
icon.emojiSize: Emoji.size.verySmall
|
||||
icon.isLetterIdenticon: true
|
||||
title: "helloworld.eth"
|
||||
titleText.font.pixelSize: Theme.dp(12)
|
||||
titleText.font.pixelSize: 12
|
||||
titleText.color: Theme.palette.indirectColor1
|
||||
}
|
||||
}
|
||||
@@ -362,7 +362,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
subTitle: "Emoji"
|
||||
icon.emoji: "😁"
|
||||
icon.color: "yellow"
|
||||
icon.letterSize: Theme.dp(14)
|
||||
icon.letterSize: 14
|
||||
icon.isLetterIdenticon: true
|
||||
}
|
||||
|
||||
@@ -394,13 +394,13 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
StatusMemberListItem {
|
||||
nickName: "This is an example"
|
||||
userName: "annabelle"
|
||||
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
|
||||
isVerified: true
|
||||
isContact: true
|
||||
chatKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
|
||||
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
|
||||
isMutualContact: true
|
||||
image.source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
|
||||
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
||||
image.isIdenticon: true
|
||||
status: 1 // FIXME: use enum
|
||||
isOnline: true
|
||||
ringSettings.ringSpecModel:
|
||||
ListModel {
|
||||
ListElement {colorId: 13; segmentLength: 5}
|
||||
@@ -416,62 +416,23 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
|
||||
StatusMemberListItem {
|
||||
nickName: "carmen.eth"
|
||||
isUntrustworthy: true
|
||||
}
|
||||
|
||||
StatusMemberListItem {
|
||||
nickName: "very-long-annoying-nickname.eth"
|
||||
isUntrustworthy: true
|
||||
isOnline: false
|
||||
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
|
||||
}
|
||||
|
||||
StatusMemberListItem {
|
||||
nickName: "This girl I know from work"
|
||||
userName: "annabelle"
|
||||
status: 1 // FIXME: use enum
|
||||
isOnline: true
|
||||
}
|
||||
|
||||
StatusMemberListItem {
|
||||
nickName: "Mark Cuban"
|
||||
userName: "annabelle"
|
||||
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
|
||||
isContact: true
|
||||
chatKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
|
||||
isMutualContact: 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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,58 +4,38 @@ import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
ColumnLayout {
|
||||
GridLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
GridLayout {
|
||||
columns: 6
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
|
||||
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"
|
||||
}
|
||||
StatusLoadingIndicator {
|
||||
color: Theme.palette.directColor4
|
||||
}
|
||||
|
||||
Flow {
|
||||
Layout.fillWidth: true
|
||||
spacing: 4
|
||||
StatusLetterIdenticon {
|
||||
name: "#status"
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: 12
|
||||
StatusLetterIdenticon {
|
||||
name: "A"
|
||||
color: Theme.palette.userCustomizationColors[index]
|
||||
letterSize: Theme.dp(16)
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,9 @@ 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: Theme.dp(20)
|
||||
spacing: 20
|
||||
|
||||
StatusButton {
|
||||
text: "Simple modal"
|
||||
@@ -86,12 +83,6 @@ Column {
|
||||
onClicked: advancedHeaderFooterModal.open()
|
||||
}
|
||||
|
||||
|
||||
StatusButton {
|
||||
text: "Modal with Floating header Buttons"
|
||||
onClicked: floatingHeaderModal.open()
|
||||
}
|
||||
|
||||
StatusModal {
|
||||
id: simpleModal
|
||||
anchors.centerIn: parent
|
||||
@@ -144,11 +135,11 @@ Column {
|
||||
|
||||
headerActionButton: StatusFlatRoundButton {
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
width: Theme.dp(32)
|
||||
height: Theme.dp(32)
|
||||
width: 32
|
||||
height: 32
|
||||
|
||||
icon.width: Theme.dp(20)
|
||||
icon.height: Theme.dp(20)
|
||||
icon.width: 20
|
||||
icon.height: 20
|
||||
icon.name: "info"
|
||||
}
|
||||
|
||||
@@ -193,17 +184,17 @@ Column {
|
||||
contentItem: StatusBaseText {
|
||||
anchors.centerIn: parent
|
||||
text: "Some text content"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.directColor1
|
||||
}
|
||||
|
||||
headerActionButton: StatusFlatRoundButton {
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
width: Theme.dp(32)
|
||||
height: Theme.dp(32)
|
||||
width: 32
|
||||
height: 32
|
||||
|
||||
icon.width: Theme.dp(20)
|
||||
icon.height: Theme.dp(20)
|
||||
icon.width: 20
|
||||
icon.height: 20
|
||||
icon.name: "info"
|
||||
}
|
||||
}
|
||||
@@ -218,7 +209,7 @@ Column {
|
||||
id: text
|
||||
anchors.centerIn: parent
|
||||
text: "Some text content"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.directColor1
|
||||
}
|
||||
|
||||
@@ -243,7 +234,7 @@ Column {
|
||||
contentItem: StatusBaseText {
|
||||
anchors.centerIn: parent
|
||||
text: "Some text content"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.directColor1
|
||||
}
|
||||
|
||||
@@ -269,7 +260,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
contentItem: StatusBaseText {
|
||||
anchors.centerIn: parent
|
||||
text: "Some text content"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.directColor1
|
||||
}
|
||||
|
||||
@@ -296,7 +287,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
contentItem: StatusBaseText {
|
||||
anchors.centerIn: parent
|
||||
text: "Some text content"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.directColor1
|
||||
}
|
||||
|
||||
@@ -323,7 +314,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
contentItem: StatusBaseText {
|
||||
anchors.centerIn: parent
|
||||
text: "Some text content"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.directColor1
|
||||
}
|
||||
|
||||
@@ -374,86 +365,39 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
showFooter: false
|
||||
showAdvancedHeader: true
|
||||
showAdvancedFooter: true
|
||||
height: Theme.dp(200)
|
||||
height: 200
|
||||
advancedHeaderComponent: Rectangle {
|
||||
width: parent.width
|
||||
height: Theme.dp(50)
|
||||
height: 50
|
||||
color: Theme.palette.baseColor1
|
||||
border.width: Theme.dp(1)
|
||||
border.width: 1
|
||||
StatusBaseText {
|
||||
anchors.centerIn: parent
|
||||
text: "Add any header here"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.directColor1
|
||||
}
|
||||
|
||||
}
|
||||
advancedFooterComponent: Rectangle {
|
||||
width: parent.width
|
||||
height: Theme.dp(50)
|
||||
height: 50
|
||||
color: Theme.palette.baseColor1
|
||||
border.width: Theme.dp(1)
|
||||
border.width: 1
|
||||
StatusBaseText {
|
||||
anchors.centerIn: parent
|
||||
text: "Add any footer here"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 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"; emoji: "🥑"}
|
||||
ListElement{name: "Account 1"; iconName: "filled-account"}
|
||||
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 {
|
||||
|
||||
@@ -12,7 +12,7 @@ import StatusQ.Core.Theme 0.1
|
||||
ListView {
|
||||
id: messageList
|
||||
anchors.fill: parent
|
||||
anchors.margins: Theme.dp(15)
|
||||
anchors.margins: 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: Theme.dp(40)
|
||||
height: Theme.dp(40)
|
||||
width: 40
|
||||
height: 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: Theme.dp(20)
|
||||
height: Theme.dp(20)
|
||||
width: 20
|
||||
height: 20
|
||||
source: model.isReply ? model.replyProfileImage: ""
|
||||
isIdenticon: model.isReply ? model.replyIsIdenticon: ""
|
||||
}
|
||||
@@ -67,23 +67,23 @@ ListView {
|
||||
quickActions: [
|
||||
StatusFlatRoundButton {
|
||||
id: emojiBtn
|
||||
width: Theme.dp(32)
|
||||
height: Theme.dp(32)
|
||||
width: 32
|
||||
height: 32
|
||||
icon.name: "reaction-b"
|
||||
type: StatusFlatRoundButton.Type.Tertiary
|
||||
tooltip.text: "Add reaction"
|
||||
},
|
||||
StatusFlatRoundButton {
|
||||
id: replyBtn
|
||||
width: Theme.dp(32)
|
||||
height: Theme.dp(32)
|
||||
width: 32
|
||||
height: 32
|
||||
icon.name: "reply"
|
||||
type: StatusFlatRoundButton.Type.Tertiary
|
||||
tooltip.text: "Reply"
|
||||
},
|
||||
StatusFlatRoundButton {
|
||||
width: Theme.dp(32)
|
||||
height: Theme.dp(32)
|
||||
width: 32
|
||||
height: 32
|
||||
icon.name: "tiny/edit"
|
||||
type: StatusFlatRoundButton.Type.Tertiary
|
||||
tooltip.text: "Edit"
|
||||
@@ -93,8 +93,8 @@ ListView {
|
||||
},
|
||||
StatusFlatRoundButton {
|
||||
id: otherBtn
|
||||
width: Theme.dp(32)
|
||||
height: Theme.dp(32)
|
||||
width: 32
|
||||
height: 32
|
||||
icon.name: "more"
|
||||
type: StatusFlatRoundButton.Type.Tertiary
|
||||
tooltip.text: "More"
|
||||
|
||||
@@ -10,7 +10,7 @@ import StatusQ.Core.Theme 0.1
|
||||
Page {
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
anchors.margins: Theme.dp(16)
|
||||
anchors.margins: 16
|
||||
property ListModel contactsModel: null
|
||||
background: null
|
||||
|
||||
@@ -19,61 +19,25 @@ Page {
|
||||
width: parent.width
|
||||
height: tagSelector.height
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.dp(8)
|
||||
anchors.rightMargin: 8
|
||||
|
||||
StatusTagSelector {
|
||||
id: tagSelector
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
|
||||
Layout.leftMargin: Theme.dp(17)
|
||||
Layout.leftMargin: 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: {
|
||||
textEdit.forceActiveFocus();
|
||||
sortModel(root.contactsModel);
|
||||
}
|
||||
Component.onCompleted: { sortModel(root.contactsModel); }
|
||||
}
|
||||
|
||||
StatusButton {
|
||||
implicitHeight: Theme.dp(44)
|
||||
implicitHeight: 44
|
||||
Layout.alignment: Qt.AlignTop
|
||||
enabled: (tagSelector.namesModel.count > 0)
|
||||
text: "Confirm"
|
||||
@@ -82,14 +46,14 @@ Page {
|
||||
|
||||
contentItem: Item {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.dp(68)
|
||||
anchors.topMargin: 68
|
||||
|
||||
StatusBaseText {
|
||||
visible: (contactsModel.count === 0)
|
||||
anchors.centerIn: parent
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 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
|
||||
|
||||
@@ -19,24 +19,24 @@ StatusModal {
|
||||
width: root.width
|
||||
|
||||
StatusModalDivider {
|
||||
bottomPadding: Theme.dp(8)
|
||||
bottomPadding: 8
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
text: "A community of cat lovers, meow!"
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pixelSize: Theme.dp(15)
|
||||
height: Theme.dp(46)
|
||||
font.pixelSize: 15
|
||||
height: 46
|
||||
color: Theme.palette.directColor1
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: Theme.dp(16)
|
||||
anchors.rightMargin: Theme.dp(16)
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
}
|
||||
|
||||
StatusModalDivider {
|
||||
topPadding: Theme.dp(8)
|
||||
bottomPadding: Theme.dp(8)
|
||||
topPadding: 8
|
||||
bottomPadding: 8
|
||||
}
|
||||
|
||||
StatusDescriptionListItem {
|
||||
@@ -49,13 +49,13 @@ StatusModal {
|
||||
}
|
||||
|
||||
StatusModalDivider {
|
||||
topPadding: Theme.dp(8)
|
||||
bottomPadding: Theme.dp(8)
|
||||
topPadding: 8
|
||||
bottomPadding: 8
|
||||
}
|
||||
|
||||
StatusListItem {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
statusListItemTitle.font.pixelSize: Theme.dp(17)
|
||||
statusListItemTitle.font.pixelSize: 17
|
||||
title: "Members"
|
||||
icon.name: "group-chat"
|
||||
label: "184"
|
||||
@@ -79,13 +79,13 @@ StatusModal {
|
||||
}
|
||||
|
||||
StatusModalDivider {
|
||||
topPadding: Theme.dp(8)
|
||||
bottomPadding: Theme.dp(8)
|
||||
topPadding: 8
|
||||
bottomPadding: 8
|
||||
}
|
||||
|
||||
StatusListItem {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
statusListItemTitle.font.pixelSize: Theme.dp(17)
|
||||
statusListItemTitle.font.pixelSize: 17
|
||||
title: "Edit community"
|
||||
icon.name: "edit"
|
||||
type: StatusListItem.Type.Secondary
|
||||
@@ -93,7 +93,7 @@ StatusModal {
|
||||
|
||||
StatusListItem {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
statusListItemTitle.font.pixelSize: Theme.dp(17)
|
||||
statusListItemTitle.font.pixelSize: 17
|
||||
title: "Transfer ownership"
|
||||
icon.name: "exchange"
|
||||
type: StatusListItem.Type.Secondary
|
||||
@@ -101,7 +101,7 @@ StatusModal {
|
||||
|
||||
StatusListItem {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
statusListItemTitle.font.pixelSize: Theme.dp(17)
|
||||
statusListItemTitle.font.pixelSize: 17
|
||||
title: "Leave community"
|
||||
icon.name: "arrow-right"
|
||||
icon.rotation: 180
|
||||
|
||||
@@ -11,18 +11,18 @@ StatusModal {
|
||||
header.title: "Contact Requests"
|
||||
headerActionButton: StatusFlatRoundButton {
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
width: Theme.dp(32)
|
||||
height: Theme.dp(32)
|
||||
width: 32
|
||||
height: 32
|
||||
|
||||
icon.width: Theme.dp(20)
|
||||
icon.height: Theme.dp(20)
|
||||
icon.width: 20
|
||||
icon.height: 20
|
||||
icon.name: "notification"
|
||||
}
|
||||
|
||||
contentItem: StatusBaseText {
|
||||
anchors.centerIn: parent
|
||||
text: "Contact request will be shown here"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.directColor1
|
||||
}
|
||||
|
||||
|
||||
@@ -20,26 +20,28 @@ StatusAppThreePanelLayout {
|
||||
StatusNavigationPanelHeadline {
|
||||
id: headline
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Theme.dp(16)
|
||||
anchors.topMargin: 16
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Chat"
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: searchInputWrapper
|
||||
width: Theme.dp(288)
|
||||
width: parent.width
|
||||
height: searchInput.height
|
||||
anchors.top: headline.bottom
|
||||
anchors.topMargin: Theme.dp(16)
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.topMargin: 16
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
|
||||
StatusBaseInput {
|
||||
id: searchInput
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
implicitHeight: Theme.dp(36)
|
||||
topPadding: Theme.dp(8)
|
||||
bottomPadding: Theme.dp(8)
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
|
||||
Layout.leftMargin: 17
|
||||
implicitHeight: 36
|
||||
topPadding: 8
|
||||
bottomPadding: 0
|
||||
placeholderText: "Search"
|
||||
icon.name: "search"
|
||||
}
|
||||
@@ -58,9 +60,9 @@ StatusAppThreePanelLayout {
|
||||
|
||||
Column {
|
||||
anchors.top: searchInputWrapper.bottom
|
||||
anchors.topMargin: Theme.dp(16)
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: Theme.dp(8)
|
||||
anchors.topMargin: 16
|
||||
width: parent.width
|
||||
spacing: 8
|
||||
|
||||
StatusContactRequestsIndicatorListItem {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
@@ -70,8 +72,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);
|
||||
@@ -126,18 +128,19 @@ StatusAppThreePanelLayout {
|
||||
centerPanel: Loader {
|
||||
anchors.fill: parent
|
||||
sourceComponent: root.createChat ? createChatView : chatChannelView
|
||||
Component {
|
||||
id: createChatView
|
||||
CreateChatView {
|
||||
contactsModel: Models.membersListModel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: chatChannelView
|
||||
ChatChannelView {
|
||||
model: Models.chatMessagesModel
|
||||
}
|
||||
Component {
|
||||
id: createChatView
|
||||
CreateChatView {
|
||||
contactsModel: Models.dummyContactsModel
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: chatChannelView
|
||||
ChatChannelView {
|
||||
model: Models.chatMessagesModel
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,8 +148,15 @@ StatusAppThreePanelLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
StatusChatToolBar {
|
||||
anchors.top: parent.top
|
||||
width: parent.width
|
||||
toolbarComponent: statusChatInfoButton
|
||||
|
||||
chatInfoButton.title: "Amazing Funny Squirrel"
|
||||
chatInfoButton.subTitle: "Contact"
|
||||
chatInfoButton.icon.color: Theme.palette.miscColor7
|
||||
chatInfoButton.type: StatusChatInfoButton.Type.OneToOneChat
|
||||
chatInfoButton.pinnedMessagesCount: 1
|
||||
|
||||
searchButton.visible: false
|
||||
membersButton.visible: false
|
||||
notificationCount: 1
|
||||
@@ -174,24 +184,11 @@ StatusAppThreePanelLayout {
|
||||
StatusMenuItem {
|
||||
text: "Leave Chat"
|
||||
icon.name: "arrow-right"
|
||||
icon.width: Theme.dp(14)
|
||||
icon.width: 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
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) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ StatusAppThreePanelLayout {
|
||||
id: scrollView
|
||||
|
||||
anchors.top: statusChatInfoToolBar.bottom
|
||||
anchors.topMargin: Theme.dp(8)
|
||||
anchors.topMargin: 8
|
||||
anchors.bottom: parent.bottom
|
||||
width: leftPanel.width
|
||||
|
||||
@@ -73,7 +73,7 @@ StatusAppThreePanelLayout {
|
||||
StatusChatListAndCategories {
|
||||
id: communityCategories
|
||||
width: leftPanel.width
|
||||
height: implicitHeight > (leftPanel.height - Theme.dp(64)) ? implicitHeight + Theme.dp(8) : leftPanel.height - Theme.dp(64)
|
||||
height: implicitHeight > (leftPanel.height - 64) ? implicitHeight + 8 : leftPanel.height - 64
|
||||
|
||||
draggableItems: true
|
||||
draggableCategories: false
|
||||
@@ -166,10 +166,13 @@ StatusAppThreePanelLayout {
|
||||
centerPanel: Item {
|
||||
StatusChatToolBar {
|
||||
id: statusChatToolBar
|
||||
|
||||
anchors.top: parent.top
|
||||
width: parent.width
|
||||
toolbarComponent: statusChatInfoButton
|
||||
|
||||
chatInfoButton.title: "general"
|
||||
chatInfoButton.subTitle: "Community Chat"
|
||||
chatInfoButton.icon.color: Theme.palette.miscColor6
|
||||
chatInfoButton.type: StatusChatInfoButton.Type.CommunityChat
|
||||
onSearchButtonClicked: {
|
||||
searchButton.highlighted = !searchButton.highlighted;
|
||||
searchPopup.setSearchSelection(communityDetailModalTitle,
|
||||
@@ -181,18 +184,6 @@ 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 {
|
||||
@@ -248,34 +239,35 @@ StatusAppThreePanelLayout {
|
||||
anchors.topMargin:16
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
opacity: (rightPanel.width > Theme.dp(50)) ? 1.0 : 0.0
|
||||
opacity: (rightPanel.width > 50) ? 1.0 : 0.0
|
||||
visible: (opacity > 0.1)
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
text: qsTr("Members")
|
||||
}
|
||||
|
||||
ListView {
|
||||
anchors.top: titleText.bottom
|
||||
anchors.topMargin: Theme.dp(16)
|
||||
anchors.topMargin: 16
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Theme.dp(8)
|
||||
anchors.leftMargin: 8
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.dp(8)
|
||||
anchors.rightMargin: 8
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Theme.dp(16)
|
||||
anchors.bottomMargin: 16
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
model: Models.membersListModel
|
||||
delegate: StatusMemberListItem {
|
||||
implicitWidth: parent.width
|
||||
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
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@ StatusAppTwoPanelLayout {
|
||||
StatusNavigationPanelHeadline {
|
||||
id: profileHeadline
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Theme.dp(16)
|
||||
anchors.topMargin: 16
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Profile"
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
anchors.top: profileHeadline.bottom
|
||||
anchors.topMargin: Theme.dp(16)
|
||||
anchors.topMargin: 16
|
||||
anchors.bottom: parent.bottom
|
||||
width: parent.width
|
||||
|
||||
@@ -34,7 +34,7 @@ StatusAppTwoPanelLayout {
|
||||
Column {
|
||||
id: profileMenuItems
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: Theme.dp(4)
|
||||
spacing: 4
|
||||
|
||||
Repeater {
|
||||
model: Models.demoProfileGeneralMenuItems
|
||||
@@ -56,7 +56,7 @@ StatusAppTwoPanelLayout {
|
||||
|
||||
Item {
|
||||
id: invisibleSeparator
|
||||
height: Theme.dp(16)
|
||||
height: 16
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
|
||||
@@ -4,15 +4,65 @@ 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
|
||||
@@ -28,9 +78,7 @@ QtObject {
|
||||
itemId: "x012340001"
|
||||
name: "status-desktop"
|
||||
icon: ""
|
||||
emoji: ""
|
||||
isIdenticon: false
|
||||
colorHash: []
|
||||
color: "red"
|
||||
description: ""
|
||||
type: StatusChatListItem.Type.PublicChat
|
||||
@@ -47,9 +95,7 @@ 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
|
||||
@@ -65,9 +111,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
itemId: "x012340003"
|
||||
name: "Black Ops"
|
||||
icon: ""
|
||||
emoji: ""
|
||||
isIdenticon: false
|
||||
colorHash: []
|
||||
color: "purple"
|
||||
description: ""
|
||||
type: StatusChatListItem.Type.OneToOneChat
|
||||
@@ -83,9 +127,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
itemId: "x012340004"
|
||||
name: "Spectacular Growing Otter"
|
||||
icon: ""
|
||||
emoji: ""
|
||||
isIdenticon: false
|
||||
colorHash: []
|
||||
color: "orange"
|
||||
description: ""
|
||||
type: StatusChatListItem.Type.OneToOneChat
|
||||
@@ -101,9 +143,7 @@ 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
|
||||
@@ -357,6 +397,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
imageSource: ""
|
||||
iconName: "chat"
|
||||
iconColor: ""
|
||||
isIdenticon: false
|
||||
subItems: [
|
||||
ListElement {
|
||||
value: "sub_item_1_1"
|
||||
@@ -364,6 +405,7 @@ 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"
|
||||
@@ -371,6 +413,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
imageSource: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
||||
iconName: ""
|
||||
iconColor: ""
|
||||
isIdenticon: true
|
||||
}]}
|
||||
ListElement {
|
||||
value: "item_2"
|
||||
@@ -378,6 +421,7 @@ 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"
|
||||
@@ -385,6 +429,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
imageSource: ""
|
||||
iconName: "channel"
|
||||
iconColor: ""
|
||||
isIdenticon: false
|
||||
},
|
||||
ListElement {
|
||||
value: "sub_item_2_2"
|
||||
@@ -392,6 +437,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
imageSource: ""
|
||||
iconName: "channel"
|
||||
iconColor: ""
|
||||
isIdenticon: false
|
||||
},
|
||||
ListElement {
|
||||
value: "sub_item_2_3"
|
||||
@@ -399,6 +445,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
imageSource: ""
|
||||
iconName: "channel"
|
||||
iconColor: ""
|
||||
isIdenticon: false
|
||||
}]}
|
||||
ListElement {
|
||||
value: "item_3"
|
||||
@@ -406,6 +453,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
imageSource: "";
|
||||
iconName: "info"
|
||||
iconColor: ""
|
||||
isIdenticon: false
|
||||
subItems: [
|
||||
ListElement {
|
||||
value: "sub_item_3_1"
|
||||
@@ -413,6 +461,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
imageSource: ""
|
||||
iconName: "channel"
|
||||
iconColor: ""
|
||||
isIdenticon: false
|
||||
}]}
|
||||
ListElement {
|
||||
value: "item_4"
|
||||
@@ -420,6 +469,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
imageSource: "";
|
||||
iconName: ""
|
||||
iconColor: "red"
|
||||
isIdenticon: false
|
||||
subItems: [
|
||||
ListElement {
|
||||
value: "sub_item_4_1"
|
||||
@@ -427,6 +477,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
imageSource: ""
|
||||
iconName: "channel"
|
||||
iconColor: ""
|
||||
isIdenticon: false
|
||||
}]}
|
||||
}
|
||||
|
||||
@@ -843,50 +894,69 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
property var membersListModel: ListModel {
|
||||
id: membersList
|
||||
ListElement {
|
||||
localNickname: "This is an example"
|
||||
displayName: "Maria"
|
||||
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
|
||||
isVerified: true
|
||||
isUntrustworthy: false
|
||||
isContact: true
|
||||
onlineStatus: 1
|
||||
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
|
||||
nickName: "This is an example"
|
||||
userName: "annabelle"
|
||||
chatKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
|
||||
trustIndicator: StatusContactVerificationIcons.TrustedType.Verified
|
||||
isMutualContact: true
|
||||
isOnline: true
|
||||
source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
|
||||
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
||||
isAdmin: false
|
||||
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} ]
|
||||
}
|
||||
ListElement {
|
||||
localNickname: ""
|
||||
displayName: "carmen.eth"
|
||||
pubKey: "0x043a7ed78362567894688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
|
||||
isVerified: false
|
||||
isUntrustworthy: true
|
||||
isContact: false
|
||||
onlineStatus: 0
|
||||
icon: ""
|
||||
isAdmin: false
|
||||
nickName: "carmen.eth"
|
||||
userName: ""
|
||||
chatKey: ""
|
||||
trustIndicator: StatusContactVerificationIcons.TrustedType.Untrustworthy
|
||||
isMutualContact: false
|
||||
isOnline: false
|
||||
source: ""
|
||||
isIdenticon: false
|
||||
}
|
||||
ListElement {
|
||||
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
|
||||
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
|
||||
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 {
|
||||
localNickname: "Mark Cuban"
|
||||
displayName: "mark.eth"
|
||||
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc79872cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
|
||||
isVerified: false
|
||||
isUntrustworthy: true
|
||||
isContact: true
|
||||
onlineStatus: 0
|
||||
icon: ""
|
||||
isAdmin: false
|
||||
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}]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -948,20 +1018,9 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
hasNotification: false
|
||||
notificationsCount: 0
|
||||
}
|
||||
ListElement {
|
||||
sectionId: "communitiesPortal"
|
||||
sectionType: 2
|
||||
name: "Communities Portal"
|
||||
active: false
|
||||
image: ""
|
||||
icon: "communities"
|
||||
color: ""
|
||||
hasNotification: false
|
||||
notificationsCount: 0
|
||||
}
|
||||
ListElement {
|
||||
sectionId: "wallet"
|
||||
sectionType: 3
|
||||
sectionType: 2
|
||||
name: "Wallet"
|
||||
active: false
|
||||
image: ""
|
||||
@@ -972,7 +1031,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
||||
}
|
||||
ListElement {
|
||||
sectionId: "browser"
|
||||
sectionType: 4
|
||||
sectionType: 3
|
||||
name: "Browser"
|
||||
active: false
|
||||
image: ""
|
||||
@@ -993,491 +1052,4 @@ 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":"🌐"}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 190 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 957 B |
|
Before Width: | Height: | Size: 1009 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 730 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 190 KiB |
@@ -11,11 +11,6 @@ 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();
|
||||
|
||||
@@ -2,8 +2,6 @@ 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
|
||||
|
||||
@@ -13,14 +11,15 @@ 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: Theme.screenWidth
|
||||
height: Theme.screenHeight
|
||||
width: Qt.platform.os == "ios" || Qt.platform.os == "android" ? Screen.width
|
||||
: 1224
|
||||
height: Qt.platform.os == "ios" || Qt.platform.os == "android" ? Screen.height
|
||||
:840
|
||||
visible: true
|
||||
title: qsTr("StatusQ Documentation App")
|
||||
|
||||
@@ -32,7 +31,10 @@ StatusWindow {
|
||||
|
||||
property real factor: 1.0
|
||||
|
||||
Component.onCompleted: rootWindow.updatePosition()
|
||||
Component.onCompleted: {
|
||||
Theme.palette = lightTheme
|
||||
rootWindow.updatePosition();
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: appSectionType
|
||||
@@ -58,11 +60,6 @@ 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
|
||||
@@ -85,7 +82,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: Theme.dp(2)
|
||||
badge.border.width: 2
|
||||
onClicked: {
|
||||
stackView.clear()
|
||||
if(model.sectionType === appSectionType.apiDocumentation)
|
||||
@@ -110,13 +107,15 @@ StatusWindow {
|
||||
|
||||
ThemeSwitch {
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Theme.dp(32)
|
||||
anchors.topMargin: 32
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.dp(32)
|
||||
lightThemeEnabled: storeSettings.lightTheme
|
||||
onLightThemeEnabledChanged: {
|
||||
Theme.palette = lightThemeEnabled ? rootWindow.darkTheme : rootWindow.lightTheme
|
||||
storeSettings.lightTheme = lightThemeEnabled
|
||||
anchors.rightMargin: 32
|
||||
onCheckedChanged: {
|
||||
if (Theme.palette === rootWindow.lightTheme) {
|
||||
Theme.palette = rootWindow.darkTheme
|
||||
} else {
|
||||
Theme.palette = rootWindow.lightTheme
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,13 +126,11 @@ StatusWindow {
|
||||
StatusAppTwoPanelLayout {
|
||||
id: mainPageView
|
||||
|
||||
function page(name, fillPage) {
|
||||
storeSettings.fillPage = fillPage ? true : false
|
||||
function page(name) {
|
||||
viewLoader.source = Qt.resolvedUrl("./pages/" + name + "Page.qml");
|
||||
}
|
||||
function control(name) {
|
||||
viewLoader.source = Qt.resolvedUrl("./controls/" + name + ".qml");
|
||||
storeSettings.fillPage = false
|
||||
}
|
||||
|
||||
leftPanel: Item {
|
||||
@@ -142,92 +139,87 @@ StatusWindow {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
contentHeight: navigation.height + Theme.dp(56)
|
||||
contentHeight: navigation.height + 56
|
||||
contentWidth: navigation.width
|
||||
clip: true
|
||||
Column {
|
||||
id: navigation
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Theme.dp(48)
|
||||
anchors.topMargin: 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);
|
||||
@@ -243,22 +235,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);
|
||||
@@ -283,23 +275,8 @@ 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);
|
||||
@@ -321,16 +298,6 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -338,11 +305,8 @@ 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
|
||||
@@ -351,16 +315,14 @@ 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: storeSettings.selected.length === 0 ? mainPageView.control("Icons") : storeSettings.selected
|
||||
source: mainPageView.control("Icons")
|
||||
onSourceChanged: {
|
||||
storeSettings.selected = viewLoader.source
|
||||
if (source.toString().includes("Icons")) {
|
||||
item.iconColor = Theme.palette.primaryColor1;
|
||||
}
|
||||
@@ -368,15 +330,6 @@ StatusWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
Loader {
|
||||
active: storeSettings.fillPage
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.dp(64)
|
||||
visible: storeSettings.fillPage
|
||||
clip: true
|
||||
|
||||
source: viewLoader.source
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -415,12 +368,12 @@ StatusWindow {
|
||||
id: platformSwitch
|
||||
anchors.left: demoApp.left
|
||||
anchors.bottom: demoApp.top
|
||||
anchors.bottomMargin: Theme.dp(20)
|
||||
spacing: Theme.dp(2)
|
||||
anchors.bottomMargin: 20
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
text: "OSX"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
@@ -436,7 +389,7 @@ StatusWindow {
|
||||
|
||||
Text {
|
||||
text: "Win"
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
@@ -448,8 +401,8 @@ StatusWindow {
|
||||
anchors.fill: demoApp
|
||||
source: demoApp
|
||||
horizontalOffset: 0
|
||||
verticalOffset: Theme.dp(5)
|
||||
radius: Theme.dp(20)
|
||||
verticalOffset: 5
|
||||
radius: 20
|
||||
samples: 20
|
||||
color: "#22000000"
|
||||
}
|
||||
@@ -459,7 +412,7 @@ StatusWindow {
|
||||
StatusMacTrafficLights {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.margins: Theme.dp(13)
|
||||
anchors.margins: 13
|
||||
|
||||
visible: Qt.platform.os == "osx"
|
||||
|
||||
@@ -494,11 +447,4 @@ StatusWindow {
|
||||
rootWindow.toggleFullScreen()
|
||||
}
|
||||
}
|
||||
|
||||
Settings {
|
||||
id: storeSettings
|
||||
property string selected: ""
|
||||
property bool lightTheme: true
|
||||
property bool fillPage: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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: Theme.dp(8)
|
||||
spacing: 8
|
||||
|
||||
StatusAccountSelector {
|
||||
id: accountSelector
|
||||
|
||||
@@ -2,7 +2,6 @@ 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
|
||||
@@ -15,7 +14,7 @@ Column {
|
||||
}
|
||||
|
||||
Item {
|
||||
width: Theme.dp(200)
|
||||
width: 200
|
||||
height: childrenRect.height
|
||||
StatusAddress {
|
||||
text: "0x9ce0056c5fc6bb9459a4dcfa35eaad8c1fee5ce9"
|
||||
|
||||
@@ -8,8 +8,8 @@ import StatusQ.Popups 0.1
|
||||
|
||||
GridLayout {
|
||||
columns: 1
|
||||
columnSpacing: Theme.dp(5)
|
||||
rowSpacing: Theme.dp(5)
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
|
||||
StatusChatInfoToolBar {
|
||||
chatInfoButton.title: "Cryptokitties"
|
||||
|
||||
@@ -6,20 +6,20 @@ import StatusQ.Core.Theme 0.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
width: Theme.dp(800)
|
||||
height: Theme.dp(100)
|
||||
width: 800
|
||||
height: 100
|
||||
|
||||
Row {
|
||||
id: selectedColor
|
||||
anchors.top: parent.top
|
||||
anchors.left: colorSelectionGrid.left
|
||||
spacing: Theme.dp(10)
|
||||
spacing: 10
|
||||
StatusBaseText {
|
||||
text: "SelectedColor is"
|
||||
}
|
||||
Rectangle {
|
||||
width: Theme.dp(100)
|
||||
height: Theme.dp(20)
|
||||
width: 100
|
||||
height: 20
|
||||
radius: width/2
|
||||
color: colorSelectionGrid.selectedColor
|
||||
}
|
||||
@@ -28,7 +28,7 @@ Item {
|
||||
StatusColorSelectorGrid {
|
||||
id: colorSelectionGrid
|
||||
anchors.top: selectedColor.bottom
|
||||
anchors.topMargin: Theme.dp(10)
|
||||
anchors.topMargin: 10
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
titleText: "COLOR"
|
||||
selectedColorIndex: 2
|
||||
|
||||
@@ -9,7 +9,7 @@ import StatusQ.Controls 0.1
|
||||
import Sandbox 0.1
|
||||
|
||||
Column {
|
||||
spacing: Theme.dp(8)
|
||||
spacing: 8
|
||||
|
||||
StatusColorSelector {
|
||||
model: ["red", "blue", "green"]
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
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) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
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: Theme.dp(12)
|
||||
width: Theme.dp(800)
|
||||
spacing: 12
|
||||
width: 800
|
||||
anchors.top:parent.top
|
||||
leftPadding: Theme.dp(20)
|
||||
rightPadding: Theme.dp(20)
|
||||
leftPadding: 20
|
||||
rightPadding: 20
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: Theme.dp(30)
|
||||
height: 30
|
||||
color: Theme.palette.baseColor2
|
||||
StatusBaseText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -60,7 +60,7 @@ Column {
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: Theme.dp(30)
|
||||
height: 30
|
||||
color: Theme.palette.baseColor2
|
||||
StatusBaseText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -103,7 +103,7 @@ Column {
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: Theme.dp(30)
|
||||
height: 30
|
||||
color: Theme.palette.baseColor2
|
||||
StatusBaseText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -134,15 +134,15 @@ Column {
|
||||
id: notImplemented
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: Theme.dp(654)
|
||||
width: 654
|
||||
height: infoText.implicitHeight
|
||||
color: Theme.palette.baseColor5
|
||||
StatusBaseText {
|
||||
id: infoText
|
||||
anchors.centerIn: parent
|
||||
color: Theme.palette.directColor4
|
||||
font.pixelSize: Theme.dp(15)
|
||||
lineHeight: Theme.dp(22)
|
||||
font.pixelSize: 15
|
||||
lineHeight: 22
|
||||
lineHeightMode: Text.FixedHeight
|
||||
font.weight: Font.Medium
|
||||
text: qsTr("Not Implemented")
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import StatusQ.Controls.Validators 0.1
|
||||
import Sandbox 0.1
|
||||
|
||||
Column {
|
||||
spacing: Theme.dp(8)
|
||||
spacing: 8
|
||||
|
||||
StatusInput {
|
||||
input.placeholderText: "Placeholder"
|
||||
@@ -58,17 +58,16 @@ Column {
|
||||
}
|
||||
|
||||
Item {
|
||||
implicitWidth: Theme.dp(480)
|
||||
implicitHeight: Theme.dp(82)
|
||||
implicitWidth: 480
|
||||
implicitHeight: 102
|
||||
z: 100000
|
||||
StatusSeedPhraseInput {
|
||||
id: statusSeedInput
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
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.input.anchors.leftMargin: 16
|
||||
textEdit.input.anchors.rightMargin: 16
|
||||
textEdit.input.anchors.topMargin: 11
|
||||
textEdit.label: "Input with drop down selection list"
|
||||
leftComponentText: "1"
|
||||
inputList: ListModel {
|
||||
@@ -89,6 +88,7 @@ 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: Theme.dp(15)
|
||||
input.icon.height: Theme.dp(11)
|
||||
input.icon.width: 15
|
||||
input.icon.height: 11
|
||||
input.icon.name: text !== "" ? "checkmark" : ""
|
||||
input.leftIcon: false
|
||||
}
|
||||
@@ -107,7 +107,7 @@ Column {
|
||||
label: "Label"
|
||||
secondaryLabel: "secondary label"
|
||||
input.placeholderText: "Placeholder"
|
||||
input.implicitHeight: Theme.dp(56)
|
||||
input.implicitHeight: 56
|
||||
}
|
||||
|
||||
StatusInput {
|
||||
@@ -148,7 +148,7 @@ Column {
|
||||
input.placeholderText: "Input width component (right side)"
|
||||
input.rightComponent: StatusIcon {
|
||||
icon: "cancel"
|
||||
height: Theme.dp(16)
|
||||
height: 16
|
||||
color: Theme.palette.dangerColor1
|
||||
}
|
||||
}
|
||||
@@ -162,14 +162,14 @@ Column {
|
||||
StatusInput {
|
||||
input.multiline: true
|
||||
input.placeholderText: "Multiline with static height"
|
||||
input.implicitHeight: Theme.dp(100)
|
||||
input.implicitHeight: 100
|
||||
}
|
||||
|
||||
StatusInput {
|
||||
input.multiline: true
|
||||
input.placeholderText: "Multiline with max/min"
|
||||
input.minimumHeight: Theme.dp(80)
|
||||
input.maximumHeight: Theme.dp(200)
|
||||
input.minimumHeight: 80
|
||||
input.maximumHeight: 200
|
||||
}
|
||||
|
||||
StatusInput {
|
||||
@@ -200,7 +200,6 @@ 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"}]
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,11 @@ 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: Theme.dp(8)
|
||||
spacing: 8
|
||||
|
||||
StatusMacNotification {
|
||||
name: "Some name"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import QtQuick.Layouts 1.14
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
GridLayout {
|
||||
columns: 1
|
||||
columnSpacing: Theme.dp(5)
|
||||
rowSpacing: Theme.dp(5)
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
|
||||
StatusPasswordStrengthIndicator {
|
||||
id: veryweakPw
|
||||
|
||||
@@ -8,7 +8,7 @@ import StatusQ.Controls.Validators 0.1
|
||||
|
||||
Column {
|
||||
id: root
|
||||
spacing: Theme.dp(25)
|
||||
spacing: 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: Theme.dp(30)
|
||||
font.pixelSize: 30
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
@@ -30,23 +30,23 @@ Column {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Theme.palette.dangerColor1
|
||||
text: "Only numbers allowed"
|
||||
font.pixelSize: Theme.dp(16)
|
||||
font.pixelSize: 16
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Theme.palette.directColor1
|
||||
text: "Introduced PIN: " + numbersPinInput.pinInput
|
||||
font.pixelSize: Theme.dp(12)
|
||||
font.pixelSize: 12
|
||||
}
|
||||
|
||||
// PIN input that accepts input depending on the regular expression definition
|
||||
StatusBaseText {
|
||||
topPadding: Theme.dp(100)
|
||||
topPadding: 100
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Theme.palette.directColor1
|
||||
text: "Enter another Keycard PIN"
|
||||
font.pixelSize: Theme.dp(30)
|
||||
font.pixelSize: 30
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ Column {
|
||||
id: regexPinInput
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
validator: StatusRegularExpressionValidator { regularExpression: /[0-9A-Za-z@]+/ }
|
||||
circleDiameter: Theme.dp(22)
|
||||
circleSpacing: Theme.dp(22)
|
||||
circleDiameter: 22
|
||||
circleSpacing: 22
|
||||
pinLen: 7
|
||||
}
|
||||
|
||||
@@ -63,13 +63,13 @@ Column {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Theme.palette.dangerColor1
|
||||
text: "Only alphanumeric characters and '@' allowed"
|
||||
font.pixelSize: Theme.dp(16)
|
||||
font.pixelSize: 16
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Theme.palette.directColor1
|
||||
text: "Introduced PIN: " + regexPinInput.pinInput
|
||||
font.pixelSize: Theme.dp(12)
|
||||
font.pixelSize: 12
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import StatusQ.Popups 0.1
|
||||
|
||||
GridLayout {
|
||||
columns: 1
|
||||
columnSpacing: Theme.dp(5)
|
||||
rowSpacing: Theme.dp(5)
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
|
||||
StatusButton {
|
||||
text: "Simple"
|
||||
|
||||
@@ -9,7 +9,7 @@ import StatusQ.Popups 0.1
|
||||
|
||||
import Sandbox 0.1
|
||||
Column {
|
||||
spacing: Theme.dp(8)
|
||||
spacing: 8
|
||||
|
||||
StatusSelect {
|
||||
id: select
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import StatusQ.Controls 0.1
|
||||
import Sandbox 0.1
|
||||
|
||||
Column {
|
||||
spacing: Theme.dp(8)
|
||||
spacing: 8
|
||||
|
||||
Row {
|
||||
StatusTabBarIconButton {
|
||||
|
||||
@@ -3,12 +3,11 @@ 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: Theme.dp(5)
|
||||
rowSpacing: Theme.dp(5)
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
|
||||
StatusSwitchTabBar {
|
||||
StatusSwitchTabButton {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import QtQuick 2.14
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -10,21 +9,17 @@ Item {
|
||||
property ListModel asortedContacts: ListModel {
|
||||
ListElement {
|
||||
publicId: "0x0"
|
||||
name: "emily.eth"
|
||||
name: "Maria"
|
||||
icon: ""
|
||||
isIdenticon: false
|
||||
onlineStatus: 3
|
||||
isReadonly: false
|
||||
tagIcon: ""
|
||||
}
|
||||
ListElement {
|
||||
publicId: "0x1"
|
||||
name: "vitalikbuterin"
|
||||
name: "James"
|
||||
icon: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
|
||||
isIdenticon: false
|
||||
onlineStatus: 1
|
||||
isReadonly: false
|
||||
tagIcon: ""
|
||||
}
|
||||
ListElement {
|
||||
publicId: "0x2"
|
||||
@@ -32,17 +27,13 @@ Item {
|
||||
icon: ""
|
||||
isIdenticon: false
|
||||
onlineStatus: 2
|
||||
isReadonly: false
|
||||
tagIcon: ""
|
||||
}
|
||||
ListElement {
|
||||
publicId: "0x3"
|
||||
name: "carmen.eth"
|
||||
name: "Tracy"
|
||||
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
||||
isIdenticon: true
|
||||
onlineStatus: 3
|
||||
isReadonly: true
|
||||
tagIcon: "crown"
|
||||
}
|
||||
ListElement {
|
||||
publicId: "0x4"
|
||||
@@ -50,15 +41,13 @@ Item {
|
||||
icon: ""
|
||||
isIdenticon: false
|
||||
onlineStatus: 3
|
||||
isReadonly: false
|
||||
tagIcon: ""
|
||||
}
|
||||
}
|
||||
|
||||
StatusTagSelector {
|
||||
id: tagSelector
|
||||
width: Theme.dp(650)
|
||||
height: Theme.dp(44)
|
||||
width: 650
|
||||
height: 44
|
||||
anchors.centerIn: parent
|
||||
namesModel: root.asortedContacts
|
||||
toLabelText: qsTr("To: ")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import QtQuick 2.14
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -10,17 +9,16 @@ Item {
|
||||
Column {
|
||||
id: toastArea
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.dp(8)
|
||||
spacing: 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":"", "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}
|
||||
{"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":""}
|
||||
]
|
||||
delegate: StatusToastMessage {
|
||||
primaryText: modelData.title
|
||||
@@ -29,15 +27,12 @@ Item {
|
||||
loading: modelData.loading
|
||||
type: modelData.type
|
||||
linkUrl: modelData.url
|
||||
duration: modelData.duration
|
||||
onLinkActivated: {
|
||||
Qt.openUrlExternally(link);
|
||||
}
|
||||
onClose: {
|
||||
console.warn("toast closed: ", modelData.title)
|
||||
}
|
||||
onClicked: {
|
||||
console.warn("toast clicked")
|
||||
//simulate open
|
||||
Component.onCompleted: {
|
||||
open = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ Column {
|
||||
spacing: 8
|
||||
|
||||
Row {
|
||||
spacing: Theme.dp(4)
|
||||
spacing: 4
|
||||
StatusWalletColorButton {
|
||||
icon.color: Theme.palette.miscColor1
|
||||
selected: true
|
||||
|
||||
@@ -9,9 +9,9 @@ import StatusQ.Controls 0.1
|
||||
import Sandbox 0.1
|
||||
|
||||
Column {
|
||||
spacing: Theme.dp(8)
|
||||
spacing: 8
|
||||
|
||||
StatusWalletColorSelect {
|
||||
model: Theme.palette.userCustomizationColors
|
||||
model: Theme.palette.accountColors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import StatusQ.Core.Theme 0.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
width: Theme.dp(800)
|
||||
height: Theme.dp(100)
|
||||
width: 800
|
||||
height: 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: Theme.dp(17)
|
||||
font.pixelSize: 17
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
@@ -91,9 +91,9 @@ Item {
|
||||
|
||||
StatusWizardStepper {
|
||||
id: wizardStepper
|
||||
width: (parent.width - Theme.dp(50))
|
||||
width: (parent.width - 50)
|
||||
anchors.top: indicLabel.bottom
|
||||
anchors.topMargin: Theme.dp(16)
|
||||
anchors.topMargin: 16
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
stepsModel: stepsListModel
|
||||
}
|
||||
|
||||
@@ -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,8 +24,6 @@
|
||||
<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>
|
||||
@@ -33,40 +31,5 @@
|
||||
<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>
|
||||
@@ -1,30 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
module StatusQ.Animations
|
||||
|
||||
SkeletonAnimation 0.1 SkeletonAnimation.qml
|
||||
SkeletonGradientStop 0.1 SkeletonGradientStop.qml
|
||||
@@ -13,7 +13,7 @@ StatusBaseText {
|
||||
property real maxWidth: width
|
||||
|
||||
font.family: Theme.palette.monoFont.name
|
||||
font.pixelSize: Theme.dp(13)
|
||||
font.pixelSize: 13
|
||||
elide: Text.ElideMiddle
|
||||
color: Theme.palette.baseColor1
|
||||
|
||||
|
||||
@@ -7,18 +7,18 @@ Rectangle {
|
||||
|
||||
property int value
|
||||
|
||||
implicitHeight: statusBadge.value > 0 ? Theme.dp(18) + statusBadge.border.width : Theme.dp(10) + statusBadge.border.width
|
||||
implicitHeight: statusBadge.value > 0 ? 18 + statusBadge.border.width : 10 + statusBadge.border.width
|
||||
implicitWidth: {
|
||||
if (statusBadge.value > Theme.dp(99)) {
|
||||
return Theme.dp(28) + statusBadge.border.width
|
||||
if (statusBadge.value > 99) {
|
||||
return 28 + statusBadge.border.width
|
||||
}
|
||||
if (statusBadge.value > Theme.dp(9)) {
|
||||
return Theme.dp(26) + statusBadge.border.width
|
||||
if (statusBadge.value > 9) {
|
||||
return 26 + statusBadge.border.width
|
||||
}
|
||||
if (statusBadge.value > 0) {
|
||||
return Theme.dp(18) + statusBadge.border.width
|
||||
return 18 + statusBadge.border.width
|
||||
}
|
||||
return Theme.dp(10) + statusBadge.border.width
|
||||
return 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 > Theme.dp(99) ? Theme.dp(10) : Theme.dp(12)
|
||||
font.pixelSize: statusBadge.value > 99 ? 10 : 12
|
||||
font.weight: Font.Medium
|
||||
color: Theme.palette.statusBadge.foregroundColor
|
||||
anchors.centerIn: parent
|
||||
text: {
|
||||
if (statusBadge.value > 99) {
|
||||
return qsTr("99+");
|
||||
return "99+";
|
||||
}
|
||||
return statusBadge.value;
|
||||
}
|
||||
|
||||
@@ -3,13 +3,12 @@ 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: Theme.dp(288)
|
||||
implicitHeight: Theme.dp(56)
|
||||
implicitWidth: 288
|
||||
implicitHeight: 56
|
||||
|
||||
property alias chatInfoButton: statusChatInfoButton
|
||||
property alias menuButton: statusMenuButton
|
||||
@@ -28,7 +27,8 @@ Item {
|
||||
id: statusChatInfoButton
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: (implicitWidth > parent.width - Theme.dp(50)) ? statusMenuButton.left : undefined
|
||||
anchors.leftMargin: 5
|
||||
anchors.right: (implicitWidth > parent.width - 50) ? statusMenuButton.left : undefined
|
||||
anchors.rightMargin: 5
|
||||
type: StatusChatInfoButton.Type.OneToOneChat
|
||||
onClicked: statusChatInfoToolBar.chatInfoButtonClicked()
|
||||
@@ -37,11 +37,12 @@ Item {
|
||||
StatusRoundButton {
|
||||
id: statusMenuButton
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
visible: popupMenuSlot.active
|
||||
width: visible ? Theme.dp(32) : 0
|
||||
height: Theme.dp(32)
|
||||
width: visible ? 32 : 0
|
||||
height: 32
|
||||
|
||||
type: StatusRoundButton.Type.Secondary
|
||||
icon.name: "add"
|
||||
@@ -90,7 +91,7 @@ Item {
|
||||
onClicked: {
|
||||
statusChatInfoToolBar.addButtonClicked(mouse)
|
||||
statusMenuButton.state = "pressed"
|
||||
popupMenuSlot.item.popup(statusMenuButton.width-popupMenuSlot.item.width, statusMenuButton.height + Theme.dp(4))
|
||||
popupMenuSlot.item.popup(statusMenuButton.width-popupMenuSlot.item.width, statusMenuButton.height + 4)
|
||||
}
|
||||
|
||||
Loader {
|
||||
@@ -103,4 +104,5 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,13 +11,12 @@ import StatusQ.Controls 0.1
|
||||
Column {
|
||||
id: statusChatList
|
||||
|
||||
spacing: Theme.dp(4)
|
||||
width: Theme.dp(288)
|
||||
spacing: 4
|
||||
width: 288
|
||||
|
||||
property string categoryId: ""
|
||||
property var model: null
|
||||
property bool draggableItems: false
|
||||
property bool highlightItem: true
|
||||
|
||||
property alias statusChatListItems: statusChatListItems
|
||||
|
||||
@@ -91,25 +90,23 @@ Column {
|
||||
}
|
||||
|
||||
StatusChatListItem {
|
||||
id: 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 && statusChatList.highlightItem)
|
||||
|
||||
icon.emoji: model.emoji
|
||||
icon.color: !!model.color ? model.color : Theme.palette.userCustomizationColors[model.colorId]
|
||||
image.isIdenticon: false
|
||||
selected: model.active
|
||||
icon.color: model.color
|
||||
image.isIdenticon: model.isIdenticon
|
||||
image.source: model.icon
|
||||
ringSettings.ringSpecModel: model.colorHash
|
||||
|
||||
sensor.cursorShape: dragSensor.cursorShape
|
||||
onClicked: {
|
||||
|
||||
@@ -6,7 +6,6 @@ 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
|
||||
@@ -15,10 +14,10 @@ Item {
|
||||
implicitWidth: chatListsAndCategories.width
|
||||
|
||||
property StatusTooltipSettings categoryAddButtonToolTip: StatusTooltipSettings {
|
||||
text: qsTr("Add channel inside category")
|
||||
text: "Add channel inside category"
|
||||
}
|
||||
property StatusTooltipSettings categoryMenuButtonToolTip: StatusTooltipSettings {
|
||||
text: qsTr("More")
|
||||
text: "More"
|
||||
}
|
||||
|
||||
property var model: []
|
||||
@@ -65,10 +64,11 @@ Item {
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: Theme.dp(4)
|
||||
spacing: 4
|
||||
|
||||
StatusChatList {
|
||||
id: statusChatList
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: statusChatList.model.count > 0
|
||||
onChatItemSelected: statusChatListAndCategories.chatItemSelected(categoryId, id)
|
||||
onChatItemUnmuted: statusChatListAndCategories.chatItemUnmuted(id)
|
||||
|
||||
@@ -8,11 +8,11 @@ import StatusQ.Components 0.1
|
||||
StatusListItem {
|
||||
id: statusChatListCategoryItem
|
||||
|
||||
implicitWidth: Theme.dp(288)
|
||||
implicitHeight: Theme.dp(28)
|
||||
implicitWidth: 288
|
||||
implicitHeight: 28
|
||||
|
||||
leftPadding: Theme.dp(8)
|
||||
rightPadding: Theme.dp(8)
|
||||
leftPadding: 8
|
||||
rightPadding: 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: Theme.dp(1)
|
||||
statusListItemComponentsSlot.spacing: 1
|
||||
|
||||
components: [
|
||||
StatusChatListCategoryItemButton {
|
||||
id: addButton
|
||||
icon.name: "add"
|
||||
icon.width: Theme.dp(20)
|
||||
visible: statusChatListCategoryItem.showAddButton &&
|
||||
icon.width: 20
|
||||
visible: statusChatListCategoryItem.showAddButton &&
|
||||
(statusChatListCategoryItem.highlighted ||
|
||||
statusChatListCategoryItem.sensor.containsMouse)
|
||||
onClicked: statusChatListCategoryItem.addButtonClicked(mouse)
|
||||
tooltip.text: qsTr("Add channel inside category")
|
||||
tooltip.text: "Add channel inside category"
|
||||
},
|
||||
StatusChatListCategoryItemButton {
|
||||
id: menuButton
|
||||
icon.name: "more"
|
||||
icon.width: Theme.dp(21)
|
||||
visible: statusChatListCategoryItem.showMenuButton &&
|
||||
icon.width: 21
|
||||
visible: statusChatListCategoryItem.showMenuButton &&
|
||||
(statusChatListCategoryItem.highlighted ||
|
||||
statusChatListCategoryItem.sensor.containsMouse)
|
||||
onClicked: statusChatListCategoryItem.menuButtonClicked(mouse)
|
||||
tooltip.text: qsTr("More")
|
||||
tooltip.text: "More"
|
||||
},
|
||||
StatusChatListCategoryItemButton {
|
||||
id: toggleButton
|
||||
icon.name: "chevron-down"
|
||||
icon.width: Theme.dp(18)
|
||||
icon.width: 18
|
||||
icon.rotation: statusChatListCategoryItem.opened ? 0 : 270
|
||||
onPressed: {
|
||||
sensor.enabled = false;
|
||||
|
||||
@@ -10,7 +10,7 @@ import StatusQ.Components 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
id: statusChatListItem
|
||||
|
||||
objectName: "chatItem"
|
||||
property int originalOrder: -1
|
||||
@@ -22,17 +22,18 @@ Rectangle {
|
||||
property int notificationsCount: 0
|
||||
property bool muted: false
|
||||
property StatusImageSettings image: StatusImageSettings {
|
||||
width: Theme.dp(24)
|
||||
height: Theme.dp(24)
|
||||
width: 24
|
||||
height: 24
|
||||
}
|
||||
property StatusIconSettings icon: StatusIconSettings {
|
||||
width: Theme.dp(24)
|
||||
height: Theme.dp(24)
|
||||
width: 24
|
||||
height: 24
|
||||
color: Theme.palette.miscColor5
|
||||
letterSize: emoji ? 11 : 15
|
||||
emoji: ""
|
||||
charactersLen: root.type === StatusChatListItem.Type.OneToOneChat ? 2 : 1
|
||||
emojiSize: Emoji.size.verySmall
|
||||
charactersLen: 1
|
||||
}
|
||||
property alias ringSettings: identicon.ringSettings
|
||||
property int type: StatusChatListItem.Type.PublicChat
|
||||
property bool highlighted: false
|
||||
property bool highlightWhenCreated: false
|
||||
@@ -53,10 +54,10 @@ Rectangle {
|
||||
CommunityChat // 6
|
||||
}
|
||||
|
||||
implicitWidth: Theme.dp(288)
|
||||
implicitHeight: Theme.dp(40)
|
||||
implicitWidth: 288
|
||||
implicitHeight: 40
|
||||
|
||||
radius: Theme.dp(8)
|
||||
radius: 8
|
||||
|
||||
color: {
|
||||
if (selected) {
|
||||
@@ -78,40 +79,40 @@ Rectangle {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
onClicked: root.clicked(mouse)
|
||||
onClicked: statusChatListItem.clicked(mouse)
|
||||
|
||||
StatusSmartIdenticon {
|
||||
id: identicon
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
image: root.image
|
||||
icon: root.icon
|
||||
name: root.name
|
||||
image: statusChatListItem.image
|
||||
icon: statusChatListItem.icon
|
||||
name: statusChatListItem.name
|
||||
}
|
||||
|
||||
StatusIcon {
|
||||
id: statusIcon
|
||||
anchors.left: identicon.right
|
||||
anchors.leftMargin: Theme.dp(8)
|
||||
anchors.leftMargin: 8
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
width: Theme.dp(14)
|
||||
visible: root.type !== StatusChatListItem.Type.OneToOneChat
|
||||
width: 14
|
||||
visible: statusChatListItem.type !== StatusChatListItem.Type.OneToOneChat
|
||||
opacity: {
|
||||
if (root.muted && !hoverHander.hovered && !root.highlighted) {
|
||||
if (statusChatListItem.muted && !hoverHander.hovered && !statusChatListItem.highlighted) {
|
||||
return 0.4
|
||||
}
|
||||
return root.hasUnreadMessages ||
|
||||
root.notificationsCount > 0 ||
|
||||
root.selected ||
|
||||
root.highlighted ||
|
||||
return statusChatListItem.hasUnreadMessages ||
|
||||
statusChatListItem.notificationsCount > 0 ||
|
||||
statusChatListItem.selected ||
|
||||
statusChatListItem.highlighted ||
|
||||
statusBadge.visible ||
|
||||
hoverHander.hovered ? 1.0 : 0.7
|
||||
}
|
||||
|
||||
icon: {
|
||||
switch (root.type) {
|
||||
switch (statusChatListItem.type) {
|
||||
case StatusChatListItem.Type.PublicCat:
|
||||
return Theme.palette.name == "light" ? "tiny/public-chat" : "tiny/public-chat-white"
|
||||
break;
|
||||
@@ -133,32 +134,32 @@ Rectangle {
|
||||
anchors.leftMargin: statusIcon.visible ? 1 : 8
|
||||
anchors.right: mutedIcon.visible ? mutedIcon.left :
|
||||
statusBadge.visible ? statusBadge.left : parent.right
|
||||
anchors.rightMargin: Theme.dp(6)
|
||||
anchors.rightMargin: 6
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
text: (root.type === StatusChatListItem.Type.PublicChat &&
|
||||
!root.name.startsWith("#") ?
|
||||
"#" + root.name :
|
||||
root.name)
|
||||
text: (statusChatListItem.type === StatusChatListItem.Type.PublicChat &&
|
||||
!statusChatListItem.name.startsWith("#") ?
|
||||
"#" + statusChatListItem.name :
|
||||
statusChatListItem.name)
|
||||
elide: Text.ElideRight
|
||||
color: {
|
||||
if (root.muted && !hoverHander.hovered && !root.highlighted) {
|
||||
if (statusChatListItem.muted && !hoverHander.hovered && !statusChatListItem.highlighted) {
|
||||
return Theme.palette.directColor5
|
||||
}
|
||||
return root.hasUnreadMessages ||
|
||||
root.notificationsCount > 0 ||
|
||||
root.selected ||
|
||||
root.highlighted ||
|
||||
root.highlightWhenCreated ||
|
||||
return statusChatListItem.hasUnreadMessages ||
|
||||
statusChatListItem.notificationsCount > 0 ||
|
||||
statusChatListItem.selected ||
|
||||
statusChatListItem.highlighted ||
|
||||
statusChatListItem.highlightWhenCreated ||
|
||||
hoverHander.hovered ||
|
||||
statusBadge.visible ? Theme.palette.directColor1 : Theme.palette.directColor4
|
||||
}
|
||||
font.weight: !root.muted &&
|
||||
(root.hasUnreadMessages ||
|
||||
root.notificationsCount > 0 ||
|
||||
root.highlightWhenCreated ||
|
||||
font.weight: !statusChatListItem.muted &&
|
||||
(statusChatListItem.hasUnreadMessages ||
|
||||
statusChatListItem.notificationsCount > 0 ||
|
||||
statusChatListItem.highlightWhenCreated ||
|
||||
statusBadge.visible) ? Font.Bold : Font.Medium
|
||||
font.pixelSize: Theme.dp(15)
|
||||
font.pixelSize: 15
|
||||
}
|
||||
|
||||
StatusIcon {
|
||||
@@ -166,21 +167,21 @@ Rectangle {
|
||||
anchors.right: statusBadge.visible ? statusBadge.left : parent.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: Theme.dp(14)
|
||||
width: 14
|
||||
opacity: mutedIconSensor.containsMouse ? 1.0 : 0.2
|
||||
icon: Theme.palette.name === "light" ? "tiny/muted" : "tiny/muted-white"
|
||||
visible: root.muted
|
||||
visible: statusChatListItem.muted
|
||||
|
||||
MouseArea {
|
||||
id: mutedIconSensor
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: root.unmute()
|
||||
onClicked: statusChatListItem.unmute()
|
||||
}
|
||||
|
||||
StatusToolTip {
|
||||
text: qsTr("Unmute")
|
||||
text: "Unmute"
|
||||
visible: mutedIconSensor.containsMouse
|
||||
}
|
||||
}
|
||||
@@ -190,13 +191,13 @@ Rectangle {
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.dp(8)
|
||||
anchors.rightMargin: 8
|
||||
|
||||
color: root.muted ? Theme.palette.primaryColor2 : Theme.palette.primaryColor1
|
||||
border.width: Theme.dp(4)
|
||||
color: statusChatListItem.muted ? Theme.palette.primaryColor2 : Theme.palette.primaryColor1
|
||||
border.width: 4
|
||||
border.color: color
|
||||
value: root.notificationsCount
|
||||
visible: root.notificationsCount > 0
|
||||
value: statusChatListItem.notificationsCount
|
||||
visible: statusChatListItem.notificationsCount > 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
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
|
||||
Item {
|
||||
id: statusChatToolBar
|
||||
|
||||
Rectangle {
|
||||
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 padding: Theme.dp(8)
|
||||
property int notificationCount: 0
|
||||
|
||||
property Component popupMenu
|
||||
property var toolbarComponent
|
||||
|
||||
signal chatInfoButtonClicked()
|
||||
signal menuButtonClicked()
|
||||
@@ -24,125 +26,150 @@ Item {
|
||||
signal membersButtonClicked()
|
||||
signal searchButtonClicked()
|
||||
|
||||
implicitWidth: Theme.dp(518)
|
||||
implicitHeight: Theme.dp(60)
|
||||
|
||||
onPopupMenuChanged: {
|
||||
if (!!popupMenu) {
|
||||
popupMenuSlot.sourceComponent = popupMenu
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
spacing: padding / 2
|
||||
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()
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: loader
|
||||
sourceComponent: statusChatToolBar.toolbarComponent
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||
Layout.topMargin: padding
|
||||
Layout.leftMargin: padding
|
||||
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
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: actionButtons
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignRight
|
||||
Layout.topMargin: padding
|
||||
Layout.rightMargin: padding
|
||||
spacing: 8
|
||||
StatusFlatRoundButton {
|
||||
id: membersButton
|
||||
width: 32
|
||||
height: 32
|
||||
icon.name: "group-chat"
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
onClicked: statusChatToolBar.membersButtonClicked()
|
||||
|
||||
StatusFlatRoundButton {
|
||||
id: searchButton
|
||||
width: Theme.dp(32)
|
||||
height: Theme.dp(32)
|
||||
icon.name: "search"
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
onClicked: statusChatToolBar.searchButtonClicked()
|
||||
// initializing the tooltip
|
||||
tooltip.text: "Members"
|
||||
tooltip.orientation: StatusToolTip.Orientation.Bottom
|
||||
tooltip.y: parent.height + 12
|
||||
}
|
||||
|
||||
// initializing the tooltip
|
||||
tooltip.text: qsTr("Search")
|
||||
tooltip.orientation: StatusToolTip.Orientation.Bottom
|
||||
tooltip.y: parent.height + Theme.dp(12)
|
||||
}
|
||||
StatusFlatRoundButton {
|
||||
id: menuButton
|
||||
width: 32
|
||||
height: 32
|
||||
icon.name: "more"
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
visible: !!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.visible: !!tooltip.text && menuButton.hovered && !popupMenuSlot.item.opened
|
||||
tooltip.text: "More"
|
||||
tooltip.orientation: StatusToolTip.Orientation.Bottom
|
||||
tooltip.y: parent.height + 12
|
||||
|
||||
// initializing the tooltip
|
||||
tooltip.text: qsTr("Members")
|
||||
tooltip.orientation: StatusToolTip.Orientation.Bottom
|
||||
tooltip.y: parent.height + 12
|
||||
}
|
||||
property bool showMoreMenu: false
|
||||
onClicked: {
|
||||
menuButton.highlighted = true
|
||||
|
||||
StatusFlatRoundButton {
|
||||
id: menuButton
|
||||
width: Theme.dp(32)
|
||||
height: Theme.dp(32)
|
||||
icon.name: "more"
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
visible: !!statusChatToolBar.popupMenu
|
||||
let originalOpenHandler = popupMenuSlot.item.openHandler
|
||||
let originalCloseHandler = popupMenuSlot.item.closeHandler
|
||||
|
||||
// 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)
|
||||
|
||||
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.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()
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: popupMenuSlot
|
||||
active: !!statusChatToolBar.popupMenu
|
||||
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()
|
||||
}
|
||||
|
||||
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()
|
||||
Loader {
|
||||
id: popupMenuSlot
|
||||
active: !!statusChatToolBar.popupMenu
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
height: 24
|
||||
width: 1
|
||||
color: Theme.palette.directColor7
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: notificationButton.visible &&
|
||||
(menuButton.visible || membersButton.visible || searchButton.visible)
|
||||
}
|
||||
|
||||
StatusFlatRoundButton {
|
||||
id: notificationButton
|
||||
width: 32
|
||||
height: 32
|
||||
|
||||
icon.name: "notification"
|
||||
icon.height: 21
|
||||
type: StatusFlatRoundButton.Type.Secondary
|
||||
|
||||
// initializing the tooltip
|
||||
tooltip.text: "Activity"
|
||||
tooltip.orientation: StatusToolTip.Orientation.Bottom
|
||||
tooltip.y: parent.height + 12
|
||||
|
||||
onClicked: statusChatToolBar.notificationButtonClicked()
|
||||
|
||||
StatusBadge {
|
||||
id: statusBadge
|
||||
|
||||
visible: value > 0
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.right
|
||||
anchors.topMargin: -3
|
||||
anchors.leftMargin: {
|
||||
if (statusBadge.value > 99) {
|
||||
return -22
|
||||
}
|
||||
if (statusBadge.value > 9) {
|
||||
return -21
|
||||
}
|
||||
return -18
|
||||
}
|
||||
|
||||
value: statusChatToolBar.notificationCount
|
||||
border.width: 2
|
||||
border.color: parent.hovered ? Theme.palette.baseColor2 : Theme.palette.statusAppLayout.backgroundColor
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -1,469 +0,0 @@
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
/*!
|
||||
\qmltype StatusCommunityCard
|
||||
\inherits Rectangle
|
||||
\inqmlmodule StatusQ.Components
|
||||
\since StatusQ.Components 0.1
|
||||
\brief It is a community card item that provides relevant information about a community model. Inherits \l{https://doc.qt.io/qt-5/qml-qtquick-rectangle.html}{Rectangle}.
|
||||
|
||||
The \c StatusCommunityCard is a community card clickable item that represents a data model. The data model is commonly a JavaScript array or a ListModel object.
|
||||
|
||||
Example of how the component looks like:
|
||||
\image status_community_card.png
|
||||
Example of how to use it:
|
||||
\qml
|
||||
StatusCommunityCard {
|
||||
locale: "en"
|
||||
communityId: model.communityId
|
||||
loaded: model.available
|
||||
logo: model.icon
|
||||
name: model.name
|
||||
description: model.description
|
||||
members: model.members
|
||||
popularity: model.popularity
|
||||
categories: model.categories
|
||||
|
||||
onClicked: { d.navigateToCommunity(communityId) }
|
||||
}
|
||||
\endqml
|
||||
For a list of components available see StatusQ.
|
||||
*/
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
/*!
|
||||
\qmlproperty string StatusCommunityCard::communityId
|
||||
This property holds the community identifier value.
|
||||
*/
|
||||
property string communityId: ""
|
||||
/*!
|
||||
\qmlproperty bool StatusCommunityCard::loaded
|
||||
This property holds a boolean value that represents if the community information is loaded or not.
|
||||
*/
|
||||
property bool loaded: true
|
||||
/*!
|
||||
\qmlproperty url StatusCommunityCard::logo
|
||||
This property holds the community logo source.
|
||||
*/
|
||||
property url logo: ""
|
||||
/*!
|
||||
\qmlproperty string StatusCommunityCard::name
|
||||
This property holds the community name.
|
||||
*/
|
||||
property string name: ""
|
||||
/*!
|
||||
\qmlproperty string StatusCommunityCard::description
|
||||
This property holds the community description.
|
||||
*/
|
||||
property string description: ""
|
||||
/*!
|
||||
\qmlproperty int StatusCommunityCard::members
|
||||
This property holds the community members value.
|
||||
*/
|
||||
property int members: 0
|
||||
/*!
|
||||
\qmlproperty int StatusCommunityCard::activeUsers
|
||||
This property holds the community active users value.
|
||||
*/
|
||||
property int activeUsers: 0
|
||||
/*!
|
||||
\qmlproperty int StatusCommunityCard::popularity
|
||||
This property holds the community popularity (community rate).
|
||||
*/
|
||||
property int popularity: 0
|
||||
/*!
|
||||
\qmlproperty string StatusCommunityCard::categories
|
||||
This property holds the data that will be populated as the tags row of the community.
|
||||
|
||||
Here an example of the model roles expected:
|
||||
\qml
|
||||
categories: ListModel {
|
||||
ListElement { name: "gaming"; emoji: "🎮"; selected: false}
|
||||
ListElement { name: "art"; emoji: "🖼️️"; selected: false}
|
||||
ListElement { name: "crypto"; emoji: "💸"; selected: false}
|
||||
ListElement { name: "nsfw"; emoji: "🍆"; selected: false}
|
||||
ListElement { name: "markets"; emoji: "💎"; selected: false}
|
||||
}
|
||||
\endqml
|
||||
*/
|
||||
property ListModel categories: ListModel {}
|
||||
/*!
|
||||
\qmlproperty string StatusCommunityCard::locale
|
||||
This property holds the application locale used to give format to members number representation.
|
||||
If not provided, default value is "en".
|
||||
*/
|
||||
property string locale: "en"
|
||||
/*!
|
||||
\qmlproperty url StatusCommunityCard::banner
|
||||
This property holds the community banner image url.
|
||||
*/
|
||||
property url banner: ""
|
||||
/*!
|
||||
\qmlproperty color StatusCommunityCard::communityColor
|
||||
This property holds the community color.
|
||||
If not provided, default value in Light Theme is "#4360DF" and in Dark Theme is "#88B0FF".
|
||||
*/
|
||||
property color communityColor: Theme.palette.primaryColor1
|
||||
/*!
|
||||
\qmlproperty bool StatusCommunityCard::isPrivate
|
||||
This property holds if the community is private.
|
||||
If not provided, default value is false.
|
||||
*/
|
||||
property bool isPrivate: false
|
||||
/*!
|
||||
\qmlproperty url StatusCommunityCard::tokenLogo
|
||||
This property holds the image of the token needed if the community is private.
|
||||
*/
|
||||
property url tokenLogo: ""
|
||||
|
||||
/*!
|
||||
\qmlsignal StatusCommunityCard::clicked(string communityId)
|
||||
This signal is emitted when the card item is clicked.
|
||||
*/
|
||||
signal clicked(string communityId)
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
property int cardWidth: Theme.dp(335)
|
||||
property int bannerHeigth: Theme.dp(64)
|
||||
property int cardHeigth: Theme.dp(190)
|
||||
property int totalHeigth: Theme.dp(230)
|
||||
property int margins: Theme.dp(12)
|
||||
property int bannerRadius: Theme.dp(20)
|
||||
property int cardRadius: Theme.dp(16)
|
||||
property color cardColor: Theme.palette.indirectColor1
|
||||
property color fontColor: Theme.palette.directColor1
|
||||
property color loadingColor1: Theme.palette.baseColor5
|
||||
property color loadingColor2: Theme.palette.baseColor4
|
||||
|
||||
function numberFormat(number) {
|
||||
var res = number
|
||||
const million = 1000000
|
||||
const ks = 1000
|
||||
if(number > million) {
|
||||
res = number / million
|
||||
res = Number(number / million).toLocaleString(Qt.locale(root.locale), 'f', 1) + 'M'
|
||||
}
|
||||
else if(number > ks) {
|
||||
res = number / ks
|
||||
res = Number(number / ks).toLocaleString(Qt.locale(root.locale), 'f', 1) + 'K'
|
||||
}
|
||||
else
|
||||
res = Number(number).toLocaleString(Qt.locale(root.locale), 'f', 0)
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
||||
implicitWidth: d.cardWidth
|
||||
implicitHeight: d.totalHeigth
|
||||
radius: d.bannerRadius
|
||||
color: "transparent"
|
||||
layer.enabled: true
|
||||
layer.effect: DropShadow {
|
||||
source: root
|
||||
horizontalOffset: 0
|
||||
verticalOffset: Theme.dp(2)
|
||||
radius: sensor.containsMouse ? Theme.dp(30) : d.bannerRadius
|
||||
samples: 25
|
||||
spread: 0
|
||||
color: sensor.containsMouse ? Theme.palette.backdropColor : Theme.palette.dropShadow
|
||||
}
|
||||
|
||||
// Community banner:
|
||||
Item {
|
||||
id: banner
|
||||
anchors.top: parent.top
|
||||
width: d.cardWidth
|
||||
height: d.bannerHeigth
|
||||
Rectangle {
|
||||
id: mask
|
||||
anchors.fill: parent
|
||||
radius: d.bannerRadius
|
||||
color: root.loaded ? root.communityColor : d.loadingColor2
|
||||
}
|
||||
Image {
|
||||
id: image
|
||||
source: root.banner
|
||||
anchors.fill: parent
|
||||
anchors.centerIn: parent
|
||||
fillMode: Image.PreserveAspectFit
|
||||
smooth: true
|
||||
visible: !root.loaded || !root.banner
|
||||
}
|
||||
OpacityMask {
|
||||
anchors.fill: image
|
||||
source: image
|
||||
maskSource: mask
|
||||
}
|
||||
}
|
||||
|
||||
// Community logo:
|
||||
Rectangle {
|
||||
z: content.z + 1
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Theme.dp(16)
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Theme.dp(12)
|
||||
width: Theme.dp(48)
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: root.loaded ? d.cardColor : d.loadingColor1
|
||||
|
||||
StatusRoundedImage {
|
||||
visible: root.loaded
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - Theme.dp(4)
|
||||
height: width
|
||||
image.source: root.logo
|
||||
color: "transparent"
|
||||
}
|
||||
} // End of community logo
|
||||
|
||||
// Content card
|
||||
Rectangle {
|
||||
id: content
|
||||
z: banner.z + 1
|
||||
visible: root.loaded
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Theme.dp(40)
|
||||
width: d.cardWidth
|
||||
height: d.cardHeigth
|
||||
color: d.cardColor
|
||||
radius: d.cardRadius
|
||||
clip: true
|
||||
// Community restriccions
|
||||
Rectangle {
|
||||
visible: root.isPrivate
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Theme.dp(8)
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: anchors.topMargin
|
||||
width: Theme.dp(48)
|
||||
height: Theme.dp(24)
|
||||
color: d.loadingColor2
|
||||
radius: Theme.dp(200)
|
||||
StatusIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: 6
|
||||
anchors.left: parent.left
|
||||
icon: "tiny/unlocked"
|
||||
width: Theme.dp(16)
|
||||
height: Theme.dp(16)
|
||||
color: Theme.palette.baseColor1
|
||||
}
|
||||
StatusRoundedImage {
|
||||
anchors.rightMargin: Theme.dp(2)
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: Theme.dp(20)
|
||||
height: width
|
||||
image.source: root.tokenLogo
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
// Community info
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.dp(32)
|
||||
anchors.leftMargin: d.margins
|
||||
anchors.rightMargin: d.margins
|
||||
anchors.bottomMargin: d.margins
|
||||
clip: true
|
||||
spacing: Theme.dp(6)
|
||||
StatusBaseText {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: root.name
|
||||
font.weight: Font.Bold
|
||||
font.pixelSize: Theme.dp(19)
|
||||
color: d.fontColor
|
||||
}
|
||||
StatusBaseText {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
text: root.description
|
||||
font.pixelSize: Theme.dp(15)
|
||||
lineHeight: 1.2
|
||||
color: d.fontColor
|
||||
maximumLineCount: 2
|
||||
wrapMode: Text.WordWrap
|
||||
elide: Text.ElideRight
|
||||
clip: true
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.dp(116)
|
||||
anchors.leftMargin: d.margins
|
||||
anchors.rightMargin: d.margins
|
||||
anchors.bottomMargin: d.margins
|
||||
clip: true
|
||||
spacing: Theme.dp(18)
|
||||
Row {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
spacing: Theme.dp(20)
|
||||
// Members
|
||||
Row {
|
||||
height: membersTxt.height
|
||||
spacing: Theme.dp(4)
|
||||
StatusIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon: "tiny/members"
|
||||
width: Theme.dp(16)
|
||||
height: Theme.dp(16)
|
||||
}
|
||||
StatusBaseText {
|
||||
id: membersTxt
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: d.numberFormat(root.members)
|
||||
font.pixelSize: Theme.dp(15)
|
||||
color: d.fontColor
|
||||
}
|
||||
}
|
||||
// Active users:
|
||||
Row {
|
||||
height: activeUsersTxt.height
|
||||
spacing: Theme.dp(4)
|
||||
StatusIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon: "tiny/flash"
|
||||
width: Theme.dp(14)
|
||||
height: Theme.dp(14)
|
||||
}
|
||||
StatusBaseText {
|
||||
id: activeUsersTxt
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: d.numberFormat(root.activeUsers)
|
||||
font.pixelSize: Theme.dp(15)
|
||||
color: d.fontColor
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: Replace by `StatusListItemTagRow` - To be done!
|
||||
Row {
|
||||
visible: root.categories.count > 0
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
spacing: Theme.dp(8)
|
||||
clip: true
|
||||
|
||||
Repeater {
|
||||
model: root.categories
|
||||
delegate: StatusListItemTag {
|
||||
border.color: Theme.palette.baseColor2
|
||||
color: "transparent"
|
||||
height: Theme.dp(24)
|
||||
radius: Theme.dp(20)
|
||||
closeButtonVisible: false
|
||||
icon.emoji: model.emoji
|
||||
icon.height: Theme.dp(24)
|
||||
icon.width: icon.height
|
||||
icon.color: "transparent"
|
||||
icon.isLetterIdenticon: true
|
||||
title: model.name
|
||||
titleText.font.pixelSize: Theme.dp(13)
|
||||
titleText.color: d.fontColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // End of content card
|
||||
|
||||
// Loading card
|
||||
Rectangle {
|
||||
visible: !root.loaded
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Theme.dp(40)
|
||||
width: d.cardWidth
|
||||
height: d.cardHeigth
|
||||
color: d.cardColor
|
||||
radius: d.cardRadius
|
||||
clip: true
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Theme.dp(8)
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: anchors.topMargin
|
||||
width: Theme.dp(48)
|
||||
height: Theme.dp(24)
|
||||
color: d.loadingColor2
|
||||
radius: Theme.dp(200)
|
||||
}
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Theme.dp(32)
|
||||
anchors.margins: d.margins
|
||||
clip: true
|
||||
spacing: Theme.dp(9)
|
||||
Rectangle {
|
||||
width: Theme.dp(84)
|
||||
height: Theme.dp(16)
|
||||
color: d.loadingColor1
|
||||
radius: Theme.dp(5)
|
||||
}
|
||||
Rectangle {
|
||||
width: Theme.dp(311)
|
||||
height: Theme.dp(16)
|
||||
color: d.loadingColor1
|
||||
radius: Theme.dp(5)
|
||||
}
|
||||
Rectangle {
|
||||
width: Theme.dp(271)
|
||||
height: Theme.dp(16)
|
||||
color: d.loadingColor1
|
||||
radius: Theme.dp(5)
|
||||
}
|
||||
Row {
|
||||
Layout.topMargin: Theme.dp(13)
|
||||
spacing: Theme.dp(16)
|
||||
Repeater {
|
||||
model: 2
|
||||
delegate: Row {
|
||||
spacing: Theme.dp(4)
|
||||
Rectangle {
|
||||
width: Theme.dp(14)
|
||||
height: Theme.dp(14)
|
||||
color: d.loadingColor1
|
||||
radius: width / 2
|
||||
}
|
||||
Rectangle {
|
||||
width: 50
|
||||
height: 12
|
||||
color: d.loadingColor2
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Layout.topMargin: Theme.dp(12)
|
||||
spacing: Theme.dp(8)
|
||||
Repeater {
|
||||
model: 3
|
||||
delegate:
|
||||
Rectangle {
|
||||
width: Theme.dp(76)
|
||||
height: Theme.dp(24)
|
||||
color: d.loadingColor2
|
||||
radius: Theme.dp(20)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // End of loading card
|
||||
|
||||
MouseArea {
|
||||
id: sensor
|
||||
enabled: root.loaded
|
||||
anchors.fill: parent
|
||||
cursorShape: root.loaded ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked: root.clicked(root.communityId)
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
import QtQuick 2.14
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string filterString
|
||||
property bool showOnlySelected: false
|
||||
property bool active: true
|
||||
|
||||
property alias model: repeater.model
|
||||
property alias contentWidth: flow.width
|
||||
|
||||
signal clicked(var item)
|
||||
|
||||
implicitWidth: flow.implicitWidth
|
||||
implicitHeight: flow.implicitHeight
|
||||
|
||||
Flow {
|
||||
id: flow
|
||||
anchors.centerIn: parent
|
||||
width: {
|
||||
let itemsWidth = 0;
|
||||
for (let i = 0; i < repeater.count; ++i) {
|
||||
itemsWidth += spacing + repeater.itemAt(i).width;
|
||||
}
|
||||
return Math.min(parent.width, itemsWidth);
|
||||
}
|
||||
spacing: Theme.dp(10)
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
||||
delegate: StatusCommunityTag {
|
||||
emoji: model.emoji
|
||||
name: model.name
|
||||
visible: (root.showOnlySelected ? model.selected : !model.selected) &&
|
||||
(filterString == 0 || name.toUpperCase().indexOf(filterString.toUpperCase()) !== -1)
|
||||
width: visible ? implicitWidth : -Theme.dp(10)
|
||||
height: visible ? implicitHeight : 0
|
||||
removable: root.showOnlySelected && root.active
|
||||
onClicked: root.clicked(model)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||