mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-05-01 12:16:27 +00:00
WIP: add a music mode
Settings toggle makes the app show music only.
This commit is contained in:
parent
f91e9f88e7
commit
4ed34111c7
|
@ -148,6 +148,7 @@ ApplicationWindow {
|
|||
id: config
|
||||
path: "/nl/netsoj/chris/Sailfin"
|
||||
property bool showDebugInfo: false
|
||||
property bool musicMode: false
|
||||
}
|
||||
|
||||
function navigateToItem(jellyfinId, mediaType, type, isFolder) {
|
||||
|
@ -196,7 +197,13 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
ScriptAction {
|
||||
script: pageStack.replace(Qt.resolvedUrl("pages/MainPage.qml"), {}, PageStackAction.Immediate)
|
||||
script: {
|
||||
if (config.musicMode) {
|
||||
pageStack.replace(Qt.resolvedUrl("pages/itemdetails/MusicLibraryPage.qml"), {}, PageStackAction.Immediate)
|
||||
} else {
|
||||
pageStack.replace(Qt.resolvedUrl("pages/MainPage.qml"), {}, PageStackAction.Immediate)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
*/
|
||||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
import Nemo.Configuration 1.0
|
||||
|
||||
import nl.netsoj.chris.Jellyfin 1.0 as J
|
||||
|
||||
|
@ -30,6 +31,17 @@ Page {
|
|||
|
||||
property alias loggedInUser: userLoader.data
|
||||
|
||||
ConfigurationGroup {
|
||||
id: config
|
||||
path: "/nl/netsoj/chris/Sailfin"
|
||||
property bool showDebugInfo: false
|
||||
property bool musicMode: false
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
btnMusicMode.checked = config.musicMode;
|
||||
}
|
||||
|
||||
SilicaFlickable {
|
||||
anchors.fill: parent
|
||||
contentHeight: content.height
|
||||
|
@ -117,6 +129,14 @@ Page {
|
|||
text: qsTr("Other")
|
||||
}
|
||||
|
||||
IconTextSwitch {
|
||||
id: btnMusicMode
|
||||
text: qsTr("Music Mode")
|
||||
icon.source: "image://theme/icon-m-music"
|
||||
description: "Toggle UI into music only mode"
|
||||
onCheckedChanged: config.musicMode = checked
|
||||
}
|
||||
|
||||
IconListItem {
|
||||
//: Settings list item for settings related to streaming
|
||||
text: qsTr("Streaming settings")
|
||||
|
|
Loading…
Reference in a new issue