2017-06-13 17:45:52 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Sailfish.Silica 1.0
|
|
|
|
|
2020-05-29 21:05:05 +03:00
|
|
|
|
2017-06-13 17:45:52 +03:00
|
|
|
Item {
|
2020-05-29 21:05:05 +03:00
|
|
|
id: miniStatus
|
2017-06-13 17:45:52 +03:00
|
|
|
visible: true
|
|
|
|
height: icon.height+Theme.paddingMedium
|
|
|
|
width: parent.width
|
2020-06-05 19:38:15 +03:00
|
|
|
Icon {
|
2017-06-13 17:45:52 +03:00
|
|
|
id: icon
|
2020-06-03 08:34:33 +03:00
|
|
|
visible: type.length
|
2020-06-05 19:38:15 +03:00
|
|
|
color: Theme.highlightColor
|
2020-06-03 08:34:33 +03:00
|
|
|
width: Theme.iconSizeExtraSmall
|
|
|
|
height: width
|
|
|
|
source: typeof typeIcon !== "undefined" ? typeIcon : ""
|
2017-06-13 17:45:52 +03:00
|
|
|
anchors {
|
|
|
|
top: parent.top
|
|
|
|
topMargin: Theme.paddingMedium
|
|
|
|
bottomMargin: Theme.paddingMedium
|
|
|
|
left: parent.left
|
|
|
|
leftMargin: Theme.horizontalPageMargin + Theme.iconSizeMedium - width
|
|
|
|
}
|
|
|
|
}
|
2020-06-03 08:34:33 +03:00
|
|
|
|
2017-06-13 17:45:52 +03:00
|
|
|
Label {
|
|
|
|
id: lblRtByName
|
|
|
|
visible: type.length
|
|
|
|
text: {
|
2020-06-16 17:09:28 +03:00
|
|
|
var action = ""
|
2017-06-13 17:45:52 +03:00
|
|
|
switch(type){
|
|
|
|
case "reblog":
|
|
|
|
action = qsTr('boosted');
|
|
|
|
break;
|
|
|
|
case "favourite":
|
|
|
|
action = qsTr('favourited');
|
|
|
|
break;
|
|
|
|
case "follow":
|
|
|
|
action = qsTr('followed you');
|
|
|
|
break;
|
|
|
|
default:
|
2020-05-29 21:05:05 +03:00
|
|
|
miniStatus.visible = false
|
2017-06-13 17:45:52 +03:00
|
|
|
action = type;
|
|
|
|
}
|
2020-06-16 17:09:28 +03:00
|
|
|
return typeof reblog_account_username !== "undefined" ? "@" + reblog_account_username + " " + action : " "
|
2017-06-13 17:45:52 +03:00
|
|
|
}
|
|
|
|
font.pixelSize: Theme.fontSizeExtraSmall
|
|
|
|
color: Theme.highlightColor
|
2020-06-16 17:09:28 +03:00
|
|
|
anchors {
|
|
|
|
left: icon.right
|
|
|
|
leftMargin: Theme.paddingMedium
|
|
|
|
verticalCenter: icon.verticalCenter
|
|
|
|
}
|
2017-06-13 17:45:52 +03:00
|
|
|
}
|
|
|
|
}
|