@@ -398,7 +375,7 @@ class InstallMe extends Element {
return (
{translate('install_tip')}
-
+
);
}
@@ -479,7 +456,6 @@ class UpdateMe extends Element {
["on click at #install-me"]() {
handler.xcall("open_url","https://rustdesk.com");
return;
- // TODO return?
if (!is_win) {
handler.xcall("open_url","https://rustdesk.com");
return;
@@ -572,10 +548,6 @@ class ModifyDefaultLogin extends Element {
}
["on click at #modify-default-login"]() {
- // TEST change tis old:
- // if (var r = handler.modify_default_login()) {
- // msgbox("custom-error", "Error", r);
- // }
let r = handler.xcall("modify_default_login");
if (r) {
msgbox("custom-error", "Error", r);
@@ -587,7 +559,7 @@ class ModifyDefaultLogin extends Element {
function watch_trust() {
// not use TrustMe::update, because it is buggy
let trusted = handler.xcall("is_process_trusted",false);
- let el = document.$("div.trust-me");
+ let el = $("div.trust-me");
if (el) {
el.style.setProperty("display", trusted ? "none" : "block");
}
@@ -628,10 +600,8 @@ class Password extends Element {
);
}
- // TODO expecting element to popup 这里组件无法触发
["on click at svg#edit"](_,me) {
- let menu = this.$("menu#edit-password-context");
- console.log("修改密码",me)
+ let menu = $("menu#edit-password-context");
me.popup(menu);
}
@@ -755,6 +725,6 @@ setInterval(() => {
}
if (handler.xcall("recent_sessions_updated")) {
console.log("recent sessions updated");
- app.recent_sessions.componentUpdate();
+ app.componentUpdate();
}
}, 1000);
diff --git a/src/ui/msgbox.js b/src/ui/msgbox.js
index ea8ccdbce..04f53254d 100644
--- a/src/ui/msgbox.js
+++ b/src/ui/msgbox.js
@@ -1,8 +1,8 @@
+import { PasswordComponent } from "./common";
import {$,$$} from "@sciter"; //TEST $$ import
const view = Window.this;
var type, title, text, getParams, remember, retry, callback, contentStyle;
var my_translate; // TEST
-
function updateParams(params) {
type = params.type;
title = params.title;
@@ -59,7 +59,6 @@ class Body extends Element {
getInputPasswordContent() {
var ts = remember ? { checked: true } : {};
- // TODO
return
{my_translate('Please enter your password')}
@@ -100,8 +99,7 @@ class Body extends Element {
let hasOk = type != "connecting" && type.indexOf("nook") < 0;
let hasClose = type.indexOf("hasclose") >= 0;
let show_progress = type == "connecting";
- this.style.setProperty("border",(color + " solid 1px"));
- console.log(content)
+ document.body.style.setProperty("border",(color + " solid 1px"));
setTimeout(()=>this.$("#content").content(my_translate(content)),1);
return (
diff --git a/src/ui/port_forward.js b/src/ui/port_forward.js
index c9d1914a8..c1ab807a2 100644
--- a/src/ui/port_forward.js
+++ b/src/ui/port_forward.js
@@ -1,4 +1,5 @@
-import { translate } from "./common.js";
+import { translate, handler } from "./common.js";
+import { svg_arrow, svg_cancel } from "./file_transfer.js";
class PortForward extends Element {
render() {
@@ -73,8 +74,8 @@ class PortForward extends Element {
export function initializePortForward()
{
- $("#file-transfer-wrapper").content();
- $("#video-wrapper").style.setProperty("visibility","hidden");
- $("#video-wrapper").style.setProperty("position","absolute")
- $("#file-transfer-wrapper").style.setProperty("display","block");
+ document.$("#file-transfer-wrapper").content();
+ document.$("#video-wrapper").style.setProperty("visibility","hidden");
+ document.$("#video-wrapper").style.setProperty("position","absolute")
+ document.$("#file-transfer-wrapper").style.setProperty("display","block");
}