small ui-adjustments
This commit is contained in:
parent
75e4a71955
commit
99b070124b
8 changed files with 58 additions and 20 deletions
|
@ -88,7 +88,6 @@ var tootParser = function(data){
|
|||
ret.display_name = data.account.display_name
|
||||
ret.avatar_static = data.account.avatar_static
|
||||
|
||||
|
||||
ret.favourited = data.favourited ? true : false
|
||||
ret.favourites_count = data.favourites_count ? data.favourites_count : 0
|
||||
|
||||
|
@ -100,7 +99,6 @@ var tootParser = function(data){
|
|||
ret.sensitive = data.sensitive ? true : false
|
||||
ret.visibility = data.visibility ? data.visibility : false
|
||||
|
||||
|
||||
console.log(ret)
|
||||
}
|
||||
var test = 1;
|
||||
|
|
|
@ -259,7 +259,7 @@ Page {
|
|||
property string selection
|
||||
opacity: 0.7
|
||||
icon {
|
||||
color: Theme.highlightColor
|
||||
color: Theme.secondaryColor
|
||||
width: Theme.iconSizeSmallPlus
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "../../qml/images/emojiselect.svg"
|
||||
|
|
|
@ -31,14 +31,13 @@ Page {
|
|||
focus: true
|
||||
label: qsTr("Enter a valid Mastodon instance URL")
|
||||
text: "https://"
|
||||
placeholderText: "https://mastodon.social"
|
||||
width: parent.width
|
||||
validator: RegExpValidator { regExp: /^(ftp|http|https):\/\/[^ "]+$/ }
|
||||
EnterKey.enabled: instance.acceptableInput;
|
||||
EnterKey.highlighted: instance.acceptableInput;
|
||||
EnterKey.iconSource: "image://theme/icon-m-accept"
|
||||
EnterKey.onClicked: {
|
||||
Logic.api = new Logic.MastodonAPI({ instance: instance.text, api_user_token: "" });
|
||||
Logic.api = Logic.mastodonAPI({ instance: instance.text, api_user_token: "" });
|
||||
Logic.api.registerApplication("Tooter",
|
||||
'http://localhost/harbour-tooter', // redirect uri, we will need this later on
|
||||
["read", "write", "follow"], //scopes
|
||||
|
|
|
@ -32,7 +32,7 @@ Page {
|
|||
VisualItemModel {
|
||||
id: visualModel
|
||||
MyList{
|
||||
id: tlHome;
|
||||
id: tlHome
|
||||
title: qsTr("Home")
|
||||
type: "timelines/home"
|
||||
mdl: Logic.modelTLhome
|
||||
|
@ -42,35 +42,35 @@ Page {
|
|||
}
|
||||
|
||||
MyList{
|
||||
id: tlNotifications;
|
||||
id: tlNotifications
|
||||
title: qsTr("Notifications")
|
||||
type: "notifications"
|
||||
notifier: true
|
||||
mdl: Logic.modelTLnotifications
|
||||
width: parent.itemWidth
|
||||
height: parent.itemHeight
|
||||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
}
|
||||
|
||||
MyList{
|
||||
id: tlLocal;
|
||||
id: tlLocal
|
||||
title: qsTr("Local")
|
||||
type: "timelines/public?local=true"
|
||||
//params: ["local", true]
|
||||
mdl: Logic.modelTLlocal
|
||||
width: parent.itemWidth
|
||||
height: parent.itemHeight
|
||||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
}
|
||||
|
||||
MyList{
|
||||
id: tlPublic;
|
||||
id: tlPublic
|
||||
title: qsTr("Federated")
|
||||
type: "timelines/public"
|
||||
mdl: Logic.modelTLpublic
|
||||
width: parent.itemWidth
|
||||
height: parent.itemHeight
|
||||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
onOpenDrawer: infoPanel.open = setDrawer
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
|
@ -15,7 +15,7 @@ Page {
|
|||
property string profileBackground: ""
|
||||
property string note: ""
|
||||
property string url: ""
|
||||
property int user_id
|
||||
property string user_id: ""
|
||||
property int statuses_count
|
||||
property int following_count
|
||||
property int followers_count
|
||||
|
@ -175,7 +175,6 @@ Page {
|
|||
id: txtContainer
|
||||
width: parent.width
|
||||
height: Math.min( txtNote.height, parent.height * 0.55 )
|
||||
//color: "transparent"
|
||||
visible: {
|
||||
if ((note.text === "") || ( note.text === "<p></p>" )) {
|
||||
false
|
||||
|
|
|
@ -46,7 +46,7 @@ Page {
|
|||
height: txtRemoveAccount.height + btnRemoveAccount.height + Theme.paddingLarge
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: Theme.paddingLarge
|
||||
leftMargin: Theme.horizontalPageMargin
|
||||
right: parent.right
|
||||
rightMargin: Theme.paddingLarge
|
||||
}
|
||||
|
@ -99,9 +99,8 @@ Page {
|
|||
color: Theme.highlightColor
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: Theme.paddingLarge * 1.9
|
||||
right: parent.right
|
||||
rightMargin: Theme.paddingLarge * 1.2
|
||||
rightMargin: Theme.paddingLarge + icnRemoveAccount
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ SilicaListView {
|
|||
property variant vars
|
||||
property variant conf
|
||||
property bool notifier: false
|
||||
|
||||
model: mdl
|
||||
|
||||
signal notify (string what, int num)
|
||||
|
|
|
@ -13,6 +13,7 @@ BackgroundItem {
|
|||
height: mnu.height + miniHeader.height + (typeof attachments !== "undefined" && attachments.count ? media.height + Theme.paddingLarge + Theme.paddingMedium: Theme.paddingLarge) + lblContent.height + Theme.paddingLarge + (miniStatus.visible ? miniStatus.height : 0)
|
||||
|
||||
Rectangle {
|
||||
id: bgDirect
|
||||
x: 0
|
||||
y: 0
|
||||
visible: status_visibility == 'direct'
|
||||
|
@ -22,6 +23,20 @@ BackgroundItem {
|
|||
color: Theme.highlightBackgroundColor
|
||||
}
|
||||
|
||||
/* Rectangle {
|
||||
id: bgDelegate
|
||||
x: 0
|
||||
y: 0
|
||||
visible: status_visibility !== 'direct'
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
opacity: 0.15
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.7; color: "transparent" }
|
||||
GradientStop { position: 1.0; color: Theme.highlightDimmerColor }
|
||||
}
|
||||
} */
|
||||
|
||||
MiniStatus {
|
||||
id: miniStatus
|
||||
anchors {
|
||||
|
@ -117,13 +132,16 @@ BackgroundItem {
|
|||
|
||||
Text {
|
||||
id: lblContent
|
||||
visible: model.type !== "follow"
|
||||
text: content.replace(new RegExp("<a ", 'g'), '<a style="text-decoration: none; color:'+(pressed ? Theme.secondaryColor : Theme.highlightColor)+'" ')
|
||||
textFormat: Text.RichText
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
linkColor: Theme.highlightColor
|
||||
wrapMode: Text.Wrap
|
||||
color: (pressed ? Theme.highlightColor : (!highlight ? Theme.primaryColor : Theme.secondaryColor))
|
||||
height: content.length ? (contentWarningLabel.paintedHeight > paintedHeight ? contentWarningLabel.paintedHeight : paintedHeight) : 0
|
||||
height: if (model.type === "follow") {
|
||||
Theme.paddingLarge
|
||||
} else content.length ? (contentWarningLabel.paintedHeight > paintedHeight ? contentWarningLabel.paintedHeight : paintedHeight) : 0
|
||||
anchors {
|
||||
left: miniHeader.left
|
||||
leftMargin: Theme.paddingMedium
|
||||
|
@ -210,7 +228,7 @@ BackgroundItem {
|
|||
id: mnu
|
||||
|
||||
MenuItem {
|
||||
enabled: model.type !== "follow"
|
||||
visible: model.type !== "follow"
|
||||
text: typeof model.reblogged !== "undefined" && model.reblogged ? qsTr("Unboost") : qsTr("Boost")
|
||||
onClicked: {
|
||||
var status = typeof model.reblogged !== "undefined" && model.reblogged
|
||||
|
@ -250,7 +268,7 @@ BackgroundItem {
|
|||
}
|
||||
|
||||
MenuItem {
|
||||
enabled: model.type !== "follow"
|
||||
visible: model.type !== "follow"
|
||||
text: typeof model.favourited !== "undefined" && model.favourited ? qsTr("Unfavorite") : qsTr("Favorite")
|
||||
onClicked: {
|
||||
var status = typeof model.favourited !== "undefined" && model.favourited
|
||||
|
@ -288,6 +306,30 @@ BackgroundItem {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
visible: model.type === "follow"
|
||||
text: qsTr("Mention")
|
||||
onClicked: {
|
||||
pageStack.push(Qt.resolvedUrl("../ConversationPage.qml"), {
|
||||
headerTitle: "Mention",
|
||||
description: "@"+reblog_account_acct,
|
||||
type: "new"
|
||||
})
|
||||
}
|
||||
|
||||
Image {
|
||||
id: icMT
|
||||
anchors {
|
||||
leftMargin: Theme.horizontalPageMargin
|
||||
left: parent.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
width: Theme.iconSizeExtraSmall
|
||||
height: width
|
||||
source: "image://theme/icon-s-chat?" + (!model.favourited ? Theme.highlightColor : Theme.primaryColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
|
|
Loading…
Reference in a new issue