UI improvements & fixes
This commit is contained in:
parent
bc8bcf39e5
commit
779f90865a
4 changed files with 57 additions and 32 deletions
|
@ -8,20 +8,32 @@ import "./components/"
|
|||
Page {
|
||||
id: conversationPage
|
||||
|
||||
property string type
|
||||
property string username: ""
|
||||
property string headerTitle: ""
|
||||
property string suggestedUser: ""
|
||||
property ListModel suggestedModel
|
||||
property string status_id: ""
|
||||
property string status_url: ""
|
||||
property string status_uri: ""
|
||||
property ListModel mdl
|
||||
property int tootMaxChar: 500
|
||||
property bool bot: false //otherwise ReferenceError ProfileHeader.qml
|
||||
property bool followed_by: false //otherwise ReferenceError ProfileHeader.qml
|
||||
property bool locked: false //otherwise ReferenceError ProfileHeader.qml
|
||||
property bool group: false //otherwise ReferenceError ProfileHeader.qml
|
||||
property ListModel mdl
|
||||
property string type
|
||||
property string username: ""
|
||||
property string headerTitle: ""
|
||||
property string suggestedUser: ""
|
||||
property string status_id: ""
|
||||
property string status_url: ""
|
||||
property string status_uri: ""
|
||||
property string status_link:
|
||||
if (status_url === "") {
|
||||
var test = status_uri.split("/")
|
||||
console.log(status_uri)
|
||||
console.log(JSON.stringify(test))
|
||||
console.log(JSON.stringify(test.length))
|
||||
if (test.length === 8 && (test[7] === "activity")) {
|
||||
var urialt = status_uri.replace("activity", "")
|
||||
status_link = urialt
|
||||
}
|
||||
else status_link = status_uri
|
||||
} else status_link = status_url
|
||||
|
||||
allowedOrientations: Orientation.All
|
||||
onSuggestedUserChanged: {
|
||||
|
@ -96,20 +108,17 @@ Page {
|
|||
id: pulleyConversation
|
||||
visible: type === "reply"
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("Open in Browser")
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(status_link)
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
//: Use the translation of "Copy Link" for a shorter PullDownMenu label
|
||||
text: qsTr("Copy Link to Clipboard")
|
||||
onClicked: if (status_url === "") {
|
||||
var test = status_uri.split("/")
|
||||
console.log(status_uri)
|
||||
console.log(JSON.stringify(test))
|
||||
console.log(JSON.stringify(test.length))
|
||||
if (test.length === 8 && (test[7] === "activity")) {
|
||||
var urialt = status_uri.replace("activity", "")
|
||||
Clipboard.text = urialt
|
||||
}
|
||||
else Clipboard.text = status_uri
|
||||
} else Clipboard.text = status_url
|
||||
onClicked: Clipboard.text = status_link
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
|
|
|
@ -85,7 +85,7 @@ Page {
|
|||
height: parent.itemHeight
|
||||
onSearchChanged: {
|
||||
console.log(search)
|
||||
//loader.sourceComponent = loading
|
||||
loader.sourceComponent = loading
|
||||
if (search.charAt(0) === "@") {
|
||||
loader.sourceComponent = userListComponent
|
||||
} else if (search.charAt(0) === "#") {
|
||||
|
@ -119,14 +119,14 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
// Component {
|
||||
// id: loading
|
||||
// BusyIndicator {
|
||||
// size: BusyIndicatorSize.Large
|
||||
// anchors.centerIn: parent
|
||||
// running: true
|
||||
// }
|
||||
// }
|
||||
Component {
|
||||
id: loading
|
||||
BusyIndicator {
|
||||
size: BusyIndicatorSize.Large
|
||||
anchors.centerIn: parent
|
||||
running: true
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: tagListComponent
|
||||
|
|
|
@ -20,8 +20,6 @@ Dialog {
|
|||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
VerticalScrollDecorator { flickable: gridView}
|
||||
|
||||
SilicaGridView {
|
||||
id: gridView
|
||||
header: PageHeader {
|
||||
|
@ -266,6 +264,7 @@ Dialog {
|
|||
emojiDialog.accept()
|
||||
}
|
||||
}
|
||||
VerticalScrollDecorator { flickable: gridView }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,15 +42,32 @@ SilicaListView {
|
|||
}
|
||||
|
||||
BusyLabel {
|
||||
id: loadStatusList
|
||||
id: myListBusyLabel
|
||||
running: model.count === 0
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 5000
|
||||
running: true
|
||||
onTriggered: {
|
||||
myListBusyLabel.visible = false
|
||||
loadStatusPlaceholder.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ViewPlaceholder {
|
||||
id: loadStatusPlaceholder
|
||||
visible: false
|
||||
enabled: model.count === 0
|
||||
text: qsTr("Nothing found")
|
||||
}
|
||||
|
||||
PullDownMenu {
|
||||
id: mainPulleyMenu
|
||||
MenuItem {
|
||||
text: qsTr("Settings")
|
||||
visible: !profilePage
|
||||
|
@ -119,7 +136,7 @@ SilicaListView {
|
|||
|
||||
BusyIndicator {
|
||||
running: loadStarted
|
||||
visible: loadStatusList.running ? false : true
|
||||
visible: myListBusyLabel.running ? false : true
|
||||
size: BusyIndicatorSize.Small
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
|
|
Loading…
Reference in a new issue