mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 22:04:56 +00:00
WorkflowEditor (325→80): CWorkflowState.qml + WorkflowConnectionState.js DashboardView (121→95): DashboardDBAL.js + config/dashboard-config.json Storybook (114→78): StorybookSidebar + config/storybook-components.json + 7 components compacted to under 100 via formatting (no logic changes) + Multiple view/component splits across all remaining 100+ LOC files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
49 lines
1.1 KiB
QML
49 lines
1.1 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
Rectangle {
|
|
id: root
|
|
|
|
property string notificationType: ""
|
|
|
|
width: 36
|
|
height: 36
|
|
radius: 18
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
function typeIcon(type) {
|
|
switch (type) {
|
|
case "system": return "\u2699"
|
|
case "alert": return "\u26A0"
|
|
case "warning": return "\u26A0"
|
|
case "info": return "\u2139"
|
|
default: return "\u2709"
|
|
}
|
|
}
|
|
|
|
function typeColor(type) {
|
|
switch (type) {
|
|
case "system": return "#2196f3"
|
|
case "alert": return "#f44336"
|
|
case "warning": return "#ff9800"
|
|
case "info": return "#4caf50"
|
|
default: return "#9e9e9e"
|
|
}
|
|
}
|
|
|
|
color: {
|
|
var c = typeColor(notificationType)
|
|
return Qt.rgba(
|
|
Qt.color(c).r, Qt.color(c).g, Qt.color(c).b, 0.15
|
|
)
|
|
}
|
|
|
|
CText {
|
|
anchors.centerIn: parent
|
|
text: root.typeIcon(root.notificationType)
|
|
variant: "body1"
|
|
}
|
|
}
|