Warning, /maui/bonsai/src/views/CommitInfoDialog.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick 2.15
0002 import QtQuick.Controls 2.15
0003 import QtQuick.Layouts 1.12
0004 
0005 import org.mauikit.controls 1.3 as Maui
0006 
0007 import org.maui.bonsai 1.0 as Bonsai
0008 
0009 Maui.PopupPage
0010 {
0011     id: control
0012 
0013     property string commitId
0014     readonly property var info : _project.commitAuthor(commitId)
0015 
0016     persistent: true
0017 
0018     title: i18n("Commit Info")
0019 
0020     maxWidth: 500
0021     hint: 1
0022 
0023     Maui.SectionGroup
0024     {
0025         title: i18n("Author")
0026 
0027         Maui.SectionItem
0028         {
0029             label1.text: i18n("Full Name")
0030             label2.text: info.fullName
0031         }
0032 
0033         Maui.SectionItem
0034         {
0035             label1.text: i18n("Email")
0036             label2.text: info.email
0037 
0038             ToolButton
0039             {
0040                 icon.name: "mail-message"
0041                 onClicked: Qt.openUrlExternally("mailto:"+info.email)
0042             }
0043         }
0044 
0045         Maui.SectionItem
0046         {
0047             label1.text: i18n("ID")
0048             label2.text: commitId
0049 
0050             ToolButton
0051             {
0052                 icon.name: "edit-copy"
0053                 onClicked: Maui.Handy.copyTextToClipboard(commitId)
0054             }
0055         }
0056 
0057         Maui.SectionItem
0058         {
0059             label1.text: i18n("Message")
0060             label2.text: info.message
0061 
0062             ToolButton
0063             {
0064                 icon.name: "edit-copy"
0065                 onClicked: Maui.Handy.copyTextToClipboard(info.message)
0066             }
0067         }
0068 
0069         Maui.SectionItem
0070         {
0071             label1.text: i18n("Date")
0072             label2.text: Qt.formatDateTime(info.date, "dd mm yyyy")
0073         }
0074     }
0075 
0076     Maui.SectionGroup
0077     {
0078         title: i18n("Repo")
0079 
0080         Maui.SectionItem
0081         {
0082             label1.text: i18n("Local Path")
0083             label2.text: _project.url
0084         }
0085 
0086         Maui.SectionItem
0087         {
0088             label1.text: i18n("Branch")
0089             label2.text: info.branch
0090         }
0091 
0092         Maui.SectionItem
0093         {
0094             id: _parentCommitField
0095             label1.text: i18n("Parent Commit")
0096             label2.text: info.parentCommits
0097             label2.textFormat: Text.AutoText
0098             Connections
0099             {
0100                 target: _parentCommitField.label2
0101                 function onLinkActivated(link)
0102                 {
0103                     control.commitId = link.replace("hash:", "")
0104                 }
0105             }
0106         }
0107 
0108         Maui.SectionItem
0109         {
0110             id: _childCommitField
0111             label1.text: i18n("Child Commit")
0112             label2.text: info.childCommits
0113             label2.textFormat: Text.AutoText
0114             Connections
0115             {
0116                 target: _childCommitField.label2
0117                 function onLinkActivated(link)
0118                 {
0119                     control.commitId = link.replace("hash:", "")
0120                 }
0121             }
0122         }
0123     }
0124 
0125 
0126     Maui.SectionGroup
0127     {
0128         title: i18n("Files")
0129         Maui.SectionItem
0130         {
0131             label1.text: i18n("Changed Files")
0132             columns: 1
0133 
0134             ColumnLayout
0135             {
0136                 Layout.fillWidth: true
0137 
0138                 Repeater
0139                 {
0140                     model: info.changedFiles
0141                     delegate: Label
0142                     {
0143                         Layout.fillWidth: true
0144                         text: modelData.url
0145                         color: modelData.color
0146                     }
0147                 }
0148             }
0149         }
0150     }
0151 }