summaryrefslogtreecommitdiff
path: root/features/TaskBriefForm.ui.qml
blob: fe313c747165092aed581e46709d7c1c0802de7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0

Page {
    id: taskBriefComponents
    height: ticketSubjectLayout.height + ticketMetaLayout.height
    property alias ticketSubject: ticketSubject
    property alias userAvatar: userAvatar
    property alias ticketCreator: ticketCreator
    property alias ticketCreatedText: ticketCreatedText
    property alias ticketCreatedTimestamp: ticketCreatedTimestamp

    background: Rectangle {
        color: "#FFFFFF"
    }

    RowLayout {
        id: ticketSubjectLayout
        height: ticketSubject.height + 32
        anchors.right: parent.right
        anchors.rightMargin: 0
        anchors.left: parent.left
        anchors.leftMargin: 0
        spacing: 8
        Label {
            id: ticketSubject
            text: qsTr("Ticket subject")
            verticalAlignment: Text.AlignVCenter
            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
            Layout.rightMargin: 16
            Layout.fillWidth: true
            Layout.leftMargin: 16
            font.weight: Font.Medium
            font.family: "Work Sans"
            font.pixelSize: 20
        }
    }
    ColumnLayout {
        id: ticketMetaLayout
        anchors.top: ticketSubjectLayout.bottom
        anchors.right: parent.right
        anchors.left: parent.left
        spacing: 8
        RowLayout {
            id: creatorInfo
            Layout.leftMargin: 16
            Layout.topMargin: 8
            spacing: 8
            Layout.fillWidth: true

            Image {
                id: userAvatar
                width: 24
                height: 24
                source: "https://via.placeholder.com/24x24.png"
                fillMode: Image.PreserveAspectCrop
                layer.enabled: true
                layer.effect: OpacityMask {
                    maskSource: userAvatarMask
                }
            }
            Rectangle {
                id: userAvatarMask
                height: 24
                color: "#000000"
                width: 24
                radius: 12
                visible: false
            }
            Text {
                id: ticketCreator
                text: qsTr("Username")
                Layout.leftMargin: 8
                font.weight: Font.Medium
                font.family: "Work Sans"
                verticalAlignment: Text.AlignVCenter
                elide: Text.ElideRight
                font.pixelSize: 14
            }
            Text {
                id: ticketCreatedText
                text: qsTr("created this issue")
                Layout.rightMargin: 16
                font.pixelSize: 14
                font.family: "Work Sans"
                Layout.fillWidth: true
            }
        }

        Text {
            id: ticketCreatedTimestamp
            text: qsTr("2017-07-25 14:05:30")
            Layout.bottomMargin: 16
            Layout.fillHeight: true
            Layout.leftMargin: 16
            font.pixelSize: 12
            font.family: "Work Sans"
            Layout.fillWidth: true
            Layout.rightMargin: 16
            width: ticketCreatedTimestamp.width
            color: "#8a000000"
        }
    }
}