fix code formatting

This commit is contained in:
Morgan McMillian 2016-11-11 09:52:45 -08:00
parent 40878e1059
commit eee1fe6eda

View file

@ -1,18 +1,18 @@
/* /*
* Copyright (C) 2016 Morgan McMillian <gilag@monkeystew.com> * Copyright (C) 2016 Morgan McMillian <gilag@monkeystew.com>
* *
* This file is apart of the Goober application, a client for pnut.io * This file is apart of the Goober application, a client for pnut.io
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
@ -21,22 +21,23 @@ import bb.cascades 1.4
import org.labsquare 1.0 import org.labsquare 1.0
Page { Page {
property variant user property variant user
property variant theme : Application.themeSupport.theme.colorTheme.style property variant theme: Application.themeSupport.theme.colorTheme.style
property string lorem: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse non enim tellus. Donec vestibulum enim urna, eget faucibus diam commodo a. Donec eget hendrerit metus. Pellentesque vehicula nisi nec vehicula ullamcorper. Aliquam a elit eget mi fringilla porta fermentum eget eros. Phasellus vestibulum nulla sed elit congue adipiscing. Cras imperdiet urna ac ipsum volutpat lobortis. Maecenas vehicula tortor at viverra convallis. Curabitur nibh massa, tristique id felis ut, venenatis faucibus dui. Donec fringilla, mi nec tincidunt dignissim, neque nunc semper mi, quis rutrum diam turpis sit amet erat. Cras a sodales nisi. Nunc sit amet diam sed lectus molestie cursus convallis et erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Duis vitae varius leo. Mauris eu leo a nunc bibendum rutrum euismod et ipsum. " property string lorem: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse non enim tellus. Donec vestibulum enim urna, eget faucibus diam commodo a. Donec eget hendrerit metus. Pellentesque vehicula nisi nec vehicula ullamcorper. Aliquam a elit eget mi fringilla porta fermentum eget eros. Phasellus vestibulum nulla sed elit congue adipiscing. Cras imperdiet urna ac ipsum volutpat lobortis. Maecenas vehicula tortor at viverra convallis. Curabitur nibh massa, tristique id felis ut, venenatis faucibus dui. Donec fringilla, mi nec tincidunt dignissim, neque nunc semper mi, quis rutrum diam turpis sit amet erat. Cras a sodales nisi. Nunc sit amet diam sed lectus molestie cursus convallis et erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Duis vitae varius leo. Mauris eu leo a nunc bibendum rutrum euismod et ipsum. "
signal follow(string uid) signal follow(string uid)
signal unfollow(string uid) signal unfollow(string uid)
signal block(string uid) signal block(string uid)
signal unblock(string uid) signal unblock(string uid)
signal mute(string uid) signal mute(string uid)
signal unmute(string uid) signal unmute(string uid)
ScrollView { ScrollView {
Container { Container {
Container { Container {
layout: DockLayout {} layout: DockLayout {
}
horizontalAlignment: HorizontalAlignment.Fill horizontalAlignment: HorizontalAlignment.Fill
preferredHeight: cover.height preferredHeight: cover.height
Container { Container {
@ -79,7 +80,7 @@ Page {
text: user.name text: user.name
textStyle.fontWeight: FontWeight.Bold textStyle.fontWeight: FontWeight.Bold
textStyle.fontSize: FontSize.Large textStyle.fontSize: FontSize.Large
} }
} }
Container { Container {
@ -87,20 +88,21 @@ Page {
//text: "thrrgilag" //text: "thrrgilag"
text: user.username text: user.username
textStyle.fontSize: FontSize.Medium textStyle.fontSize: FontSize.Medium
} }
} }
} }
} }
} }
Container { Container {
topPadding: ui.sdu(3) topPadding: ui.sdu(3)
leftPadding: ui.sdu(3) leftPadding: ui.sdu(3)
rightPadding: ui.sdu(3) rightPadding: ui.sdu(3)
layout: DockLayout {} layout: DockLayout {
}
horizontalAlignment: HorizontalAlignment.Fill horizontalAlignment: HorizontalAlignment.Fill
Container { Container {
preferredWidth: ui.du(45) preferredWidth: ui.du(45)
@ -122,7 +124,7 @@ Page {
horizontalAlignment: HorizontalAlignment.Right horizontalAlignment: HorizontalAlignment.Right
Label { Label {
text: qsTr("Following") text: qsTr("Following")
} }
Label { Label {
text: user.counts.following text: user.counts.following
@ -135,7 +137,7 @@ Page {
horizontalAlignment: HorizontalAlignment.Right horizontalAlignment: HorizontalAlignment.Right
Label { Label {
text: qsTr("Followers") text: qsTr("Followers")
} }
Label { Label {
text: user.counts.followers text: user.counts.followers
@ -148,7 +150,7 @@ Page {
horizontalAlignment: HorizontalAlignment.Right horizontalAlignment: HorizontalAlignment.Right
Label { Label {
text: qsTr("Posts") text: qsTr("Posts")
} }
Label { Label {
text: user.counts.posts text: user.counts.posts
@ -161,55 +163,57 @@ Page {
horizontalAlignment: HorizontalAlignment.Right horizontalAlignment: HorizontalAlignment.Right
Label { Label {
text: qsTr("Bookmarks") text: qsTr("Bookmarks")
} }
Label { Label {
text: user.counts.bookmarks text: user.counts.bookmarks
} }
} }
} }
} }
Divider {} Divider {
ListView {
id: threadView
dataModel: ArrayDataModel {
id: threadModel
} }
listItemComponents: [ ListView {
ListItemComponent { id: threadView
id: root dataModel: ArrayDataModel {
PostItem {} id: threadModel
} }
] listItemComponents: [
function sendReply(text, pid) { ListItemComponent {
pnut.sendReply(text, pid); id: root
} PostItem {
function getUserName() { }
return _app.setting("username") }
} ]
function viewProfile(userobj) { function sendReply(text, pid) {
var page = profilePage.createObject(); pnut.sendReply(text, pid);
page.user = userobj }
page.follow.connect(follow) function getUserName() {
page.unfollow.connect(unfollow) return _app.setting("username")
page.block.connect(block) }
page.unblock.connect(unblock) function viewProfile(userobj) {
page.mute.connect(mute) var page = profilePage.createObject();
page.unmute.connect(unmute) page.user = userobj
nav.push(page); page.follow.connect(follow)
} page.unfollow.connect(unfollow)
function ccOnReply() { page.block.connect(block)
if (_app.setting("cc") === "true") { page.unblock.connect(unblock)
return true page.mute.connect(mute)
} else { page.unmute.connect(unmute)
return false nav.push(page);
}
function ccOnReply() {
if (_app.setting("cc") === "true") {
return true
} else {
return false
}
} }
} }
} }
}
} }
function loadThread(data) { function loadThread(data) {
threadModel.append(data); threadModel.append(data);
} }