4 import 'config.js' as Config
9 property bool subscribeMode: true
11 property variant items: []
14 signal response(int index)
27 visible: !contextMenuArea.subscribeMode
28 model: contextMenuArea.items
31 header: Item { height: Config.headerHeight * 2 }
32 footer: Item { height: Config.headerHeight }
34 delegate: SelectableItem {
36 anchors.leftMargin: Config.switcherWidth
40 verticalCenter: parent.verticalCenter
43 font.pixelSize: parent.height * .3
44 text: modelData.caption
48 contextMenuArea.response(index)
49 contextMenuArea.close()
54 function showSubscribe() {
55 contextMenuArea.subscribeMode = true
56 contextMenuArea.state = 'opened'
62 visible: contextMenuArea.subscribeMode && (contextMenuArea.state == 'opened')
64 anchors.topMargin: Config.headerHeight
67 controller.addSubscription(url)
68 contextMenuArea.close()