forked from cory/tildefriends
Poking at connections.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4054 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -23,19 +23,6 @@ class TfTabConnectionsElement extends LitElement {
|
||||
});
|
||||
}
|
||||
|
||||
_emit_change() {
|
||||
let changed_event = new Event('change', {
|
||||
srcElement: this,
|
||||
});
|
||||
this.dispatchEvent(changed_event);
|
||||
}
|
||||
|
||||
changed(event) {
|
||||
this.selected = event.srcElement.value;
|
||||
tfrpc.rpc.localStorageSet('whoami', this.selected);
|
||||
this._emit_change();
|
||||
}
|
||||
|
||||
render_connection_summary(connection) {
|
||||
if (connection.address && connection.port) {
|
||||
return html`(<small>${connection.address}:${connection.port}</small>)`;
|
||||
@ -69,7 +56,6 @@ class TfTabConnectionsElement extends LitElement {
|
||||
<li>
|
||||
<input type="button" @click=${() => self._tunnel(connection.tunnel.id, connection.pubkey)} value="Connect"></input>
|
||||
<tf-user id=${connection.pubkey} .users=${this.users}></tf-user>
|
||||
(room peer)
|
||||
</li>
|
||||
`;
|
||||
}
|
||||
@ -88,7 +74,9 @@ class TfTabConnectionsElement extends LitElement {
|
||||
let self = this;
|
||||
return html`
|
||||
<h2>New Connection</h2>
|
||||
<textarea id="code"></textarea>
|
||||
<div style="display: flex; flex-direction: column">
|
||||
<textarea id="code"></textarea>
|
||||
</div>
|
||||
<input type="button" @click=${() => tfrpc.rpc.connect(self.renderRoot.getElementById('code').value)} value="Connect"></input>
|
||||
<h2>Broadcasts</h2>
|
||||
<ul>
|
||||
|
Reference in New Issue
Block a user