mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-04 20:41:27 +03:00
change ab.js
This commit is contained in:
@@ -4,7 +4,7 @@ stdout.println("current platform:", OS);
|
||||
// html min-width, min-height not working on mac, below works for all
|
||||
view.windowMinSize = (500, 300);
|
||||
|
||||
var app;
|
||||
export var app;
|
||||
var tmp = handler.get_connect_status();
|
||||
var connect_status = tmp[0];
|
||||
var service_stopped = false;
|
||||
@@ -50,7 +50,28 @@ class ConnectStatus: Reactor.Component {
|
||||
}
|
||||
}
|
||||
|
||||
function createNewConnect(id, type) {
|
||||
class RecentSessions: Reactor.Component {
|
||||
function render() {
|
||||
var sessions = handler.get_recent_sessions();
|
||||
if (sessions.length == 0) return <span />;
|
||||
return <div style="width: *">
|
||||
<div .sessions-bar>
|
||||
<div style="width:*">
|
||||
{translate("Recent Sessions")}
|
||||
</div>
|
||||
<SearchBar parent={this} />
|
||||
{!app.hidden && <SessionStyle />}
|
||||
</div>
|
||||
{!app.hidden && <SessionList @{this.sessionList} style={sessionsStyle} sessions={sessions} />}
|
||||
</div>;
|
||||
}
|
||||
|
||||
function filter(v) {
|
||||
this.sessionList.filter(v);
|
||||
}
|
||||
}
|
||||
|
||||
export function createNewConnect(id, type) {
|
||||
id = id.replace(/\s/g, "");
|
||||
app.remote_id.value = formatId(id);
|
||||
if (!id) return;
|
||||
@@ -627,7 +648,7 @@ class ID: Reactor.Component {
|
||||
}
|
||||
|
||||
var reg = /^\d+$/;
|
||||
function formatId(id) {
|
||||
export function formatId(id) {
|
||||
id = id.replace(/\s/g, "");
|
||||
if (reg.test(id) && id.length > 3) {
|
||||
var n = id.length;
|
||||
|
||||
Reference in New Issue
Block a user