blob: 5146bf883b13da3ebf14a3d22516e07714ba473e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
//
// 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 "../.."
// The Sonix player in the drawer: a tile while it is on the network, and a
// page with its device state, playlists and folders. See README.md.
Module {
id: sonixMod
name: "sonix"
label: Sonix.name || "Sonix"
icon: String.fromCodePoint(0xF075A) // md-music
tiled: Sonix.present
active: Sonix.present && Sonix.player.state === 1
// Names typed under Playlists > New: SonixLink makes a playlist only by
// adding a track to it, so a new one lives here until its first track.
property var draftPlaylists: []
tileContent: Component { SonixTile {} }
page: Component {
Page {
id: pg
title: Sonix.name || "Sonix"
// Not `mod: mod`: inside SonixPage that names its own property.
SonixPage { width: parent.width; mod: sonixMod; onGo: name => pg.go(name) }
}
}
}
|