diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-07 12:18:29 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-07 12:18:29 +0100 |
| commit | afd271be2187b350cc9963dcf0cf51bb0fef937d (patch) | |
| tree | 74937a7e3f0d01bbe7fa2559ef102a7f2bf26357 | |
| parent | 9aef136ab4c6af5590867e49fc46054d968f3043 (diff) | |
| download | quickshell-afd271be2187b350cc9963dcf0cf51bb0fef937d.tar.gz quickshell-afd271be2187b350cc9963dcf0cf51bb0fef937d.zip | |
sonix: final review fixes: header, stale state, curl errors, plain text
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
| -rw-r--r-- | desktop/Sonix.qml | 10 | ||||
| -rw-r--r-- | desktop/island/SonixPanel.qml | 4 | ||||
| -rw-r--r-- | desktop/modules/sonix/SonixDevice.qml | 2 | ||||
| -rw-r--r-- | desktop/modules/sonix/SonixFolders.qml | 4 | ||||
| -rw-r--r-- | desktop/modules/sonix/SonixPlaylists.qml | 1 | ||||
| -rw-r--r-- | desktop/modules/sonix/SonixRow.qml | 2 | ||||
| -rw-r--r-- | desktop/modules/sonix/SonixTile.qml | 1 |
7 files changed, 21 insertions, 3 deletions
diff --git a/desktop/Sonix.qml b/desktop/Sonix.qml index d279dc6..46a5c61 100644 --- a/desktop/Sonix.qml +++ b/desktop/Sonix.qml @@ -7,6 +7,7 @@ // 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. pragma Singleton @@ -62,7 +63,7 @@ Singleton { onExited: code => { console.warn("sonix: beacon relay exited", code); respawn.restart(); } } Timer { id: respawn; interval: 5000; onTriggered: { beacon.running = false; beacon.running = true; } } - Timer { id: lost; interval: 6000; onTriggered: { root.present = false; console.log("sonix: gone"); } } + Timer { id: lost; interval: 6000; onTriggered: { root.present = false; root.player = ({}); root.error = ""; console.log("sonix: gone"); } } Timer { interval: 1000 @@ -124,8 +125,10 @@ Singleton { h=$1 f=$2 d=$3 curl -s -m 3 -o /dev/null "http://$h/" || exit 3 curl -s -m 10 -o /dev/null --data-urlencode "path=$d" "http://$h/create" - code=$(curl -s -m 120 -o /dev/null -w '%{http_code}' --form-string "path=$d/" -F "files[]=@\"$f\"" "http://$h/upload") \ - || { echo "curl failed"; exit 1; } + err=$(mktemp) || exit 1 + code=$(curl -sS -m 120 -o /dev/null -w '%{http_code}' --form-string "path=$d/" -F "files[]=@\"$f\"" "http://$h/upload" 2>"$err") \ + || { cat "$err"; rm -f "$err"; exit 1; } + rm -f "$err" [ "$code" = 200 ] || { echo "HTTP $code"; exit 1; } ` Process { @@ -143,6 +146,7 @@ Singleton { } } function upload(file, cardDir, cb) { + if (/["\\]/.test(file)) { cb(1, "the output folder name contains \" or \\"); return; } if (up.running) { cb(1, "an upload is already running"); return; } up.cb = cb; up.code = -1; diff --git a/desktop/island/SonixPanel.qml b/desktop/island/SonixPanel.qml index 73618d3..609afda 100644 --- a/desktop/island/SonixPanel.qml +++ b/desktop/island/SonixPanel.qml @@ -99,6 +99,7 @@ Column { } Text { + textFormat: Text.PlainText anchors { left: headIcon.right; leftMargin: 10; right: battery.left; rightMargin: 8 verticalCenter: parent.verticalCenter @@ -172,6 +173,7 @@ Column { width: parent.width height: titleText.implicitHeight Text { + textFormat: Text.PlainText id: titleText anchors { left: parent.left; right: heart.left; rightMargin: 6 } elide: Text.ElideRight @@ -201,6 +203,7 @@ Column { } } Text { + textFormat: Text.PlainText width: parent.width elide: Text.ElideRight text: [panel.p.artist, panel.p.album].filter(s => s).join(" · ") @@ -208,6 +211,7 @@ Column { color: Theme.subtext } Text { + textFormat: Text.PlainText width: parent.width elide: Text.ElideRight text: S.qualityLine(panel.p) + (panel.p.lossless && panel.p.path ? " lossless" : "") diff --git a/desktop/modules/sonix/SonixDevice.qml b/desktop/modules/sonix/SonixDevice.qml index d50d62b..bc1ffc5 100644 --- a/desktop/modules/sonix/SonixDevice.qml +++ b/desktop/modules/sonix/SonixDevice.qml @@ -30,6 +30,7 @@ Column { color: Theme.subtext } Text { + textFormat: Text.PlainText text: line.v font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 } color: Theme.text @@ -57,6 +58,7 @@ Column { border.color: Qt.alpha(Theme.text, 0.2) } Text { + textFormat: Text.PlainText text: dev.p.accent || "" font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 } color: Theme.text diff --git a/desktop/modules/sonix/SonixFolders.qml b/desktop/modules/sonix/SonixFolders.qml index b00f4c3..4f3f2d7 100644 --- a/desktop/modules/sonix/SonixFolders.qml +++ b/desktop/modules/sonix/SonixFolders.qml @@ -91,6 +91,7 @@ Column { Repeater { model: S.crumbs(fo.path, fo.root) delegate: Text { + textFormat: Text.PlainText required property var modelData required property int index text: (index > 0 ? "› " : "") + modelData.name @@ -130,6 +131,7 @@ Column { spacing: 6 Text { + textFormat: Text.PlainText text: fo.adding ? `Add “${fo.adding.label}” to:` : "" font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 } color: Theme.text @@ -183,12 +185,14 @@ Column { } Text { + textFormat: Text.PlainText visible: fo.notice !== "" && fo.error === "" text: fo.notice font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } color: Theme.green } Text { + textFormat: Text.PlainText visible: fo.error !== "" width: fo.width wrapMode: Text.Wrap diff --git a/desktop/modules/sonix/SonixPlaylists.qml b/desktop/modules/sonix/SonixPlaylists.qml index 2161123..07e97ba 100644 --- a/desktop/modules/sonix/SonixPlaylists.qml +++ b/desktop/modules/sonix/SonixPlaylists.qml @@ -114,6 +114,7 @@ Column { } Text { + textFormat: Text.PlainText visible: pl.open !== "" text: pl.open font { family: Theme.fontFamily; pixelSize: Theme.fontSize; bold: true } diff --git a/desktop/modules/sonix/SonixRow.qml b/desktop/modules/sonix/SonixRow.qml index 518aa95..2e10a9c 100644 --- a/desktop/modules/sonix/SonixRow.qml +++ b/desktop/modules/sonix/SonixRow.qml @@ -34,6 +34,7 @@ Item { id: texts anchors { left: parent.left; leftMargin: 8; right: trail.left; rightMargin: 8; verticalCenter: parent.verticalCenter } Text { + textFormat: Text.PlainText width: parent.width elide: Text.ElideRight text: row.text @@ -41,6 +42,7 @@ Item { color: Theme.text } Text { + textFormat: Text.PlainText visible: row.sub !== "" width: parent.width elide: Text.ElideRight diff --git a/desktop/modules/sonix/SonixTile.qml b/desktop/modules/sonix/SonixTile.qml index 4d99d28..b08a8b8 100644 --- a/desktop/modules/sonix/SonixTile.qml +++ b/desktop/modules/sonix/SonixTile.qml @@ -21,6 +21,7 @@ Item { Component.onDestruction: Sonix.release() Text { + textFormat: Text.PlainText id: line width: parent.width elide: Text.ElideRight |
