commit
26e309e327
10 changed files with 705 additions and 617 deletions
|
@ -36,7 +36,6 @@ import "./lib/API.js" as Logic
|
|||
ApplicationWindow
|
||||
{
|
||||
id: appWindow
|
||||
//initialPage: Component { FirstPage { } }
|
||||
cover: Qt.resolvedUrl("cover/CoverPage.qml")
|
||||
allowedOrientations: defaultAllowedOrientations
|
||||
Component.onCompleted: {
|
||||
|
@ -59,9 +58,6 @@ ApplicationWindow
|
|||
pageStack.push(Qt.resolvedUrl("./pages/MainPage.qml"), {})
|
||||
});
|
||||
|
||||
//
|
||||
//
|
||||
//pageStack.push(Qt.resolvedUrl("./pages/Conversation.qml"), {})
|
||||
} else {
|
||||
pageStack.push(Qt.resolvedUrl("./pages/LoginPage.qml"), {})
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ WorkerScript.onMessage = function(msg) {
|
|||
console.log("descendants")
|
||||
for (var j = 0; j < data[i].length; j ++) {
|
||||
item = parseToot(data[i][j]);
|
||||
item['id'] = item['status_id']
|
||||
item['id'] = item['status_id'];
|
||||
if (typeof item['attachments'] === "undefined")
|
||||
item['attachments'] = [];
|
||||
items.push(item)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -37,7 +37,6 @@ import "../lib/API.js" as Logic
|
|||
|
||||
Page {
|
||||
id: loginPage
|
||||
|
||||
// The effective value will be restricted by ApplicationWindow.allowedOrientations
|
||||
allowedOrientations: Orientation.All
|
||||
|
||||
|
@ -62,7 +61,7 @@ Page {
|
|||
TextField {
|
||||
id: instance
|
||||
focus: true
|
||||
label: qsTr("Enter an Mastodon instance URL")
|
||||
label: qsTr("Enter a valid Mastodon instance URL")
|
||||
text: "https://"
|
||||
placeholderText: "https://mastodon.social"
|
||||
width: parent.width
|
||||
|
|
|
@ -69,10 +69,11 @@ Page {
|
|||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
}
|
||||
MyList{
|
||||
id: tlPublic;
|
||||
title: qsTr("Federated")
|
||||
type: "timelines/public"
|
||||
mdl: Logic.modelTLpublic
|
||||
id: tlNotifications;
|
||||
title: qsTr("Notifications")
|
||||
type: "notifications"
|
||||
notifier: true
|
||||
mdl: Logic.modelTLnotifications
|
||||
width: parent.itemWidth
|
||||
height: parent.itemHeight
|
||||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
|
@ -88,11 +89,10 @@ Page {
|
|||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
}
|
||||
MyList{
|
||||
id: tlNotifications;
|
||||
title: qsTr("Notifications")
|
||||
type: "notifications"
|
||||
notifier: true
|
||||
mdl: Logic.modelTLnotifications
|
||||
id: tlPublic;
|
||||
title: qsTr("Federated")
|
||||
type: "timelines/public"
|
||||
mdl: Logic.modelTLpublic
|
||||
width: parent.itemWidth
|
||||
height: parent.itemHeight
|
||||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
|
@ -260,6 +260,11 @@ Page {
|
|||
slideshow.positionViewAtIndex(4, ListView.SnapToItem)
|
||||
navigation.navigateTo('search')
|
||||
|
||||
} else if (test.length === 4 && test[3][0] === "@" ) {
|
||||
tlSearch.search = decodeURIComponent("@"+test[3].substring(1)+"@"+test[2])
|
||||
slideshow.positionViewAtIndex(4, ListView.SnapToItem)
|
||||
navigation.navigateTo('search')
|
||||
|
||||
} else {
|
||||
Qt.openUrlExternally(href);
|
||||
}
|
||||
|
|
|
@ -16,8 +16,9 @@ Page {
|
|||
property int favourites_count;
|
||||
property int reblogs_count;
|
||||
property int count_moments;
|
||||
property string profile_background : "";
|
||||
property string profile_background: "";
|
||||
property string note: "";
|
||||
property string url: "";
|
||||
|
||||
property bool locked : false;
|
||||
property date created_at;
|
||||
|
@ -28,7 +29,6 @@ Page {
|
|||
property bool muting : false;
|
||||
property bool domain_blocking : false;
|
||||
|
||||
|
||||
WorkerScript {
|
||||
id: worker
|
||||
source: "../lib/Worker.js"
|
||||
|
@ -68,9 +68,10 @@ Page {
|
|||
following_count = messageObject.data
|
||||
break;
|
||||
case 'acct':
|
||||
//username = messageObject.data
|
||||
// line below was commented out, reason unknown
|
||||
// username = messageObject.data
|
||||
break;
|
||||
case 'locked':
|
||||
case 'locked':m
|
||||
locked = messageObject.data
|
||||
break;
|
||||
case 'created_at':
|
||||
|
@ -82,6 +83,9 @@ Page {
|
|||
case 'note':
|
||||
note = messageObject.data
|
||||
break;
|
||||
case 'url':
|
||||
url = messageObject.data
|
||||
break;
|
||||
case 'following':
|
||||
following = messageObject.data
|
||||
followers_count = followers_count + (following ? 1 : - 1)
|
||||
|
@ -238,10 +242,65 @@ Page {
|
|||
}
|
||||
|
||||
}
|
||||
/*ExpandingSection {
|
||||
title: "Tweets"
|
||||
ExpandingSection {
|
||||
title: qsTr("Bio")
|
||||
content.sourceComponent: Column {
|
||||
spacing: Theme.paddingMedium
|
||||
anchors.bottomMargin: Theme.paddingLarge
|
||||
Text {
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - ( 2 * Theme.horizontalPageMargin )
|
||||
id: txtnote
|
||||
text: note
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
color: Theme.secondaryColor
|
||||
linkColor: Theme.secondaryHighlightColor
|
||||
wrapMode: Text.Wrap
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
onLinkActivated: {
|
||||
var test = link.split("/")
|
||||
console.log(link)
|
||||
console.log(JSON.stringify(test))
|
||||
console.log(JSON.stringify(test.length))
|
||||
|
||||
}*/
|
||||
if (test.length === 5 && (test[3] === "tags" || test[3] === "tag") ) {
|
||||
pageStack.pop(pageStack.find(function(page) {
|
||||
var check = page.isFirstPage === true;
|
||||
if (check)
|
||||
page.onLinkActivated(link)
|
||||
return check;
|
||||
}));
|
||||
send(link)
|
||||
|
||||
} else if (test.length === 4 && test[3][0] === "@" ) {
|
||||
tlSearch.search = decodeURIComponent("@"+test[3].substring(1)+"@"+test[2])
|
||||
slideshow.positionViewAtIndex(4, ListView.SnapToItem)
|
||||
navigation.navigateTo('search')
|
||||
|
||||
} else {
|
||||
Qt.openUrlExternally(link);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Column {
|
||||
spacing: Theme.paddingMedium
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
Button {
|
||||
id: btnUrl
|
||||
text: qsTr("Open Profile in Browser")
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
Label {
|
||||
text: " "
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -57,29 +57,29 @@ Page {
|
|||
IconTextSwitch {
|
||||
//enabled: false
|
||||
checked: typeof Logic.conf['loadImages'] !== "undefined" && Logic.conf['loadImages']
|
||||
text: qsTr("Load images in toots")
|
||||
text: qsTr("Load Images in Toots")
|
||||
description: qsTr("Disable this option if you want to preserve your data connection")
|
||||
icon.source: "image://theme/icon-m-mobile-network"
|
||||
onClicked: {
|
||||
Logic.conf['loadImages'] = checked
|
||||
}
|
||||
}
|
||||
IconTextSwitch {
|
||||
text: qsTr("Translate")
|
||||
description: qsTr("Use Transifex to help with app translation to your language")
|
||||
icon.source: "image://theme/icon-m-presence"
|
||||
onCheckedChanged: {
|
||||
busy = true;
|
||||
checked = false;
|
||||
Qt.openUrlExternally("https://www.transifex.com/dysko/tooter/");
|
||||
timer2.start()
|
||||
}
|
||||
Timer {
|
||||
id: timer2
|
||||
interval: 4700
|
||||
onTriggered: parent.busy = false
|
||||
}
|
||||
}
|
||||
// IconTextSwitch {
|
||||
// text: qsTr("Translate")
|
||||
// description: qsTr("Use Transifex to help with app translation to your language")
|
||||
// icon.source: "image://theme/icon-m-presence"
|
||||
// onCheckedChanged: {
|
||||
// busy = true;
|
||||
// checked = false;
|
||||
// Qt.openUrlExternally("https://www.transifex.com/dysko/tooter/");
|
||||
// timer2.start()
|
||||
// }
|
||||
// Timer {
|
||||
// id: timer2
|
||||
// interval: 4700
|
||||
// onTriggered: parent.busy = false
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
|
@ -113,6 +113,12 @@ Page {
|
|||
}
|
||||
Repeater {
|
||||
model: ListModel {
|
||||
ListElement {
|
||||
name: "molan"
|
||||
desc: qsTr("Maintainer of this release")
|
||||
mastodon: ""
|
||||
mail: "mol_an@sunrise.ch"
|
||||
}
|
||||
ListElement {
|
||||
name: "Duško Angirević"
|
||||
desc: qsTr("UI/UX design and development")
|
||||
|
@ -121,38 +127,31 @@ Page {
|
|||
}
|
||||
ListElement {
|
||||
name: "Miodrag Nikolić"
|
||||
desc: "visual identity"
|
||||
desc: qsTr("Visual identity")
|
||||
mastodon: ""
|
||||
mail: "micotakis@gmail.com"
|
||||
}
|
||||
ListElement {
|
||||
name: "Molan"
|
||||
desc: "Maintainer of this forked version"
|
||||
mastodon: ""
|
||||
mail: "mol_an@sunrise.ch"
|
||||
}
|
||||
ListElement {
|
||||
name: "Quentin PAGÈS / Quenti ♏"
|
||||
desc: "Occitan & French translation"
|
||||
desc: qsTr("Occitan & French translation")
|
||||
mastodon: "Quenti@framapiaf.org"
|
||||
mail: ""
|
||||
}
|
||||
ListElement {
|
||||
name: "André Koot"
|
||||
desc: "Dutch translation"
|
||||
desc: qsTr("Dutch translation")
|
||||
mastodon: "meneer@mastodon.social"
|
||||
mail: "https://twitter.com/meneer"
|
||||
}
|
||||
ListElement {
|
||||
name: "Carlos Gonzalez / Caballlero"
|
||||
desc: "Español translation"
|
||||
desc: qsTr("Spanish translation")
|
||||
mastodon: ""
|
||||
mail: "carlosgonz@protonmail.com"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Mohamed-Touhami MAHDI"
|
||||
desc: "Added README file"
|
||||
desc: qsTr("Added README file")
|
||||
mastodon: "dragnucs@touha.me"
|
||||
mail: "touhami@touha.me"
|
||||
}
|
||||
|
|
|
@ -21,11 +21,10 @@ SilicaGridView {
|
|||
unread: false
|
||||
}
|
||||
ListElement {
|
||||
icon: "image://theme/icon-m-website"
|
||||
slug: "federated"
|
||||
name: "Federated"
|
||||
icon: "image://theme/icon-m-alarm"
|
||||
slug: "notifications"
|
||||
name: "Notifications"
|
||||
active: false
|
||||
unread: false
|
||||
}
|
||||
ListElement {
|
||||
icon: "image://theme/icon-m-whereami"
|
||||
|
@ -35,10 +34,11 @@ SilicaGridView {
|
|||
unread: false
|
||||
}
|
||||
ListElement {
|
||||
icon: "image://theme/icon-m-alarm"
|
||||
slug: "notifications"
|
||||
name: "Notifications"
|
||||
icon: "image://theme/icon-m-website"
|
||||
slug: "federated"
|
||||
name: "Federated"
|
||||
active: false
|
||||
unread: false
|
||||
}
|
||||
ListElement {
|
||||
icon: "image://theme/icon-m-search"
|
||||
|
|
|
@ -4,7 +4,6 @@ import QtGraphicalEffects 1.0
|
|||
|
||||
BackgroundItem {
|
||||
signal send (string notice)
|
||||
|
||||
id: delegate
|
||||
//property string text: "0"
|
||||
width: parent.width
|
||||
|
@ -149,10 +148,9 @@ BackgroundItem {
|
|||
console.log(link)
|
||||
if (link[0] === "@") {
|
||||
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
|
||||
"display_name": account_display_name,
|
||||
"username": account_username,
|
||||
"user_id": model.account_id,
|
||||
"profileImage": account_avatar
|
||||
"name": "",
|
||||
"username": link.substring(1),
|
||||
"profileImage": ""
|
||||
})
|
||||
} else if (link[0] === "#") {
|
||||
|
||||
|
|
|
@ -134,12 +134,10 @@ BackgroundItem {
|
|||
}));
|
||||
send(link)
|
||||
} else if (test.length === 4 && test[3][0] === "@" ) {
|
||||
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
|
||||
"display_name": account_display_name,
|
||||
"username": account_username,
|
||||
"user_id": model.account_id,
|
||||
"profileImage": account_avatar
|
||||
})
|
||||
tlSearch.search = decodeURIComponent("@"+test[3].substring(1)+"@"+test[2])
|
||||
slideshow.positionViewAtIndex(4, ListView.SnapToItem)
|
||||
navigation.navigateTo('search')
|
||||
|
||||
} else {
|
||||
Qt.openUrlExternally(link);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue