Files
metabuilder/qml/MetaBuilder/CProfilePasswordCard.qml
johndoe6345789 d4f7e85007 refactor(qt6): 100% of views under 100 LOC — final component + JS extractions
All 29 views now under 100 LOC. Latest extractions:
- 15 components split from 150+ LOC originals (CWorkflowCanvas→99, ThemePreviewCard→52, etc.)
- CStatCell reusable component eliminates 60 lines of duplication
- Profile: CProfilePasswordCard, CProfileConnectedAccounts
- 6 JS modules: LuaEditorLogic, UserManagementDBAL, ProfileDBAL, ComponentTreeDBAL, ThemeEditorLogic, SchemaEditorDBAL
- 7 JSON data files in qml/MetaBuilder/data/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 15:04:03 +00:00

50 lines
1.5 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QmlComponents 1.0
CCard {
id: root
Layout.fillWidth: true
Layout.leftMargin: 24
Layout.rightMargin: 24
variant: "filled"
property var passwordFields: []
property var passwords: ({ "current": "", "new": "", "confirm": "" })
signal passwordChanged(string key, string value)
CText { Layout.fillWidth: true; variant: "h4"; text: "Change Password" }
Item { Layout.preferredHeight: 8 }
CDivider { Layout.fillWidth: true }
Item { Layout.preferredHeight: 14 }
Repeater {
model: root.passwordFields
delegate: ColumnLayout {
Layout.fillWidth: true; spacing: 0
CTextField {
Layout.fillWidth: true
label: modelData.label
placeholderText: modelData.placeholder
echoMode: TextInput.Password
text: root.passwords[modelData.key]
onTextChanged: root.passwordChanged(modelData.key, text)
}
Item { Layout.preferredHeight: 14 }
}
}
CAlert {
Layout.fillWidth: true; severity: "info"
text: "Passwords must be at least 8 characters with uppercase, lowercase, and a number."
visible: root.passwords["new"].length > 0
}
CAlert {
Layout.fillWidth: true; severity: "error"
text: "Passwords do not match."
visible: root.passwords["confirm"].length > 0 && root.passwords["new"] !== root.passwords["confirm"]
}
}