mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-01 00:42:45 +00:00
WIP: add a music mode
Settings toggle makes the app show music only.
This commit is contained in:
parent
f91e9f88e7
commit
4ed34111c7
2 changed files with 28 additions and 1 deletions
|
@ -148,6 +148,7 @@ ApplicationWindow {
|
||||||
id: config
|
id: config
|
||||||
path: "/nl/netsoj/chris/Sailfin"
|
path: "/nl/netsoj/chris/Sailfin"
|
||||||
property bool showDebugInfo: false
|
property bool showDebugInfo: false
|
||||||
|
property bool musicMode: false
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigateToItem(jellyfinId, mediaType, type, isFolder) {
|
function navigateToItem(jellyfinId, mediaType, type, isFolder) {
|
||||||
|
@ -196,7 +197,13 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptAction {
|
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 QtQuick 2.6
|
||||||
import Sailfish.Silica 1.0
|
import Sailfish.Silica 1.0
|
||||||
|
import Nemo.Configuration 1.0
|
||||||
|
|
||||||
import nl.netsoj.chris.Jellyfin 1.0 as J
|
import nl.netsoj.chris.Jellyfin 1.0 as J
|
||||||
|
|
||||||
|
@ -30,6 +31,17 @@ Page {
|
||||||
|
|
||||||
property alias loggedInUser: userLoader.data
|
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 {
|
SilicaFlickable {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
|
@ -117,6 +129,14 @@ Page {
|
||||||
text: qsTr("Other")
|
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 {
|
IconListItem {
|
||||||
//: Settings list item for settings related to streaming
|
//: Settings list item for settings related to streaming
|
||||||
text: qsTr("Streaming settings")
|
text: qsTr("Streaming settings")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue