Merge lp:~nik90/ureadit/migrate-15.04 into lp:ureadit/3.0

Proposed by Nekhelesh Ramananthan
Status: Needs review
Proposed branch: lp:~nik90/ureadit/migrate-15.04
Merge into: lp:ureadit/3.0
Diff against target: 1222 lines (+341/-217)
45 files modified
Main.qml (+2/-5)
components/BorderIcon.qml (+1/-1)
components/CommentListItem.qml (+2/-2)
components/EmptyState.qml (+49/-0)
components/KeyboardNavPage.qml (+2/-2)
components/LargeImagePostItem.qml (+2/-2)
components/MoreCommentsItem.qml (+2/-2)
components/MultiColumnListView.qml (+1/-1)
components/PostCommentItem.qml (+6/-17)
components/PostImage.qml (+1/-1)
components/PostListItem.qml (+6/-16)
components/PostMessageItem.qml (+3/-14)
components/ScrollToTop.qml (+1/-1)
components/SmallImagePostItem.qml (+2/-2)
components/StretchRow.qml (+1/-1)
components/UserMessageItem.qml (+8/-19)
manifest.json (+1/-1)
models/QReddit/ConnectionObject.qml (+1/-1)
models/QReddit/MoreCommentsListModel.qml (+1/-1)
models/QReddit/NotifierObject.qml (+1/-1)
models/QReddit/PostCommentsListModel.qml (+1/-1)
models/QReddit/QRHelper.js (+1/-1)
models/QReddit/QRObjects.js (+1/-1)
models/QReddit/SubredditListModel.qml (+1/-1)
models/QReddit/UserMessagesListModel.qml (+1/-1)
po/template.pot (+90/-49)
themes/Ambiance.qml (+2/-2)
themes/RedditDark.qml (+2/-2)
themes/RedditLight.qml (+2/-2)
themes/ThemeManager.qml (+2/-2)
ui/AboutPage.qml (+2/-2)
ui/ArticlePage.qml (+2/-2)
ui/CommentsPage.qml (+2/-2)
ui/Frontpage.qml (+3/-3)
ui/InternalBrowserPage.qml (+2/-2)
ui/MoreCommentsPage.qml (+2/-2)
ui/PostMessagePage.qml (+2/-2)
ui/SettingsPage.qml (+2/-2)
ui/ShareImagePage.qml (+2/-2)
ui/ShareLinkPage.qml (+2/-2)
ui/SubredditPage.qml (+3/-3)
ui/SubredditSwitcherPage.qml (+2/-2)
ui/UserAccountsPage.qml (+116/-36)
ui/UserMessagesPage.qml (+2/-2)
ureadit.apparmor (+1/-1)
To merge this branch: bzr merge lp:~nik90/ureadit/migrate-15.04
Reviewer Review Type Date Requested Status
Michael Hall Needs Information
Review via email: mp+265878@code.launchpad.net

Commit message

- Updated to 15.04 framework and QtQuick 2.4
- Removed uses of Haptics{} since it is now provided by the SDK as a singleton (already landed in stable phone images)
- Migrated UserAccountsPage to the new listitem. Fixed bug where a new user added is not shown by the listview immediately.
- Added an empty state to the user accounts page
- Made the UserAccountsPage strings translatable

Description of the change

This MP implements the following,

- Updated to 15.04 framework and QtQuick 2.4
- Removed uses of Haptics{} since it is now provided by the SDK as a singleton (already landed in stable phone images)
- Migrated UserAccountsPage to the new listitem. Fixed bug where a new user added is not shown by the listview immediately.
- Added an empty state to the user accounts page
- Made the UserAccountsPage strings translatable

To post a comment you must log in.
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

I was meaning to push this for review, but completely forgot it during the last few days.

Revision history for this message
Michael Hall (mhall119) wrote :

Does Haptics.play() give the same intensity/duration as the manually defined one I was using?

review: Needs Information
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Fixed the EmptyState inline comment regarding Ubuntu.Components import version.

> Does Haptics.play() give the same intensity/duration as the manually defined
> one I was using?

It is possible to use custom values by doing something like Haptics.play({attackIntensity: 0.0, duration: 10, attackTime: 50, intensity: 1.0, fadeTime: 50, fadeIntensity: 0.0 }). May I ask the reason for custom values?

Haptics.play() will use the default values used elsewhere by the SDK while clicking on the back button, listitems etc.

Do you want me to set the custom values?

lp:~nik90/ureadit/migrate-15.04 updated
55. By Nekhelesh Ramananthan

Updated empty state ubuntu components import version

Unmerged revisions

55. By Nekhelesh Ramananthan

Updated empty state ubuntu components import version

54. By Nekhelesh Ramananthan

Added thin divider for listitem

53. By Nekhelesh Ramananthan

Merged lp:ureadit

52. By Nekhelesh Ramananthan

Fixed spacing in UserMessageItem.qml

51. By Nekhelesh Ramananthan

Made the UserAccountsPage strings translatable

50. By Nekhelesh Ramananthan

Added an empty state to the user accounts page

49. By Nekhelesh Ramananthan

Migrated UserAccountsPage to the new listitem. Fixed bug where a new user added is not shown by the listview immediately

48. By Nekhelesh Ramananthan

Removed uses of Haptics{} since it is now provided by the SDK as a singleton

47. By Nekhelesh Ramananthan

