import { handler,view,is_osx,string2RGB,adjustBorder,svg_chat,translate,ChatBox,getNowStr,setWindowButontsAndIcon,is_linux } from "./common.js";
import {$} from "@sciter";
// TODO in sciterjs window-frame
// view.windowFrame = is_osx ? #extended : #solid;
var body;
var connections = [];
var show_chat = false;
class Body extends Element {
cur = 0;
this() {
body = this;
}
render() {
if (connections.length == 0) return
;
let c = connections[this.cur];
this.connection = c;
this.cid = c.id;
let auth = c.authorized;
let callback = (msg)=> {
this.sendMsg(msg);
};
setTimeout(adaptSize, 1);
let right_style = show_chat ? "" : "display: none";
return (