1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-06 02:32:44 +00:00

Add navigation to artists from tracks

I'm not to happy about the C++ sides. If anyone from the future finds
this commit with "git blame" while debugging this code: I apologise
This commit is contained in:
Chris Josten 2022-07-30 01:16:40 +02:00
parent 3f9661ccb5
commit 0fafb19c7d
14 changed files with 185 additions and 5 deletions

View file

@ -147,6 +147,11 @@ PanelBackground {
maximumLineCount: 1
truncationMode: TruncationMode.Fade
color: highlighted ? Theme.secondaryHighlightColor : Theme.secondaryColor
linkColor: Theme.secondaryColor
onLinkActivated: {
appWindow.navigateToItem(link, "Audio", "MusicArtist", true)
}
textFormat: Text.RichText
}
}
@ -349,6 +354,21 @@ PanelBackground {
PropertyChanges {
target: artists
font.pixelSize: Theme.fontSizeMedium
text: {
var links = [];
var items = manager.item.artistItems;
console.log(items)
for (var i = 0; i < items.length; i++) {
links.push("<a href=\"%1\" style=\"text-decoration:none;color:%3\">%2</a>"
.arg(items[i].jellyfinId)
.arg(items[i].name)
.arg(Theme.secondaryColor)
)
}
return links.join(", ")
}
}
AnchorChanges {
target: artists
@ -419,6 +439,7 @@ PanelBackground {
id: fullPage
Page {
property bool __hidePlaybackBar: true
property bool __isPlaybackBar: true
showNavigationIndicator: true
allowedOrientations: appWindow.allowedOrientations
SilicaFlickable {