From c8c9d80abd2d138d06a204c9ffddd09f32b2e3f0 Mon Sep 17 00:00:00 2001 From: Lasan Mahaliyana Date: Sun, 15 Mar 2026 19:26:01 +0530 Subject: [PATCH] removed TransferCard --- .../qml_tray_app/components/TransferCard.qml | 132 ------------------ .../qml_tray_app/resources_file_share.qrc | 1 - 2 files changed, 133 deletions(-) delete mode 100644 sharing/linux/qml_tray_app/components/TransferCard.qml diff --git a/sharing/linux/qml_tray_app/components/TransferCard.qml b/sharing/linux/qml_tray_app/components/TransferCard.qml deleted file mode 100644 index 2acc2d5d..00000000 --- a/sharing/linux/qml_tray_app/components/TransferCard.qml +++ /dev/null @@ -1,132 +0,0 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts - -Rectangle { - required property var modelData - - Layout.fillWidth: true - implicitHeight: xferLayout.implicitHeight + 32 - radius: 24 - color: "#dcfce7" - border.color: "#bbf7d0" - - readonly property color surface: "#ffffff" - readonly property color textPrimary: "#111827" - readonly property color textMuted: "#6b7280" - - readonly property bool isActive: modelData.status === "InProgress" - || modelData.status === "Queued" - || modelData.status === "Connecting" - || modelData.status === "AwaitingLocalConfirmation" - || modelData.status === "AwaitingRemoteAcceptance" - readonly property bool isTerminal: !isActive - - function formatBytes(bytes) { - if (bytes === undefined || bytes === null) return "0 B" - var value = Number(bytes) - if (!isFinite(value) || value < 0) return "0 B" - var units = ["B", "KB", "MB", "GB", "TB"] - var unit = 0 - while (value >= 1024 && unit < units.length - 1) { value /= 1024; unit += 1 } - return (value >= 10 || unit === 0 ? value.toFixed(0) : value.toFixed(1)) + " " + units[unit] - } - - ColumnLayout { - id: xferLayout - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - anchors.margins: 16 - spacing: 8 - - RowLayout { - Layout.fillWidth: true - spacing: 12 - - Rectangle { - width: 48; height: 48; radius: 24 - color: surface - - Label { - anchors.centerIn: parent - text: modelData.targetName && modelData.targetName.length > 0 - ? modelData.targetName.charAt(0).toUpperCase() : "?" - font.pixelSize: 18 - font.weight: Font.Medium - color: textPrimary - } - } - - ColumnLayout { - Layout.fillWidth: true - spacing: 2 - - Label { - Layout.fillWidth: true - text: modelData.targetName - font.weight: Font.Medium - elide: Text.ElideRight - color: textPrimary - } - - Label { - font.pixelSize: 12 - color: textMuted - text: { - if (isActive) - return modelData.direction === "outgoing" ? "Sending..." : "Receiving..." - return modelData.status + (modelData.fileName && modelData.fileName.length > 0 - ? " • " + modelData.fileName : "") - } - } - } - } - - ProgressBar { - Layout.fillWidth: true - visible: isActive - from: 0; to: 1 - value: modelData.progress - } - - Label { - Layout.fillWidth: true - visible: isActive - horizontalAlignment: Text.AlignRight - text: Math.round((modelData.progress || 0) * 100) + "% • " + - formatBytes(modelData.transferredBytes) - font.pixelSize: 12 - color: textMuted - } - - RowLayout { - Layout.fillWidth: true - visible: isTerminal - - Item { Layout.fillWidth: true } - - Rectangle { - height: 36 - width: clearLbl.implicitWidth + 24 - radius: 10 - color: surface - border.color: "#d1d5db" - - Label { - id: clearLbl - anchors.centerIn: parent - text: "Clear" - font.weight: Font.Medium - color: textPrimary - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: fileShareController.clearTransfers() - } - } - } - } -} diff --git a/sharing/linux/qml_tray_app/resources_file_share.qrc b/sharing/linux/qml_tray_app/resources_file_share.qrc index b811c2a9..14d75129 100644 --- a/sharing/linux/qml_tray_app/resources_file_share.qrc +++ b/sharing/linux/qml_tray_app/resources_file_share.qrc @@ -6,7 +6,6 @@ components/AnimatedBlob.qml components/SendUrlPanel.qml components/DeviceCard.qml - components/TransferCard.qml components/SettingsPanel.qml