// Copyright (C) 2026 Danilo M. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. import QtQuick import "../.." Column { id: page required property var mod signal go(string name) property string tab: "device" spacing: 14 Component.onCompleted: Sonix.hold() Component.onDestruction: Sonix.release() Text { visible: !Sonix.present text: "The player is not on the network." font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 } color: Theme.subtext } Row { visible: Sonix.present spacing: 6 Repeater { model: [["device", "Device"], ["playlists", "Playlists"], ["folders", "Folders"]] delegate: Button { required property var modelData text: modelData[1] border.color: page.tab === modelData[0] ? Theme.accent : Qt.alpha(Theme.text, 0.2) onClicked: page.tab = modelData[0] } } } Loader { width: page.width active: Sonix.present sourceComponent: page.tab === "device" ? deviceTab : page.tab === "playlists" ? playlistsTab : foldersTab } Component { id: deviceTab; SonixDevice { onGo: name => page.go(name) } } Component { id: playlistsTab; SonixPlaylists { mod: page.mod } } Component { id: foldersTab; SonixFolders { mod: page.mod } } }