mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
191 files reformatted across views, components, widgets, hybrid, contexts. New components: CCreateSchemaDialog, CAddFieldDialog, CAdminContentPanel. JS helpers: connBadgeStatus/Text, adminStats, exampleLabels, onLevelClicked. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
52 lines
1.2 KiB
QML
52 lines
1.2 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
CCard {
|
|
id: channelList
|
|
|
|
Layout.preferredWidth: 320
|
|
Layout.fillHeight: true
|
|
|
|
property int selectedIndex: 0
|
|
property var channels: []
|
|
|
|
signal channelSelected(int index)
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
anchors.margins: 16
|
|
spacing: 12
|
|
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 8
|
|
|
|
CText { variant: "h4"; text: "TV Channels" }
|
|
CText { variant: "caption"; text: channels.length + " channels"
|
|
color: Theme.textSecondary }
|
|
}
|
|
|
|
CDivider { Layout.fillWidth: true }
|
|
|
|
ListView {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
model: channels
|
|
spacing: 4
|
|
clip: true
|
|
|
|
delegate: CListItem {
|
|
width: parent ? parent.width : 288
|
|
title: modelData.name
|
|
subtitle: modelData.status === "broadcasting"
|
|
? modelData.viewers + " viewers"
|
|
: "Offline"
|
|
selected: index === channelList.selectedIndex
|
|
onClicked: channelList.channelSelected(index)
|
|
}
|
|
}
|
|
}
|
|
}
|