refactor windows specific session, file transfer and waiting for image (#7184)

* refactor windows specific session, file transfer and waiting for image

1. File transfer doesn't show directory until correct session id is ensured
2. Fix file transfer, caused by `pi.username = self.lc.read().unwrap().get_username(&pi);` in `handle_peer_info` override empty username and `get_active_username` doesn't return currect session username
* Fix home directory not change when session changed, or wrong home directory
* Fix show empty remote directory rather than error messagbox when current session is in login screen
3. Show `Connected, waiting for image` after user choose the same
   session id

Signed-off-by: 21pages <pages21@163.com>

* update translations

Signed-off-by: 21pages <pages21@163.com>

* Update connection.rs

---------

Signed-off-by: 21pages <pages21@163.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
21pages
2024-02-19 10:32:13 +08:00
committed by GitHub
parent 0f44de7dc3
commit bf5abdb520
47 changed files with 553 additions and 121 deletions

View File

@@ -460,7 +460,7 @@ function awake() {
class MultipleSessionComponent extends Reactor.Component {
this var sessions = [];
this var messageText = translate("Please select the user you want to connect to");
this var messageText = translate("Please select the session you want to connect to");
function this(params) {
if (params && params.sessions) {

View File

@@ -530,7 +530,7 @@ handler.updateDisplays = function(v) {
handler.setMultipleWindowsSession = function(sessions) {
// It will be covered by other message box if the timer is not used,
self.timer(1000ms, function() {
msgbox("multiple-sessions-nocancel", translate("Multiple active user sessions found"), <MultipleSessionComponent sessions={sessions} />, "", function(res) {
msgbox("multiple-sessions-nocancel", translate("Multiple Windows sessions found"), <MultipleSessionComponent sessions={sessions} />, "", function(res) {
if (res && res.sid) {
handler.set_selected_windows_session_id("" + res.sid);
}