mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
88 files reformatted — zero logic changes: - All views, components, and JS modules wrapped to 80-char margin - Long property bindings, ternaries, and strings broken at natural points - Theme.qml theme definitions expanded to multi-line - StyleVariables tokens wrapped - Section comment rulers trimmed to 80 chars Trade-off: LOC increases from line wrapping (compact single-line properties now span 2-3 lines). Content unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
101 lines
2.6 KiB
QML
101 lines
2.6 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
CCard {
|
|
id: root
|
|
|
|
property var users: []
|
|
property var allUsers: []
|
|
|
|
signal editClicked(int uid)
|
|
signal deleteClicked(int uid)
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
anchors.margins: 16
|
|
spacing: 0
|
|
|
|
Rectangle {
|
|
Layout.fillWidth: true
|
|
height: 40
|
|
color: Theme.surface
|
|
radius: 4
|
|
|
|
RowLayout {
|
|
anchors.fill: parent
|
|
anchors.leftMargin: 12
|
|
anchors.rightMargin: 12
|
|
spacing: 8
|
|
|
|
CText {
|
|
variant: "caption"
|
|
text: "AVATAR"
|
|
Layout.preferredWidth: 56
|
|
}
|
|
CText {
|
|
variant: "caption"
|
|
text: "USERNAME"
|
|
Layout.preferredWidth: 120
|
|
}
|
|
CText {
|
|
variant: "caption"
|
|
text: "EMAIL"
|
|
Layout.fillWidth: true
|
|
}
|
|
CText {
|
|
variant: "caption"
|
|
text: "ROLE"
|
|
Layout.preferredWidth: 100
|
|
}
|
|
CText {
|
|
variant: "caption"
|
|
text: "LEVEL"
|
|
Layout.preferredWidth: 50
|
|
}
|
|
CText {
|
|
variant: "caption"
|
|
text: "STATUS"
|
|
Layout.preferredWidth: 90
|
|
}
|
|
CText {
|
|
variant: "caption"
|
|
text: "CREATED"
|
|
Layout.preferredWidth: 100
|
|
}
|
|
CText {
|
|
variant: "caption"
|
|
text: "ACTIONS"
|
|
Layout.preferredWidth: 140
|
|
}
|
|
}
|
|
}
|
|
|
|
CDivider { Layout.fillWidth: true }
|
|
|
|
ListView {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
model: root.users
|
|
clip: true
|
|
spacing: 0
|
|
|
|
delegate: UserTableRow {
|
|
width: parent ? parent.width : 600
|
|
onEditClicked: (uid) => root.editClicked(uid)
|
|
onDeleteClicked: (uid) => root.deleteClicked(uid)
|
|
}
|
|
}
|
|
|
|
CText {
|
|
visible: root.users.length === 0
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: 24
|
|
variant: "body2"
|
|
text: "No users match the current filter."
|
|
horizontalAlignment: Text.AlignHCenter
|
|
}
|
|
}
|
|
}
|