filename msgbox.tis -> msgbox.js

This commit is contained in:
csf 2022-01-04 14:31:50 +08:00 committed by open-trade
parent ae9c4e5995
commit 365781a0c0
4 changed files with 10 additions and 15 deletions

View File

@ -36,7 +36,6 @@ export class SearchBar extends Element {
} }
render() { render() {
// TODO @{this.search_id} TIS:<input|text @{this.search_id} novalue={translate("Search ID")} />
return (<div class="search-id" > return (<div class="search-id" >
<span class=".search-icon">{search_icon}</span> <span class=".search-icon">{search_icon}</span>
<input type="text" novalue={translate("Search ID")} /> <input type="text" novalue={translate("Search ID")} />
@ -45,11 +44,10 @@ export class SearchBar extends Element {
} }
["on click at span.clear-input"](_) { ["on click at span.clear-input"](_) {
this.search_id.value = ''; this.$("input").value = '';
this.onChange(''); this.onChange('');
} }
// TODO TEST params
["on change at input"](_, el) { ["on change at input"](_, el) {
this.onChange(el.value.trim()); this.onChange(el.value.trim());
} }
@ -115,7 +113,7 @@ export class SessionList extends Element {
render() { render() {
let sessions = this.getSessions(); let sessions = this.getSessions();
if (!sessions || sessions.length == 0) return <span />; // TODO property 'length' of undefined if (sessions.length == 0) return <span />;
sessions = sessions.map((x) => this.getSession(x)); sessions = sessions.map((x) => this.getSession(x));
// TODO is_win // TODO is_win
// TODO <li id="rdp">RDP<EditRdpPort /></li> // TODO <li id="rdp">RDP<EditRdpPort /></li>
@ -184,7 +182,7 @@ export class SessionList extends Element {
menu.setAttribute("remote-id",id); menu.setAttribute("remote-id",id);
me.popup(menu); me.popup(menu);
} }
// TODO li
["on click at menu#remote-context li"](evt, me) { ["on click at menu#remote-context li"](evt, me) {
let action = me.id; let action = me.id;
let id = me.parentElement.getAttribute("remote-id"); let id = me.parentElement.getAttribute("remote-id");

View File

@ -51,8 +51,6 @@ class ConnectStatus extends Element {
} }
} }
// TODO** SearchBar SessionStyle sessionsStyle SessionList
// TODO @{this.sessionList} {!app.hidden && <SessionList @{this.sessionList} style={sessionsStyle} sessions={sessions} />}
class RecentSessions extends Element { class RecentSessions extends Element {
sessionList; sessionList;
componentDidMount(){ componentDidMount(){
@ -72,7 +70,7 @@ class RecentSessions extends Element {
{!app.hidden && <SessionList id="SessionList" sessions={sessions} />} {!app.hidden && <SessionList id="SessionList" sessions={sessions} />}
</div>); </div>);
} }
// TODO TEST
filter(v) { filter(v) {
this.sessionList.filter(v); this.sessionList.filter(v);
} }
@ -318,7 +316,6 @@ class App extends Element{
render() { render() {
let is_can_screen_recording = handler.xcall("is_can_screen_recording",false); let is_can_screen_recording = handler.xcall("is_can_screen_recording",false);
// TODO ${} <ID @{this.remote_id} /> <RecentSessions @{this.recent_sessions} /> <ConnectStatus @{this.connect_status} />
return(<div class="app"> return(<div class="app">
<popup> <popup>
<menu class="context" id="edit-password-context"> <menu class="context" id="edit-password-context">
@ -599,7 +596,6 @@ function watch_trust() {
class PasswordEyeArea extends Element { class PasswordEyeArea extends Element {
render() { render() {
// TODO @{} <input type="text" @{this.input} readonly value="******" />
return (<div class="eye-area" style="width: *"> return (<div class="eye-area" style="width: *">
<input type="text" readonly value="******" /> <input type="text" readonly value="******" />
{svg_eye} {svg_eye}

View File

@ -1,7 +1,7 @@
<html window-frame="extended"> <html window-frame="extended">
<head> <head>
<link rel="stylesheet" href="common.css">
<style> <style>
@import url(common.css);
html { html {
background-color: white; background-color: white;
} }
@ -18,7 +18,7 @@
} }
caption { caption {
@ELLIPSIS; @ELLIPSIS;
size: *; size: "*";
text-align: center; text-align: center;
color: white; color: white;
padding-top: 0.33em; padding-top: 0.33em;
@ -48,7 +48,7 @@
line-height: 2em; line-height: 2em;
} }
div.set-password div.password { div.set-password div.password {
width: *; width: "*";
} }
div.set-password input { div.set-password input {
font-size: 1em; font-size: 1em;
@ -60,10 +60,11 @@
@ELLIPSIS; @ELLIPSIS;
} }
</style> </style>
<script type="text/tiscript"> <script type="module" src="msgbox.js"></script>
<!-- <script type="text/tiscript">
include "common.tis"; include "common.tis";
include "msgbox.tis"; include "msgbox.tis";
</script> </script> -->
</head> </head>
<body></body> <body></body>
</html> </html>