2 * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18import Ubuntu.Components 0.1
19import Ubuntu.Components.ListItems 0.1 as ListItem
20import Ubuntu.DownloadDaemonListener 0.1
22import "../../Components"
27 signal sendUserReview(string review)
29 title: root.previewData.title
33 orientation: ListView.Horizontal
40 model: previewData.infoMap["more-screenshots"] != null ? previewData.infoMap["more-screenshots"].value : [previewData.image]
42 delegate: UbuntuShape {
53 sourceSize { width: shape.width; height: shape.height }
54 source: modelData ? modelData : ""
55 fillMode: Image.PreserveAspectCrop
65 objectName: "gridButtons"
67 property int numOfRows: (count + 1) / 2
68 property int spacing: units.gu(1)
69 height: Math.max(units.gu(5), units.gu(5)*numOfRows + spacing*(numOfRows - 1))
72 cellWidth: Math.max(units.gu(9), width / 2)
73 cellHeight: buttonHeight + spacing
74 property int buttonWidth: count > 1 ? Math.max(0, width / 2 - spacing) : width
75 property int buttonHeight: units.gu(5)
78 width: Math.max(units.gu(4), buttonsGrid.buttonWidth)
79 height: buttonsGrid.buttonHeight
80 color: Theme.palette.selected.foreground
81 text: modelData.displayName
82 iconSource: modelData.iconHint
84 onClicked: root.previewData.execute(modelData.id, { })
94 objectName: "progressBar"
102 service: "com.canonical.applications.Downloader"
103 dbusPath: root.previewData.infoMap["progressbar_source"] ? root.previewData.infoMap["progressbar_source"].value : ""
106 var percentage = parseInt(received * 100 / total);
107 progressBar.value = percentage;
111 root.previewData.execute(progressBar.model[0].id, { })
115 root.previewData.execute(progressBar.model[1].id, { "error": error });
128 sourceComponent: root.previewData.infoMap["show_progressbar"] ? progressComponent : buttonsComponent
131 item.model = root.previewData.actions;
139 objectName: "appInfo"
140 anchors { left: parent.left; right: parent.right }
142 appName: root.previewData.title
143 icon: root.previewData.appIcon
144 rating: Math.round(root.previewData.rating * 10)
145 reviews: root.previewData.numRatings
146 rated: root.previewData.infoMap["rated"] ? root.previewData.infoMap["rated"].value : 0
150 anchors { left: parent.left; right: parent.right }
151 text: root.previewData.description
153 color: Theme.palette.selected.backgroundText
155 wrapMode: Text.WordWrap
161 visible: root.previewData.rating >= 0
162 anchors { left: parent.left; right: parent.right }
163 spacing: parent.spacing
165 ListItem.ThinDivider { }
168 anchors { left: parent.left; right: parent.right }
169 height: rateLabel.height
178 text: i18n.tr("Rate this")
180 anchors.left: parent.left
181 anchors.verticalCenter: parent.verticalCenter
184 // FIXME these need to be made interactive and connected to the scope
186 anchors.right: parent.right
187 anchors.verticalCenter: parent.verticalCenter
191 ListItem.ThinDivider { }
195 objectName: "appReviews"
196 // TODO: This should make this visible when the feature for reviews/comments is complete.
198 anchors { left: parent.left; right: parent.right }
200 model: root.previewData.infoMap["comments"] ? root.previewData.infoMap["comments"].value : undefined
202 onSendReview: root.sendUserReview(review);
205 root.ensureVisible(appReviews.textArea);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list