add file log page to cm

* Only send and receive logs are shown
* For older version, client send to server doesn't have size information, because server side doesn't know the total_size
* Not switch tabs automatically when new files are transferred
* If cm side page is open, not pop up automatically when new files are transferred
* Show unread message count
* The cm tab remains open when closed if a file transfer has previously occurred

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-09-06 16:56:39 +08:00
parent e88e17a4b0
commit 2afce3f1f4
14 changed files with 519 additions and 39 deletions

View File

@@ -483,9 +483,13 @@ impl<T: InvokeUiSession> Remote<T> {
// peer is not windows, need transform \ to /
fs::transform_windows_path(&mut files);
}
let total_size = job.total_size();
self.read_jobs.push(job);
self.timer = time::interval(MILLI1);
allow_err!(peer.send(&fs::new_receive(id, to, file_num, files)).await);
allow_err!(
peer.send(&fs::new_receive(id, to, file_num, files, total_size))
.await
);
}
}
}
@@ -568,7 +572,8 @@ impl<T: InvokeUiSession> Remote<T> {
id,
job.path.to_string_lossy().to_string(),
job.file_num,
job.files.clone()
job.files.clone(),
job.total_size(),
))
.await
);