Updated to 15.04 Framework and QtQuick 2.4

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Main.qml'
--- Main.qml 2015-07-24 19:50:59 +0000
+++ Main.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Qt.labs.settings 1.03import Qt.labs.settings 1.0
44
5import "ui"5import "ui"
@@ -25,9 +25,6 @@
25 */25 */
26 automaticOrientation: true26 automaticOrientation: true
2727
28 // Removes the old toolbar and enables new features of the new header.
29 useDeprecatedToolbar: false
30
31 // Make room for the keyboard28 // Make room for the keyboard
32 anchorToKeyboard: true29 anchorToKeyboard: true
3330
3431
=== modified file 'components/BorderIcon.qml'
--- components/BorderIcon.qml 2014-12-21 20:02:53 +0000
+++ components/BorderIcon.qml 2015-07-25 07:54:46 +0000
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.4
1818
19Item {19Item {
20 id: icon20 id: icon
2121
=== modified file 'components/CommentListItem.qml'
--- components/CommentListItem.qml 2015-02-08 21:05:46 +0000
+++ components/CommentListItem.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
33
4Item {4Item {
5 id: commentitemroot5 id: commentitemroot
66
=== added file 'components/EmptyState.qml'
--- components/EmptyState.qml 1970-01-01 00:00:00 +0000
+++ components/EmptyState.qml 2015-07-25 07:54:46 +0000
@@ -0,0 +1,49 @@
1import QtQuick 2.4
2import Ubuntu.Components 1.2
3
4Item {
5 id: emptyState
6
7 // Public APIs
8 property alias iconName: emptyIcon.name
9 property alias title: emptyLabel.text
10 property alias subTitle: emptySublabel.text
11 property alias iconSource: emptyIcon.source
12
13 property real iconHeight: units.gu(10)
14 property real iconWidth: units.gu(10)
15
16 height: childrenRect.height
17 anchors.left: parent.left
18 anchors.right: parent.right
19 anchors.margins: units.gu(2)
20
21 Icon {
22 id: emptyIcon
23 width: parent.iconWidth
24 height: parent.iconHeight
25 color: uReadIt.currentTheme.baseFontColor
26 anchors.horizontalCenter: parent.horizontalCenter
27 }
28
29 Label {
30 id: emptyLabel
31 anchors.top: emptyIcon.bottom
32 anchors.topMargin: units.gu(5)
33 width: parent.width
34 fontSize: "large"
35 font.bold: true
36 color: uReadIt.currentTheme.baseFontColor
37 horizontalAlignment: Text.AlignHCenter
38 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
39 }
40
41 Label {
42 id: emptySublabel
43 width: parent.width
44 anchors.top: emptyLabel.bottom
45 color: uReadIt.currentTheme.baseFontColor
46 horizontalAlignment: Text.AlignHCenter
47 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
48 }
49}
050
=== modified file 'components/KeyboardNavPage.qml'
--- components/KeyboardNavPage.qml 2015-04-23 10:16:22 +0000
+++ components/KeyboardNavPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
33
4Page {4Page {
55
66
=== modified file 'components/LargeImagePostItem.qml'
--- components/LargeImagePostItem.qml 2015-04-23 10:16:22 +0000
+++ components/LargeImagePostItem.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
33
4Item {4Item {
5 id: postitemroot5 id: postitemroot
66
=== modified file 'components/MoreCommentsItem.qml'
--- components/MoreCommentsItem.qml 2015-04-23 10:16:22 +0000
+++ components/MoreCommentsItem.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import "../utils/RedditLinker.js" as AutoLinkText3import "../utils/RedditLinker.js" as AutoLinkText
44
5Rectangle {5Rectangle {
66
=== modified file 'components/MultiColumnListView.qml'
--- components/MultiColumnListView.qml 2015-02-01 04:44:25 +0000
+++ components/MultiColumnListView.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
22
3Flickable {3Flickable {
4 id: display4 id: display
55
=== modified file 'components/PostCommentItem.qml'
--- components/PostCommentItem.qml 2015-04-23 10:16:22 +0000
+++ components/PostCommentItem.qml 2015-07-25 07:54:46 +0000
@@ -1,6 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import QtFeedback 5.02import Ubuntu.Components 1.2
3import Ubuntu.Components 1.1
4import "../utils/RedditLinker.js" as AutoLinkText3import "../utils/RedditLinker.js" as AutoLinkText
54
6Rectangle {5Rectangle {
@@ -15,16 +14,6 @@
15 height: childrenRect.height14 height: childrenRect.height
16 anchors.horizontalCenter: parent.horizontalCenter15 anchors.horizontalCenter: parent.horizontalCenter
1716
18 HapticsEffect {
19 id: pressEffect
20 attackIntensity: 0.0
21 attackTime: 50
22 intensity: 1.0
23 duration: 10
24 fadeTime: 50
25 fadeIntensity: 0.0
26 }
27
28 Column {17 Column {
29 id: commentContents18 id: commentContents
30 anchors.left: parent.left19 anchors.left: parent.left
@@ -54,7 +43,7 @@
5443
55 text: AutoLinkText.Autolinker.link(commentObj.data.body).replace(/\n/g, "<br>\n")44 text: AutoLinkText.Autolinker.link(commentObj.data.body).replace(/\n/g, "<br>\n")
5645
57 onLinkActivated: { pressEffect.start(); postCommentItem.parent.linkActivated(link); }46 onLinkActivated: { Haptics.play(); postCommentItem.parent.linkActivated(link); }
58 }47 }
5948
60 Item {49 Item {
@@ -80,7 +69,7 @@
80 anchors.centerIn: parent69 anchors.centerIn: parent
81 height: parent.height * 270 height: parent.height * 2
82 width: parent.width * 271 width: parent.width * 2
83 onClicked: { pressEffect.start(); postCommentItem.parent.upvoteClicked(); }72 onClicked: { Haptics.play(); postCommentItem.parent.upvoteClicked(); }
84 }73 }
85 }74 }
86 Icon {75 Icon {
@@ -94,7 +83,7 @@
94 anchors.centerIn: parent83 anchors.centerIn: parent
95 height: parent.height * 284 height: parent.height * 2
96 width: parent.width * 285 width: parent.width * 2
97 onClicked: { pressEffect.start(); postCommentItem.parent.downvoteClicked(); }86 onClicked: { Haptics.play(); postCommentItem.parent.downvoteClicked(); }
98 }87 }
99 }88 }
100 Icon {89 Icon {
@@ -109,7 +98,7 @@
109 anchors.centerIn: parent98 anchors.centerIn: parent
110 height: parent.height * 299 height: parent.height * 2
111 width: parent.width * 2100 width: parent.width * 2
112 onClicked: { pressEffect.start(); postCommentItem.parent.replyClicked(); }101 onClicked: { Haptics.play(); postCommentItem.parent.replyClicked(); }
113 }102 }
114 }103 }
115 }104 }
116105
=== modified file 'components/PostImage.qml'
--- components/PostImage.qml 2015-01-05 02:58:08 +0000
+++ components/PostImage.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
22
3Image {3Image {
4 id: postThumbnail4 id: postThumbnail
55
=== modified file 'components/PostListItem.qml'
--- components/PostListItem.qml 2015-02-23 22:32:46 +0000
+++ components/PostListItem.qml 2015-07-25 07:54:46 +0000
@@ -1,6 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import QtFeedback 5.02import Ubuntu.Components 1.2
3import Ubuntu.Components 1.1
4import Ubuntu.Connectivity 1.03import Ubuntu.Connectivity 1.0
54
6Item {5Item {
@@ -23,15 +22,6 @@
23 height: (postItemLoader.item) ? postItemLoader.item.height : 022 height: (postItemLoader.item) ? postItemLoader.item.height : 0
24 width: parent ? parent.width : 023 width: parent ? parent.width : 0
2524
26 HapticsEffect {
27 id: pressEffect
28 attackIntensity: 0.0
29 attackTime: 50
30 intensity: 1.0
31 duration: 10
32 fadeTime: 50
33 fadeIntensity: 0.0
34 }
35 Connections {25 Connections {
36 target: NetworkingStatus26 target: NetworkingStatus
37 // full status can be retrieved from the base C++ class27 // full status can be retrieved from the base C++ class
@@ -63,10 +53,10 @@
63 signal upvoteClicked53 signal upvoteClicked
64 signal downvoteClicked54 signal downvoteClicked
65 signal commentsClicked55 signal commentsClicked
66 onClicked: { pressEffect.start(); postitemroot.clicked(); }56 onClicked: { Haptics.play(); postitemroot.clicked(); }
67 onUpvoteClicked: { pressEffect.start(); postitemroot.upvoteClicked(); }57 onUpvoteClicked: { Haptics.play(); postitemroot.upvoteClicked(); }
68 onDownvoteClicked: { pressEffect.start(); postitemroot.downvoteClicked(); }58 onDownvoteClicked: { Haptics.play(); postitemroot.downvoteClicked(); }
69 onCommentsClicked: { pressEffect.start(); postitemroot.commentsClicked(); }59 onCommentsClicked: { Haptics.play(); postitemroot.commentsClicked(); }
7060
71 source: {61 source: {
72 //console.log('Link: '+url)62 //console.log('Link: '+url)
7363
=== modified file 'components/PostMessageItem.qml'
--- components/PostMessageItem.qml 2015-04-23 10:16:22 +0000
+++ components/PostMessageItem.qml 2015-07-25 07:54:46 +0000
@@ -1,6 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import QtFeedback 5.02import Ubuntu.Components 1.2
3import Ubuntu.Components 1.1
4import "../utils/RedditLinker.js" as AutoLinkText3import "../utils/RedditLinker.js" as AutoLinkText
54
6Rectangle {5Rectangle {
@@ -14,16 +13,6 @@
14 color: uReadIt.currentTheme.commentBackgroundColorEven13 color: uReadIt.currentTheme.commentBackgroundColorEven
15 anchors.leftMargin: units.gu(5)14 anchors.leftMargin: units.gu(5)
1615
17 HapticsEffect {
18 id: pressEffect
19 attackIntensity: 0.0
20 attackTime: 50
21 intensity: 1.0
22 duration: 10
23 fadeTime: 50
24 fadeIntensity: 0.0
25 }
26
27 Label {16 Label {
28 id: name17 id: name
29 anchors.left: parent.left18 anchors.left: parent.left
@@ -51,7 +40,7 @@
51 text: {40 text: {
52 return AutoLinkText.Autolinker.link(postObj.data.selftext || postObj.data.body).replace(/\n/g, "<br>\n")41 return AutoLinkText.Autolinker.link(postObj.data.selftext || postObj.data.body).replace(/\n/g, "<br>\n")
53 }42 }
54 onLinkActivated: { pressEffect.start(); postMessageItem.linkActivated(link); }43 onLinkActivated: { Haptics.play(); postMessageItem.linkActivated(link); }
5544
56 }45 }
5746
5847
=== modified file 'components/ScrollToTop.qml'
--- components/ScrollToTop.qml 2015-04-07 02:00:13 +0000
+++ components/ScrollToTop.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
22
3MouseArea {3MouseArea {
4 anchors.fill: parent4 anchors.fill: parent
55
=== modified file 'components/SmallImagePostItem.qml'
--- components/SmallImagePostItem.qml 2015-07-24 20:07:32 +0000
+++ components/SmallImagePostItem.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
33
4Item {4Item {
5 id: postitemroot5 id: postitemroot
66
=== modified file 'components/StretchRow.qml'
--- components/StretchRow.qml 2014-11-07 17:00:05 +0000
+++ components/StretchRow.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
22
3Item {3Item {
44
55
=== modified file 'components/UserMessageItem.qml'
--- components/UserMessageItem.qml 2015-07-24 20:07:32 +0000
+++ components/UserMessageItem.qml 2015-07-25 07:54:46 +0000
@@ -1,6 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import QtFeedback 5.02import Ubuntu.Components 1.2
3import Ubuntu.Components 1.1
4import "../utils/RedditLinker.js" as AutoLinkText3import "../utils/RedditLinker.js" as AutoLinkText
54
6Rectangle {5Rectangle {
@@ -27,16 +26,6 @@
27 signal replyClicked26 signal replyClicked
28 signal readStatusClicked27 signal readStatusClicked
2928
30 HapticsEffect {
31 id: pressEffect
32 attackIntensity: 0.0
33 attackTime: 50
34 intensity: 1.0
35 duration: 10
36 fadeTime: 50
37 fadeIntensity: 0.0
38 }
39
40 Column {29 Column {
41 id: messageContents30 id: messageContents
4231
@@ -60,7 +49,7 @@
60 visible: messageObj ? (messageObj.kind === "t1" || messageObj.kind === "t3") : false49 visible: messageObj ? (messageObj.kind === "t1" || messageObj.kind === "t3") : false
61 MouseArea {50 MouseArea {
62 anchors.fill: parent51 anchors.fill: parent
63 onClicked: { pressEffect.start(); userMessageItem.clicked(); }52 onClicked: { Haptics.play(); userMessageItem.clicked(); }
64 }53 }
65 }54 }
6655
@@ -85,7 +74,7 @@
85 textFormat: Text.StyledText74 textFormat: Text.StyledText
8675
87 text: AutoLinkText.Autolinker.link(messageObj.data.body).replace(/\n/g, "<br>\n")76 text: AutoLinkText.Autolinker.link(messageObj.data.body).replace(/\n/g, "<br>\n")
88 onLinkActivated: { pressEffect.start(); userMessageItem.linkActivated(link); }77 onLinkActivated: { Haptics.play(); userMessageItem.linkActivated(link); }
8978
90 }79 }
9180
@@ -106,7 +95,7 @@
106 anchors.centerIn: parent95 anchors.centerIn: parent
107 height: parent.height * 296 height: parent.height * 2
108 width: parent.width * 297 width: parent.width * 2
109 onClicked: { pressEffect.start(); readStatusClicked(); }98 onClicked: { Haptics.play(); readStatusClicked(); }
110 }99 }
111 }100 }
112 Icon {101 Icon {
@@ -121,7 +110,7 @@
121 anchors.centerIn: parent110 anchors.centerIn: parent
122 height: parent.height * 2111 height: parent.height * 2
123 width: parent.width * 2112 width: parent.width * 2
124 onClicked: { pressEffect.start(); upvoteClicked(); }113 onClicked: { Haptics.play(); upvoteClicked(); }
125 }114 }
126 }115 }
127 Icon {116 Icon {
@@ -136,7 +125,7 @@
136 anchors.centerIn: parent125 anchors.centerIn: parent
137 height: parent.height * 2126 height: parent.height * 2
138 width: parent.width * 2127 width: parent.width * 2
139 onClicked: { pressEffect.start(); downvoteClicked(); }128 onClicked: { Haptics.play(); downvoteClicked(); }
140 }129 }
141 }130 }
142 Icon {131 Icon {
@@ -152,7 +141,7 @@
152 anchors.centerIn: parent141 anchors.centerIn: parent
153 height: parent.height * 2142 height: parent.height * 2
154 width: parent.width * 2143 width: parent.width * 2
155 onClicked: { pressEffect.start(); replyClicked(); }144 onClicked: { Haptics.play(); replyClicked(); }
156 }145 }
157 }146 }
158 }147 }
159148
=== modified file 'manifest.json'
--- manifest.json 2015-07-24 19:50:59 +0000
+++ manifest.json 2015-07-25 07:54:46 +0000
@@ -1,7 +1,7 @@
1{1{
2 "architecture": "all",2 "architecture": "all",
3 "description": "Reddit browser for Ubuntu",3 "description": "Reddit browser for Ubuntu",
4 "framework": "ubuntu-sdk-14.10-qml",4 "framework": "ubuntu-sdk-15.04-qml",
5 "hooks": {5 "hooks": {
6 "ureadit": {6 "ureadit": {
7 "apparmor": "ureadit.apparmor",7 "apparmor": "ureadit.apparmor",
88
=== modified file 'models/QReddit/ConnectionObject.qml'
--- models/QReddit/ConnectionObject.qml 2014-11-07 17:00:05 +0000
+++ models/QReddit/ConnectionObject.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
22
3QtObject {3QtObject {
4 id: connectionObject4 id: connectionObject
55
=== modified file 'models/QReddit/MoreCommentsListModel.qml'
--- models/QReddit/MoreCommentsListModel.qml 2014-12-28 02:16:01 +0000
+++ models/QReddit/MoreCommentsListModel.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
2import "QReddit.js" as QReddit2import "QReddit.js" as QReddit
33
4ListModel {4ListModel {
55
=== modified file 'models/QReddit/NotifierObject.qml'
--- models/QReddit/NotifierObject.qml 2015-01-13 03:02:31 +0000
+++ models/QReddit/NotifierObject.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
22
3QtObject {3QtObject {
44
55
=== modified file 'models/QReddit/PostCommentsListModel.qml'
--- models/QReddit/PostCommentsListModel.qml 2015-04-29 00:16:36 +0000
+++ models/QReddit/PostCommentsListModel.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
2import "QReddit.js" as QReddit2import "QReddit.js" as QReddit
33
4ListModel {4ListModel {
55
=== modified file 'models/QReddit/QRHelper.js'
--- models/QReddit/QRHelper.js 2014-11-07 17:00:05 +0000
+++ models/QReddit/QRHelper.js 2015-07-25 07:54:46 +0000
@@ -2,7 +2,7 @@
22
3//TODO: change method of adding listElements from string manipulation to listModel function calls.3//TODO: change method of adding listElements from string manipulation to listModel function calls.
4function arrayToListModel(array) {4function arrayToListModel(array) {
5 var listStr = "import QtQuick 2.0; ListModel { "5 var listStr = "import QtQuick 2.4; ListModel { "
6 for (var i = 0; i < array.length; i++) {6 for (var i = 0; i < array.length; i++) {
7 listStr += "ListElement { name: '" + array[i] + "' } ";7 listStr += "ListElement { name: '" + array[i] + "' } ";
8 }8 }
99
=== modified file 'models/QReddit/QRObjects.js'
--- models/QReddit/QRObjects.js 2015-02-08 21:05:46 +0000
+++ models/QReddit/QRObjects.js 2015-07-25 07:54:46 +0000
@@ -110,7 +110,7 @@
110}110}
111111
112function createTimer(timeout) {112function createTimer(timeout) {
113 return Qt.createQmlObject('import QtQuick 2.0; Timer{ interval: ' + timeout + '; running: true; repeat: false}', Qt.application);113 return Qt.createQmlObject('import QtQuick 2.4; Timer{ interval: ' + timeout + '; running: true; repeat: false}', Qt.application);
114}114}
115115
116116
117117
=== modified file 'models/QReddit/SubredditListModel.qml'
--- models/QReddit/SubredditListModel.qml 2015-04-29 00:16:36 +0000
+++ models/QReddit/SubredditListModel.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
2import "QReddit.js" as QReddit2import "QReddit.js" as QReddit
33
4ListModel {4ListModel {
55
=== modified file 'models/QReddit/UserMessagesListModel.qml'
--- models/QReddit/UserMessagesListModel.qml 2015-01-13 03:02:31 +0000
+++ models/QReddit/UserMessagesListModel.qml 2015-07-25 07:54:46 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.4
2import "QReddit.js" as QReddit2import "QReddit.js" as QReddit
33
4ListModel {4ListModel {
55
=== modified file 'po/template.pot'
--- po/template.pot 2015-07-24 19:50:59 +0000
+++ po/template.pot 2015-07-25 07:54:46 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-07-07 23:12-0400\n"11"POT-Creation-Date: 2015-07-24 21:17+0000\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -29,51 +29,67 @@
29msgid "Share image"29msgid "Share image"
30msgstr ""30msgstr ""
3131
32#: ui/SettingsPage.qml:8 ui/Frontpage.qml:21032#: ui/AboutPage.qml:8 ui/Frontpage.qml:219
33msgid "About"
34msgstr ""
35
36#: ui/AboutPage.qml:30
37msgid "Name"
38msgstr ""
39
40#: ui/AboutPage.qml:34
41msgid "Author"
42msgstr ""
43
44#: ui/AboutPage.qml:38
45msgid "Version"
46msgstr ""
47
48#: ui/AboutPage.qml:42
49msgid "Released"
50msgstr ""
51
52#: ui/SettingsPage.qml:8 ui/Frontpage.qml:211
33msgid "Settings"53msgid "Settings"
34msgstr ""54msgstr ""
3555
36#: ui/SettingsPage.qml:1556#: ui/SettingsPage.qml:19
37msgid "Startup"57msgid "Startup"
38msgstr ""58msgstr ""
3959
40#: ui/SettingsPage.qml:1860#: ui/SettingsPage.qml:22
41msgid "Login automatically at startup"61msgid "Login automatically at startup"
42msgstr ""62msgstr ""
4363
44#: ui/SettingsPage.qml:2964#: ui/SettingsPage.qml:33
45msgid "Internal Browser"65msgid "Internal Browser"
46msgstr ""66msgstr ""
4767
48#: ui/SettingsPage.qml:3368#: ui/SettingsPage.qml:37
49msgid "Open links internally"69msgid "Open links internally"
50msgstr ""70msgstr ""
5171
52#: ui/SettingsPage.qml:4472#: ui/SettingsPage.qml:48
53msgid "Image Previews"73msgid "Image Previews"
54msgstr ""74msgstr ""
5575
56#: ui/SettingsPage.qml:5276#: ui/SettingsPage.qml:56
57msgid "Don't show images"77msgid "Don't show images"
58msgstr ""78msgstr ""
5979
60#: ui/SettingsPage.qml:5280#: ui/SettingsPage.qml:56
61msgid "Show large previews"81msgid "Show large previews"
62msgstr ""82msgstr ""
6383
64#: ui/SettingsPage.qml:5284#: ui/SettingsPage.qml:56
65msgid "Show thumbnail previews"85msgid "Show thumbnail previews"
66msgstr ""86msgstr ""
6787
68#: ui/SettingsPage.qml:6088#: ui/SettingsPage.qml:64
69msgid "Theme"89msgid "Theme"
70msgstr ""90msgstr ""
7191
72#: ui/ArticlePage.qml:9992#: ui/Frontpage.qml:18 ui/Frontpage.qml:267 ui/Frontpage.qml:471
73msgid "Share image link"
74msgstr ""
75
76#: ui/Frontpage.qml:18 ui/Frontpage.qml:266 ui/Frontpage.qml:470
77msgid "Frontpage"93msgid "Frontpage"
78msgstr ""94msgstr ""
7995
@@ -97,74 +113,99 @@
97msgid "Rising"113msgid "Rising"
98msgstr ""114msgstr ""
99115
100#: ui/Frontpage.qml:86116#: ui/Frontpage.qml:87
101msgid "Subscriptions"117msgid "Subscriptions"
102msgstr ""118msgstr ""
103119
104#: ui/Frontpage.qml:86120#: ui/Frontpage.qml:87
105msgid "Defaults"121msgid "Defaults"
106msgstr ""122msgstr ""
107123
108#: ui/Frontpage.qml:86124#: ui/Frontpage.qml:87
109msgid "Search"125msgid "Search"
110msgstr ""126msgstr ""
111127
112#: ui/Frontpage.qml:165128#: ui/Frontpage.qml:166
113msgid "Subreddit"129msgid "Subreddit"
114msgstr ""130msgstr ""
115131
116#: ui/Frontpage.qml:174132#: ui/Frontpage.qml:175
117msgid "Login"133msgid "Login"
118msgstr ""134msgstr ""
119135
120#: ui/Frontpage.qml:183136#: ui/Frontpage.qml:184
121msgid "Inbox"137msgid "Inbox"
122msgstr ""138msgstr ""
123139
124#: ui/Frontpage.qml:192140#: ui/Frontpage.qml:193
125msgid "New Unread"141msgid "New Unread"
126msgstr ""142msgstr ""
127143
128#: ui/Frontpage.qml:201144#: ui/Frontpage.qml:202
129msgid "Users"145msgid "Users"
130msgstr ""146msgstr ""
131147
132#: ui/Frontpage.qml:218 ui/AboutPage.qml:8148#: ui/Frontpage.qml:227
133msgid "About"
134msgstr ""
135
136#: ui/Frontpage.qml:226
137msgid "Logout"149msgid "Logout"
138msgstr ""150msgstr ""
139151
140#: ui/Frontpage.qml:245152#: ui/Frontpage.qml:246
141msgid "Back"153msgid "Back"
142msgstr ""154msgstr ""
143155
144#: ui/Frontpage.qml:255156#: ui/Frontpage.qml:256
145msgid "Confirm"157msgid "Confirm"
146msgstr ""158msgstr ""
147159
148#: ui/Frontpage.qml:472160#: ui/Frontpage.qml:473
149msgid "All"161msgid "All"
150msgstr ""162msgstr ""
151163
152#: ui/AboutPage.qml:26164#: ui/ArticlePage.qml:99
153msgid "Name"165msgid "Share image link"
154msgstr ""166msgstr ""
155167
156#: ui/AboutPage.qml:30168#: ui/UserAccountsPage.qml:11
157msgid "Author"169msgid "User Accounts"
158msgstr ""170msgstr ""
159171
160#: ui/AboutPage.qml:34172#: ui/UserAccountsPage.qml:16
161msgid "Version"173msgid "Add Account"
162msgstr ""174msgstr ""
163175
164#: ui/AboutPage.qml:38176#: ui/UserAccountsPage.qml:149
165msgid "Released"177msgid "No users found"
166msgstr ""178msgstr ""
167179
168#: Main.qml:137180#: ui/UserAccountsPage.qml:150
181msgid "Press the add user header button to add a new user"
182msgstr ""
183
184#: ui/UserAccountsPage.qml:160
185#, qt-format
186msgid "Change Password for: %1"
187msgstr ""
188
189#: ui/UserAccountsPage.qml:164 ui/UserAccountsPage.qml:204
190msgid "Password"
191msgstr ""
192
193#: ui/UserAccountsPage.qml:172 ui/UserAccountsPage.qml:212
194msgid "Save"
195msgstr ""
196
197#: ui/UserAccountsPage.qml:181 ui/UserAccountsPage.qml:222
198msgid "Cancel"
199msgstr ""
200
201#: ui/UserAccountsPage.qml:193
202msgid "Add User Account"
203msgstr ""
204
205#: ui/UserAccountsPage.qml:197
206msgid "Username"
207msgstr ""
208
209#: Main.qml:134
169msgid "Link to a Reddit thread"210msgid "Link to a Reddit thread"
170msgstr ""211msgstr ""
171212
=== modified file 'themes/Ambiance.qml'
--- themes/Ambiance.qml 2015-04-23 10:16:22 +0000
+++ themes/Ambiance.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.Themes.Ambiance 0.13import Ubuntu.Components.Themes.Ambiance 0.1
44
5QtObject {5QtObject {
66
=== modified file 'themes/RedditDark.qml'
--- themes/RedditDark.qml 2015-03-17 00:48:30 +0000
+++ themes/RedditDark.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
33
4QtObject {4QtObject {
5 // MainView5 // MainView
66
=== modified file 'themes/RedditLight.qml'
--- themes/RedditLight.qml 2015-03-17 00:48:30 +0000
+++ themes/RedditLight.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.Themes.Ambiance 0.13import Ubuntu.Components.Themes.Ambiance 0.1
44
5QtObject {5QtObject {
66
=== modified file 'themes/ThemeManager.qml'
--- themes/ThemeManager.qml 2015-03-17 00:48:30 +0000
+++ themes/ThemeManager.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
33
4QtObject {4QtObject {
5 id: themeManager5 id: themeManager
66
=== modified file 'ui/AboutPage.qml'
--- ui/AboutPage.qml 2015-07-22 19:56:20 +0000
+++ ui/AboutPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.0 as ListItems3import Ubuntu.Components.ListItems 1.0 as ListItems
4import "../manifest.js" as Manifest4import "../manifest.js" as Manifest
55
66
=== modified file 'ui/ArticlePage.qml'
--- ui/ArticlePage.qml 2015-07-06 18:22:36 +0000
+++ ui/ArticlePage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.03import Ubuntu.Components.ListItems 1.0
4import Ubuntu.Web 0.24import Ubuntu.Web 0.2
5import Ubuntu.Content 0.15import Ubuntu.Content 0.1
66
=== modified file 'ui/CommentsPage.qml'
--- ui/CommentsPage.qml 2015-06-05 02:02:46 +0000
+++ ui/CommentsPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.03import Ubuntu.Components.ListItems 1.0
4import "../models/QReddit"4import "../models/QReddit"
5import "../components"5import "../components"
66
=== modified file 'ui/Frontpage.qml'
--- ui/Frontpage.qml 2015-07-22 19:49:53 +0000
+++ ui/Frontpage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.0 as ListItems3import Ubuntu.Components.ListItems 1.0 as ListItems
4import "../components"4import "../components"
5import "../models/QReddit"5import "../models/QReddit"
@@ -400,7 +400,7 @@
400 if(pf.atYEnd && !pf.atYBeginning && (pf.contentHeight >= parent.height)) {400 if(pf.atYEnd && !pf.atYBeginning && (pf.contentHeight >= parent.height)) {
401 moreLoaderItem.overflow = pf.contentY - pf.contentHeight + pf.height401 moreLoaderItem.overflow = pf.contentY - pf.contentHeight + pf.height
402 if ((moreLoaderItem.overflow > moreLoaderItem.loadMoreLength) && !moreLoaderItem.spaceRect) {402 if ((moreLoaderItem.overflow > moreLoaderItem.loadMoreLength) && !moreLoaderItem.spaceRect) {
403 moreLoaderItem.spaceRect = Qt.createQmlObject("import QtQuick 2.0; Item{width: 1; height: " + moreLoaderItem.loadMoreLength + "}", frontpage)403 moreLoaderItem.spaceRect = Qt.createQmlObject("import QtQuick 2.4; Item{width: 1; height: " + moreLoaderItem.loadMoreLength + "}", frontpage)
404 postsModel.loadMore()404 postsModel.loadMore()
405 }405 }
406406
407407
=== modified file 'ui/InternalBrowserPage.qml'
--- ui/InternalBrowserPage.qml 2015-02-08 21:05:46 +0000
+++ ui/InternalBrowserPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.03import Ubuntu.Components.ListItems 1.0
4import Ubuntu.Web 0.24import Ubuntu.Web 0.2
5import Ubuntu.Content 0.15import Ubuntu.Content 0.1
66
=== modified file 'ui/MoreCommentsPage.qml'
--- ui/MoreCommentsPage.qml 2015-04-23 10:16:22 +0000
+++ ui/MoreCommentsPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.03import Ubuntu.Components.ListItems 1.0
4import "../models/QReddit"4import "../models/QReddit"
5import "../components"5import "../components"
66
=== modified file 'ui/PostMessagePage.qml'
--- ui/PostMessagePage.qml 2015-06-05 02:02:46 +0000
+++ ui/PostMessagePage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.03import Ubuntu.Components.ListItems 1.0
4import "../components"4import "../components"
5import "../models/QReddit/QReddit.js" as QReddit5import "../models/QReddit/QReddit.js" as QReddit
66
=== modified file 'ui/SettingsPage.qml'
--- ui/SettingsPage.qml 2015-07-22 19:56:20 +0000
+++ ui/SettingsPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.0 as ListItems3import Ubuntu.Components.ListItems 1.0 as ListItems
4import Ubuntu.Components.Popups 1.04import Ubuntu.Components.Popups 1.0
55
66
=== modified file 'ui/ShareImagePage.qml'
--- ui/ShareImagePage.qml 2015-04-23 10:16:22 +0000
+++ ui/ShareImagePage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.0 as ListItems3import Ubuntu.Components.ListItems 1.0 as ListItems
4import Ubuntu.Content 0.14import Ubuntu.Content 0.1
55
66
=== modified file 'ui/ShareLinkPage.qml'
--- ui/ShareLinkPage.qml 2015-04-23 10:16:22 +0000
+++ ui/ShareLinkPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.0 as ListItems3import Ubuntu.Components.ListItems 1.0 as ListItems
4import Ubuntu.Components.Popups 1.0 as Popups4import Ubuntu.Components.Popups 1.0 as Popups
5import Ubuntu.Content 0.15import Ubuntu.Content 0.1
66
=== modified file 'ui/SubredditPage.qml'
--- ui/SubredditPage.qml 2015-07-22 19:49:53 +0000
+++ ui/SubredditPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.0 as ListItems3import Ubuntu.Components.ListItems 1.0 as ListItems
4import "../components"4import "../components"
5import "../models/QReddit"5import "../models/QReddit"
@@ -140,7 +140,7 @@
140 if(pf.atYEnd && !pf.atYBeginning && (pf.contentHeight >= parent.height)) {140 if(pf.atYEnd && !pf.atYBeginning && (pf.contentHeight >= parent.height)) {
141 moreLoaderItem.overflow = pf.contentY - pf.contentHeight + pf.height141 moreLoaderItem.overflow = pf.contentY - pf.contentHeight + pf.height
142 if ((moreLoaderItem.overflow > moreLoaderItem.loadMoreLength) && !moreLoaderItem.spaceRect) {142 if ((moreLoaderItem.overflow > moreLoaderItem.loadMoreLength) && !moreLoaderItem.spaceRect) {
143 moreLoaderItem.spaceRect = Qt.createQmlObject("import QtQuick 2.0; Item{width: 1; height: " + moreLoaderItem.loadMoreLength + "}", subredditpage)143 moreLoaderItem.spaceRect = Qt.createQmlObject("import QtQuick 2.4; Item{width: 1; height: " + moreLoaderItem.loadMoreLength + "}", subredditpage)
144 postsModel.loadMore()144 postsModel.loadMore()
145 }145 }
146146
147147
=== modified file 'ui/SubredditSwitcherPage.qml'
--- ui/SubredditSwitcherPage.qml 2015-04-07 02:00:13 +0000
+++ ui/SubredditSwitcherPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.0 as ListItems3import Ubuntu.Components.ListItems 1.0 as ListItems
4import "../components"4import "../components"
5import "../models/QReddit"5import "../models/QReddit"
66
=== modified file 'ui/UserAccountsPage.qml'
--- ui/UserAccountsPage.qml 2015-01-05 02:58:08 +0000
+++ ui/UserAccountsPage.qml 2015-07-25 07:54:46 +0000
@@ -1,43 +1,107 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import QtQuick.Layouts 1.1
3import Ubuntu.Components.ListItems 1.0 as ListItems3import Ubuntu.Components 1.2
4import Ubuntu.Components.ListItems 1.1 as ListItems
4import Ubuntu.Components.Popups 1.05import Ubuntu.Components.Popups 1.0
6import "../components"
57
6Page {8Page {
7 id: accountsPage9 id: accountsPage
8 title: "User Accounts"10
11 title: i18n.tr("User Accounts")
912
10 head.actions: [13 head.actions: [
11 Action {14 Action {
12 id: addAccountAction15 id: addAccountAction
13 text: "Add Account"16 text: i18n.tr("Add Account")
14 iconName: 'new-contact'17 iconName: 'new-contact'
15 onTriggered: {18 onTriggered: {
16 PopupUtils.open(addAccountComponent)19 PopupUtils.open(addAccountComponent)
17 }20 }
18 }21 }
19
20 ]22 ]
23
24 ListModel {
25 id: usersModel
26 }
27
28 Component.onCompleted: {
29 loadUsersModel()
30 }
31
32 /*
33 Function to convert the users variable returned by uReadIt.qreddit.getUsers() into a listmodel
34 so that the listview can automatically update when model changes are made.
35 */
36 function loadUsersModel() {
37 usersModel.clear()
38 var users = uReadIt.qreddit.getUsers()
39 for (var i=0; i<users.length; i++) {
40 usersModel.append({"name" : users[i]})
41 }
42 }
43
21 ListView {44 ListView {
22 id: accountsList45 id: accountsList
46
23 anchors.fill: parent47 anchors.fill: parent
2448 model: usersModel
25 model: uReadIt.qreddit.getUsers()49
2650 delegate: ListItem {
27 delegate: ListItems.Standard {51 id: listitem
28 text: modelData || "Anonymous"52
29 progression: true53 divider.visible: false
30 removable: (modelData) ? true : false54
31 confirmRemoval: true55 ListItems.ThinDivider { anchors.bottom: parent.bottom }
32 iconName: 'contact'56
33 iconSource: {57 RowLayout {
34 if (!modelData) {58 spacing: units.gu(2)
35 return ""59 anchors.left: parent.left
36 } else if (uReadIt.qreddit.notifier.isLoggedIn && modelData == uReadIt.qreddit.notifier.activeUser) {60 anchors.right: parent.right
37 return Qt.resolvedUrl('../images/contact-active.svg')61 anchors.margins: units.gu(2)
38 } else {62 height: parent.height
39 return Qt.resolvedUrl('../images/contact.svg')63
40 }64 Icon {
65 anchors.verticalCenter: parent.verticalCenter
66 width: units.gu(3)
67 height: width
68 name: 'contact'
69 source: {
70 if (!modelData) {
71 return ""
72 } else if (uReadIt.qreddit.notifier.isLoggedIn && modelData == uReadIt.qreddit.notifier.activeUser) {
73 return Qt.resolvedUrl('../images/contact-active.svg')
74 } else {
75 return Qt.resolvedUrl('../images/contact.svg')
76 }
77 }
78 }
79
80 Label {
81 text: modelData || "Anonymous"
82 Layout.fillWidth: true
83 anchors.verticalCenter: parent.verticalCenter
84 }
85
86 Icon {
87 name: 'go-next'
88 width: units.gu(2)
89 height: width
90 anchors.verticalCenter: parent.verticalCenter
91 }
92 }
93
94 leadingActions: ListItemActions {
95 actions: [
96 Action {
97 enabled: modelData ? true : false
98 iconName: 'delete'
99 onTriggered: {
100 uReadIt.qreddit.deleteUser(modelData)
101 usersModel.remove(index, 1)
102 }
103 }
104 ]
41 }105 }
42106
43 onClicked: {107 onClicked: {
@@ -65,10 +129,25 @@
65 PopupUtils.open(editAccountComponent, null, {'username':modelData, 'text':response})129 PopupUtils.open(editAccountComponent, null, {'username':modelData, 'text':response})
66 })130 })
67 }131 }
68132 }
69 onItemRemoved: {133 }
70 uReadIt.qreddit.deleteUser(modelData)134
71 }135 Loader {
136 id: emptyState
137 anchors.left: parent.left
138 anchors.right: parent.right
139 anchors.verticalCenter: parent.verticalCenter
140 sourceComponent: usersModel.count === 0 ? emptyStateComponent : undefined
141 }
142
143 Component {
144 id: emptyStateComponent
145 EmptyState {
146 iconHeight: units.gu(12)
147 iconWidth: units.gu(12)
148 iconSource: Qt.resolvedUrl("../images/contact-active.svg")
149 title: i18n.tr("No users found")
150 subTitle: i18n.tr("Press the add user header button to add a new user")
72 }151 }
73 }152 }
74153
@@ -78,11 +157,11 @@
78 Dialog {157 Dialog {
79 id: editAccountDialog158 id: editAccountDialog
80 property string username: ""159 property string username: ""
81 title: "Change Password for: "+username160 title: i18n.tr("Change Password for: %1").arg(username)
82161
83 TextField {162 TextField {
84 id: editPasswordField163 id: editPasswordField
85 placeholderText: "Password"164 placeholderText: i18n.tr("Password")
86 width: parent.width165 width: parent.width
87 text: ""166 text: ""
88 echoMode: TextInput.PasswordEchoOnEdit167 echoMode: TextInput.PasswordEchoOnEdit
@@ -90,7 +169,7 @@
90 }169 }
91 Button {170 Button {
92 id: editConfirmButton171 id: editConfirmButton
93 text: "Save"172 text: i18n.tr("Save")
94 gradient: UbuntuColors.orangeGradient173 gradient: UbuntuColors.orangeGradient
95 onClicked: {174 onClicked: {
96 uReadIt.qreddit._addUser(username, editPasswordField.text)175 uReadIt.qreddit._addUser(username, editPasswordField.text)
@@ -99,7 +178,7 @@
99 }178 }
100 Button {179 Button {
101 id: addCancelButton180 id: addCancelButton
102 text: "Cancel"181 text: i18n.tr("Cancel")
103 onClicked: {182 onClicked: {
104 PopupUtils.close(editAccountDialog)183 PopupUtils.close(editAccountDialog)
105 }184 }
@@ -111,18 +190,18 @@
111190
112 Dialog {191 Dialog {
113 id: addAccountDialog192 id: addAccountDialog
114 title: "Add User Account"193 title: i18n.tr("Add User Account")
115194
116 TextField {195 TextField {
117 id: addUsernameField196 id: addUsernameField
118 placeholderText: "Username"197 placeholderText: i18n.tr("Username")
119 width: parent.width198 width: parent.width
120 //text: ""199 //text: ""
121 //inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase200 //inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase
122 }201 }
123 TextField {202 TextField {
124 id: addPasswordField203 id: addPasswordField
125 placeholderText: "Password"204 placeholderText: i18n.tr("Password")
126 width: parent.width205 width: parent.width
127 text: ""206 text: ""
128 echoMode: TextInput.PasswordEchoOnEdit207 echoMode: TextInput.PasswordEchoOnEdit
@@ -130,16 +209,17 @@
130 }209 }
131 Button {210 Button {
132 id: addConfirmButton211 id: addConfirmButton
133 text: "Save"212 text: i18n.tr("Save")
134 gradient: UbuntuColors.orangeGradient213 gradient: UbuntuColors.orangeGradient
135 onClicked: {214 onClicked: {
136 uReadIt.qreddit._addUser(addUsernameField.text, addPasswordField.text)215 uReadIt.qreddit._addUser(addUsernameField.text, addPasswordField.text)
216 usersModel.append({"name": addUsernameField.text})
137 PopupUtils.close(addAccountDialog)217 PopupUtils.close(addAccountDialog)
138 }218 }
139 }219 }
140 Button {220 Button {
141 id: addCancelButton221 id: addCancelButton
142 text: "Cancel"222 text: i18n.tr("Cancel")
143 onClicked: {223 onClicked: {
144 PopupUtils.close(addAccountDialog)224 PopupUtils.close(addAccountDialog)
145 }225 }
146226
=== modified file 'ui/UserMessagesPage.qml'
--- ui/UserMessagesPage.qml 2015-07-24 20:07:32 +0000
+++ ui/UserMessagesPage.qml 2015-07-25 07:54:46 +0000
@@ -1,5 +1,5 @@
1import QtQuick 2.01import QtQuick 2.4
2import Ubuntu.Components 1.12import Ubuntu.Components 1.2
3import Ubuntu.Components.ListItems 1.03import Ubuntu.Components.ListItems 1.0
4import "../models/QReddit"4import "../models/QReddit"
5import "../components"5import "../components"
66
=== modified file 'ureadit.apparmor'
--- ureadit.apparmor 2015-04-28 21:48:12 +0000
+++ ureadit.apparmor 2015-07-25 07:54:46 +0000
@@ -6,5 +6,5 @@
6 "content_exchange_source",6 "content_exchange_source",
7 "content_exchange"7 "content_exchange"
8 ],8 ],
9 "policy_version": 1.29 "policy_version": 1.3
10}10}
11\ No newline at end of file11\ No newline at end of file

Subscribers

People subscribed via source and target branches