mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 15:16:12 -04:00
Fixed some UI bugs
This commit is contained in:
@@ -54,7 +54,7 @@ ApplicationWindow {
|
||||
&& fileShareController.transfers.length === 0
|
||||
|
||||
// ── Idle: animated blob ───────────────────────────────────
|
||||
AnimatedBlob {}
|
||||
AnimatedBlob { visible: mainContent.isIdle }
|
||||
|
||||
// ── Non-idle: scrollable device + transfer cards ──────────
|
||||
Flickable {
|
||||
|
||||
@@ -9,6 +9,7 @@ Item {
|
||||
|
||||
Label {
|
||||
x: 48; y: 48
|
||||
visible: fileShareController.running
|
||||
text: "Ready to receive" + (fileShareController.pendingSendFilePath.length > 0 ? " / send" : "")
|
||||
font.pixelSize: 20
|
||||
font.weight: Font.Medium
|
||||
|
||||
@@ -45,7 +45,9 @@ Item {
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: fileShareController.mode === "Send" ? "Discovering" : "Always visible"
|
||||
text: !fileShareController.running
|
||||
? "Inactive"
|
||||
: fileShareController.mode === "Send" ? "Discovering" : "Always visible"
|
||||
font.weight: Font.Medium
|
||||
color: textPrimary
|
||||
}
|
||||
@@ -63,7 +65,9 @@ Item {
|
||||
Layout.leftMargin: 12
|
||||
Layout.topMargin: 8
|
||||
Layout.rightMargin: 12
|
||||
text: fileShareController.mode === "Send"
|
||||
text: !fileShareController.running
|
||||
? "The service is not running. Start it to discover or receive files."
|
||||
: fileShareController.mode === "Send"
|
||||
? "Discovering nearby devices. Select a device below to send your file."
|
||||
: "Nearby devices can share files with you. You'll be notified and must approve each transfer."
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
@@ -929,6 +929,10 @@ void FileShareTrayController::AddDiscoveredDevice(const QString& endpoint_id) {
|
||||
if (discovered_devices_.contains(endpoint_id)) {
|
||||
return;
|
||||
}
|
||||
// Skip ourselves – the peer name is set before this is called.
|
||||
if (PeerLabelForEndpoint(endpoint_id).trimmed() == device_name_.trimmed()) {
|
||||
return;
|
||||
}
|
||||
discovered_devices_.append(endpoint_id);
|
||||
emit discoveredDevicesChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user