Files
metabuilder/qml/MetaBuilder/UserTable.qml
johndoe6345789 827387d807 style(qt6): enforce 80-character line margin across all QML and JS files
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>
2026-03-19 15:20:01 +00:00

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
}
}
}