up su Gitea

This commit is contained in:
2026-04-19 17:07:18 +02:00
parent e78ce720bb
commit fe54b28378
298 changed files with 23460 additions and 0 deletions
@@ -0,0 +1,40 @@
pragma Singleton
import QtQuick
QtObject {
function getConnectionStateIcon(device, daemonAvailable) {
if (!daemonAvailable)
return "exclamation-circle";
if (device === null || !device.reachable)
return "device-mobile-off";
if (device.battery >= 0 && device.battery < 10)
return "device-mobile-exclamation"
if (device.notificationIds.length > 0)
return "device-mobile-message";
else if (device.charging)
return "device-mobile-bolt";
else
return "device-mobile";
}
// Returns raw state keys for translation
function getConnectionStateKey(device, daemonAvailable) {
if (!daemonAvailable)
return "control_center.state.unavailable";
if (device === null)
return "control_center.state.no-device";
if (!device.reachable)
return "control_center.state.disconnected";
if (!device.paired)
return "control_center.state.not-paired";
return "control_center.state.connected";
}
}