mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-07 22:19:08 +02:00
[client] Fix file drop delivery and refine the files UI
Seed the delivery directory from the IPC caller when the active profile carries no username, so the default profile gets a destination instead of failing every incoming transfer. Deliver text-only offers without requiring a destination directory at all. In the UI, drop the status label from the send picker rows, keep the dot, and give the transfer list per-kind icons: a quote for text, a file with an up or down arrow for files.
This commit is contained in:
@@ -11,6 +11,19 @@ import (
|
||||
)
|
||||
|
||||
func deliver(spool *Spool, offer Offer, destDir string) ([]string, error) {
|
||||
files := false
|
||||
for _, f := range offer.Files {
|
||||
if f.Kind != KindText {
|
||||
files = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !files {
|
||||
spool.Remove(offer.ID)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if destDir == "" {
|
||||
return nil, fmt.Errorf("no destination directory configured")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user