mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Merge branch 'master' into master
This commit is contained in:
@@ -318,9 +318,10 @@ class SessionList: Reactor.Component {
|
||||
<li #tunnel>{translate('TCP Tunneling')}</li>
|
||||
{false && !handler.using_public_server() && <li #force-always-relay><span>{svg_checkmark}</span>{translate('Always connect via relay')}</li>}
|
||||
<li #rdp>RDP<EditRdpPort /></li>
|
||||
<li #wol>{translate('WOL')}</li>
|
||||
<div .separator />
|
||||
<li #rename>{translate('Rename')}</li>
|
||||
{this.type != "fav" && this.type != "lan" && <li #remove>{translate('Remove')}</li>}
|
||||
{this.type != "lan" && <li #rename>{translate('Rename')}</li>}
|
||||
{this.type != "fav" && <li #remove>{translate('Remove')}</li>}
|
||||
{is_win && <li #shortcut>{translate('Create Desktop Shortcut')}</li>}
|
||||
<li #forget-password>{translate('Unremember Password')}</li>
|
||||
{(!this.type || this.type == "fav") && <li #add-fav>{translate('Add to Favorites')}</li>}
|
||||
@@ -419,6 +420,8 @@ class SessionList: Reactor.Component {
|
||||
createNewConnect(id, "connect");
|
||||
} else if (action == "transfer") {
|
||||
createNewConnect(id, "file-transfer");
|
||||
} else if (action == "wol") {
|
||||
handler.send_wol(id);
|
||||
} else if (action == "remove") {
|
||||
if (this.type == "ab") {
|
||||
for (var i = 0; i < ab.peers.length; ++i) {
|
||||
@@ -429,6 +432,9 @@ class SessionList: Reactor.Component {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (this.type == "lan") {
|
||||
handler.remove_discovered(id);
|
||||
app.update();
|
||||
} else {
|
||||
handler.remove_peer(id);
|
||||
app.update();
|
||||
|
||||
@@ -258,10 +258,10 @@ pub fn check_main_window() {
|
||||
let app = format!("/Applications/{}.app", crate::get_app_name());
|
||||
let my_uid = sys
|
||||
.process((std::process::id() as i32).into())
|
||||
.map(|x| x.uid)
|
||||
.map(|x| x.user_id())
|
||||
.unwrap_or_default();
|
||||
for (_, p) in sys.processes().iter() {
|
||||
if p.cmd().len() == 1 && p.uid == my_uid && p.cmd()[0].contains(&app) {
|
||||
if p.cmd().len() == 1 && p.user_id() == my_uid && p.cmd()[0].contains(&app) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user