mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-16 09:34:57 +00:00
0ab8a62896
- Renamed main `CommunitiesPortal` folder to `Communities`. - Created new `layouts` folder. - Moved layout files from chat to communities. - Created new `helpers` folder. - Moved helpers files from chat to communities. - Moved `controls/community` files from chat to communities `controls`. - Moved `panels/communities` files from chat to communities `panels`. - Moved `popups/community` files from chat to communities `popups`. - Moved `views/community` files from chat to communities `views`. - Moved `CommunityBanner` file from shared to `Communities/controls`. Only used in communities context. - Moved `CommunitySettingsView` and `CommunityColumnView` files from chat to communities `views`. - Moved `PermissionsStore.qml` file to `shared/stores`. - Updated imports. - Updated storybook. Part of #6204
62 lines
1.7 KiB
QML
62 lines
1.7 KiB
QML
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
|
|
|
|
Control {
|
|
id: root
|
|
|
|
enum Type {
|
|
Warning,
|
|
Error
|
|
}
|
|
property int type: IssuePill.Type.Warning
|
|
|
|
property int count
|
|
property string text: root.type === IssuePill.Type.Warning ? qsTr("%n warning(s)", "", root.count)
|
|
: qsTr("%n error(s)", "", root.count)
|
|
property alias bgCornerRadius: background.radius
|
|
|
|
horizontalPadding: 8
|
|
verticalPadding: 4
|
|
|
|
QtObject {
|
|
id: d
|
|
readonly property color baseColor: root.type === IssuePill.Type.Warning ? Theme.palette.pinColor1
|
|
: Theme.palette.dangerColor1
|
|
}
|
|
|
|
background: Rectangle {
|
|
id: background
|
|
radius: 100
|
|
color: Theme.palette.alphaColor(d.baseColor, 0.03)
|
|
border.width: 1
|
|
border.color: Theme.palette.alphaColor(d.baseColor, 0.3)
|
|
}
|
|
|
|
contentItem: RowLayout {
|
|
spacing: 4
|
|
StatusIcon {
|
|
Layout.preferredWidth: 20
|
|
Layout.preferredHeight: 20
|
|
Layout.alignment: Qt.AlignVCenter
|
|
icon: "warning"
|
|
color: d.baseColor
|
|
}
|
|
StatusBaseText {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
Layout.alignment: Qt.AlignVCenter
|
|
verticalAlignment: Qt.AlignVCenter
|
|
text: root.text
|
|
color: d.baseColor
|
|
font.pixelSize: 12
|
|
wrapMode: Text.WordWrap
|
|
maximumLineCount: 3
|
|
elide: Text.ElideRight
|
|
}
|
|
}
|
|
}
|