mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Add a large set of QML components (qml/Material, qml/MetaBuilder, qml/dbal) and a QmlComponents symlink for local development; migrate many frontends/qt6 files into qml/qt6. Replace the email client bootloader with a self-contained demo UI using FakeMUI primitives (MailboxLayout, ThreadList, EmailHeader, ComposeWindow), demo data, handlers, and new folder-navigation styles in globals.css. Update several QML component APIs to new signal/handler names (e.g. selectAllChanged→selectAllToggled, pageChanged→pageRequested, *Changed→*Edited) to standardize events. Add find_config_files() to frontends/qt6/generate_cmake.py to include config JS/JSON in QML/files and resources. Also add /frontends/qt6/_build to .gitignore.
89 lines
2.4 KiB
QML
89 lines
2.4 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
CDialog {
|
|
id: root
|
|
|
|
property string newPath: ""
|
|
property string newTitle: ""
|
|
property int newLevel: 1
|
|
property string newLayout: "default"
|
|
property var layoutOptions: ["default", "sidebar", "dashboard", "blank"]
|
|
property var levelOptions: [1, 2, 3, 4, 5]
|
|
|
|
signal addRoute(string path, string title, int level, string layout)
|
|
|
|
title: "Add New Route"
|
|
|
|
function reset() {
|
|
newPath = ""
|
|
newTitle = ""
|
|
newLevel = 1
|
|
newLayout = "default"
|
|
}
|
|
|
|
ColumnLayout {
|
|
spacing: 12
|
|
width: 320
|
|
|
|
CText { variant: "caption"; text: "Path" }
|
|
CTextField {
|
|
Layout.fillWidth: true
|
|
placeholderText: "/new-page"
|
|
text: root.newPath
|
|
onTextChanged: root.newPath = text
|
|
}
|
|
|
|
CText { variant: "caption"; text: "Page Title" }
|
|
CTextField {
|
|
Layout.fillWidth: true
|
|
placeholderText: "New Page"
|
|
text: root.newTitle
|
|
onTextChanged: root.newTitle = text
|
|
}
|
|
|
|
CText { variant: "caption"; text: "Required Level" }
|
|
CSelect {
|
|
Layout.fillWidth: true
|
|
model: root.levelOptions
|
|
currentIndex: root.newLevel - 1
|
|
onCurrentIndexChanged: root.newLevel = currentIndex + 1
|
|
}
|
|
|
|
CText { variant: "caption"; text: "Layout Type" }
|
|
CSelect {
|
|
Layout.fillWidth: true
|
|
model: root.layoutOptions
|
|
currentIndex: root.layoutOptions.indexOf(root.newLayout)
|
|
onCurrentIndexChanged: root.newLayout = root.layoutOptions[currentIndex]
|
|
}
|
|
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 12
|
|
|
|
CButton {
|
|
text: "Cancel"
|
|
variant: "ghost"
|
|
onClicked: {
|
|
root.reset()
|
|
root.visible = false
|
|
}
|
|
}
|
|
Item { Layout.fillWidth: true }
|
|
CButton {
|
|
text: "Add Route"
|
|
variant: "primary"
|
|
enabled: root.newPath.length > 0 && root.newTitle.length > 0
|
|
onClicked: {
|
|
root.addRoute(root.newPath, root.newTitle, root.newLevel, root.newLayout)
|
|
root.reset()
|
|
root.visible = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|