Plugin browser can now download & install plugins

This commit is contained in:
Jaime van Kessel 2017-06-23 11:18:10 +02:00
parent 217eecccb9
commit e3dffd6610
2 changed files with 64 additions and 16 deletions

View file

@ -11,25 +11,48 @@ UM.Dialog
title: "YAY"
width: 450
height: 150
ListView
ScrollView
{
model: manager.pluginsModel
anchors.fill: parent
delegate: Row
frameVisible: true
ListView
{
width: parent.width
Button
{
text: model.name
}
Button
{
text: model.author
}
id: pluginList
model: manager.pluginsModel
anchors.fill: parent
Label
delegate: pluginDelegate
}
}
Item
{
SystemPalette { id: palette }
Component
{
id: pluginDelegate
Rectangle
{
text: model.short_description
width: pluginList.width;
height: childrenRect.height;
color: index % 2 ? palette.base : palette.alternateBase
Row
{
width: parent.width
height: childrenRect.height;
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
Label
{
text: model.name
width: contentWidth
}
Button
{
text: "Download"
onClicked: manager.downloadAndInstallPlugin(model.file_location)
}
}
}
}
}