Merge branch 'otherdev'

This commit is contained in:
Morgan McMillian 2017-02-17 13:03:56 -08:00
commit 35ce43caf7
6 changed files with 46 additions and 27 deletions

View file

@ -1,6 +1,5 @@
1 1
47 47
AboutPage.qml
AppCover.qml AppCover.qml
LoginSheet.qml LoginSheet.qml
main.qml main.qml
@ -47,3 +46,4 @@ PostItem.qml
StreamTab.qml StreamTab.qml
WebViewSheet.qml WebViewSheet.qml
parser.js parser.js
AboutPage.qml

View file

@ -29,7 +29,6 @@ Container {
rightPadding: ui.sdu(3.0) rightPadding: ui.sdu(3.0)
topPadding: ui.sdu(2.0) topPadding: ui.sdu(2.0)
//bottomPadding: ui.sdu(2.0) //bottomPadding: ui.sdu(2.0)
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 variant theme : Application.themeSupport.theme.colorTheme.style property variant theme : Application.themeSupport.theme.colorTheme.style
@ -144,6 +143,22 @@ Container {
navigation.focusPolicy: NavigationFocusPolicy.NotFocusable navigation.focusPolicy: NavigationFocusPolicy.NotFocusable
} }
} }
Container {
horizontalAlignment: HorizontalAlignment.Center
bottomMargin: ui.sdu(2.0)
WebImageView {
url: {
var oembed = ""
ListItemData.raw.forEach(function (item) {
if (item["type"] == "io.pnut.core.oembed") {
oembed = item["value"]["url"]
}
})
return oembed
}
scalingMethod: ScalingMethod.AspectFit
}
}
Container { Container {
layout: DockLayout {} layout: DockLayout {}
horizontalAlignment: HorizontalAlignment.Fill horizontalAlignment: HorizontalAlignment.Fill

View file

@ -19,6 +19,7 @@
import bb.cascades 1.4 import bb.cascades 1.4
import org.labsquare 1.0 import org.labsquare 1.0
import "parser.js" as Parser
Page { Page {
@ -109,7 +110,7 @@ Page {
preferredWidth: ui.du(45) preferredWidth: ui.du(45)
Label { Label {
//text: lorem //text: lorem
text: user.content.html text: Parser.parsePostData(user.content.html)
multiline: true multiline: true
textFormat: TextFormat.Html textFormat: TextFormat.Html
} }

View file

@ -236,8 +236,9 @@ function parsePostData(t) {
t = t.replace(/þ/g,"\u00FE"); t = t.replace(/þ/g,"\u00FE");
t = t.replace(/ÿ/g,"\u00FF"); t = t.replace(/ÿ/g,"\u00FF");
t = t.replace(/"/g,"\u0022"); t = t.replace(/"/g,"\u0022");
t = t.replace(/</g,"\u003C"); t = t.replace(/<3/g, "\u2764");
t = t.replace(/>/g,"\u003E"); t = t.replace(/</g,"\u02C2");
t = t.replace(/>/g,"\u02C3");
t = t.replace(/€/g,"\u0080"); t = t.replace(/€/g,"\u0080");
t = t.replace(/‚/g,"\u0082"); t = t.replace(/‚/g,"\u0082");
t = t.replace(/ƒ/g,"\u0083"); t = t.replace(/ƒ/g,"\u0083");

View file

@ -335,6 +335,7 @@ void Pnut::getStream(QString endpoint, Pnut::RequestType rtype)
QUrl url(PNUT_API_ROOT + endpoint); QUrl url(PNUT_API_ROOT + endpoint);
KQOAuthParameters parameters; KQOAuthParameters parameters;
parameters.insert("count", "50"); parameters.insert("count", "50");
parameters.insert("include_raw", "1");
switch (rtype) switch (rtype)
{ {
case Pnut::STREAM_NEWER: case Pnut::STREAM_NEWER:
@ -400,6 +401,7 @@ void Pnut::getThread(QString pid)
{ {
QUrl url(PNUT_API_ROOT + "/posts/" + pid + "/thread"); QUrl url(PNUT_API_ROOT + "/posts/" + pid + "/thread");
KQOAuthParameters parameters; KQOAuthParameters parameters;
parameters.insert("include_raw", "1");
req_map[++req_id] = ":thread"; req_map[++req_id] = ":thread";
getRequest(url, parameters, req_id); getRequest(url, parameters, req_id);
} }

View file

@ -30,47 +30,47 @@
<context> <context>
<name>PostItem</name> <name>PostItem</name>
<message> <message>
<location filename="../assets/PostItem.qml" line="172"/> <location filename="../assets/PostItem.qml" line="189"/>
<source>Reply</source> <source>Reply</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="181"/> <location filename="../assets/PostItem.qml" line="198"/>
<source>Reply All</source> <source>Reply All</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="191"/> <location filename="../assets/PostItem.qml" line="208"/>
<source>Add Bookmark</source> <source>Add Bookmark</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="191"/> <location filename="../assets/PostItem.qml" line="208"/>
<source>Delete Bookmark</source> <source>Delete Bookmark</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="202"/> <location filename="../assets/PostItem.qml" line="219"/>
<source>Repost</source> <source>Repost</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="202"/> <location filename="../assets/PostItem.qml" line="219"/>
<source>Delete Repost</source> <source>Delete Repost</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="213"/> <location filename="../assets/PostItem.qml" line="230"/>
<source>Quote</source> <source>Quote</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="222"/> <location filename="../assets/PostItem.qml" line="239"/>
<source>View Profile</source> <source>View Profile</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="240"/> <location filename="../assets/PostItem.qml" line="257"/>
<source>Delete</source> <source>Delete</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -78,55 +78,55 @@
<context> <context>
<name>ProfilePage</name> <name>ProfilePage</name>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="127"/> <location filename="../assets/ProfilePage.qml" line="128"/>
<location filename="../assets/ProfilePage.qml" line="200"/> <location filename="../assets/ProfilePage.qml" line="201"/>
<source>Following</source> <source>Following</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="140"/> <location filename="../assets/ProfilePage.qml" line="141"/>
<location filename="../assets/ProfilePage.qml" line="215"/> <location filename="../assets/ProfilePage.qml" line="216"/>
<source>Followers</source> <source>Followers</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="153"/> <location filename="../assets/ProfilePage.qml" line="154"/>
<location filename="../assets/ProfilePage.qml" line="187"/> <location filename="../assets/ProfilePage.qml" line="188"/>
<source>Posts</source> <source>Posts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="166"/> <location filename="../assets/ProfilePage.qml" line="167"/>
<source>Bookmarks</source> <source>Bookmarks</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="232"/> <location filename="../assets/ProfilePage.qml" line="233"/>
<source>Unfollow</source> <source>Unfollow</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="232"/> <location filename="../assets/ProfilePage.qml" line="233"/>
<source>Follow</source> <source>Follow</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="245"/> <location filename="../assets/ProfilePage.qml" line="246"/>
<source>Unmute</source> <source>Unmute</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="245"/> <location filename="../assets/ProfilePage.qml" line="246"/>
<source>Mute</source> <source>Mute</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="258"/> <location filename="../assets/ProfilePage.qml" line="259"/>
<source>Unblock</source> <source>Unblock</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="258"/> <location filename="../assets/ProfilePage.qml" line="259"/>
<source>Block</source> <source>Block</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>