forked from cory/tildefriends
Blockquote and connections tab tweaks.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4437 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
d9c4d847a1
commit
c8029388c9
@ -48,7 +48,7 @@ div.img_caption::after {
|
|||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
border-left: 4px solid #fff;
|
border-left: 4px solid #fff;
|
||||||
margin-left: 8px;
|
margin-left: 0px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
@ -42,8 +42,11 @@ class TfTabConnectionsElement extends LitElement {
|
|||||||
let self = this;
|
let self = this;
|
||||||
let peers = this.broadcasts.filter(x => x.tunnel?.id == connection);
|
let peers = this.broadcasts.filter(x => x.tunnel?.id == connection);
|
||||||
if (peers.length) {
|
if (peers.length) {
|
||||||
let connections = this.connections.map(x => x.id);
|
return html`
|
||||||
return html`${peers.filter(x => connections.indexOf(x.pubkey) == -1).map(x => html`${self.render_room_peer(x)}`)}`;
|
<ul>
|
||||||
|
${peers.map(x => html`${self.render_room_peer(x)}`)}
|
||||||
|
</ul>
|
||||||
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +59,7 @@ class TfTabConnectionsElement extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<li>
|
<li>
|
||||||
<input type="button" @click=${() => self._tunnel(connection.tunnel.id, connection.pubkey)} value="Connect"></input>
|
<input type="button" @click=${() => self._tunnel(connection.tunnel.id, connection.pubkey)} value="Connect"></input>
|
||||||
<tf-user id=${connection.pubkey} .users=${this.users}></tf-user> 📡
|
<tf-user id=${connection.pubkey} .users=${this.users}></tf-user>
|
||||||
</li>
|
</li>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -76,18 +79,6 @@ class TfTabConnectionsElement extends LitElement {
|
|||||||
this.stored_connections = (await tfrpc.rpc.getStoredConnections()) || [];
|
this.stored_connections = (await tfrpc.rpc.getStoredConnections()) || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
render_connection(connection) {
|
|
||||||
return html`
|
|
||||||
<input type="button" @click=${() => tfrpc.rpc.closeConnection(connection.id)} value="Close"></input>
|
|
||||||
<tf-user id=${connection.id} .users=${this.users}></tf-user>
|
|
||||||
${connection.tunnel !== undefined ? '🚇' : html`(${connection.host}:${connection.port})`}
|
|
||||||
<ul>
|
|
||||||
${this.connections.filter(x => x.tunnel === this.connections.indexOf(connection)).map(x => html`<li>${this.render_connection(x)}</li>`)}
|
|
||||||
${this.render_room_peers(connection.id)}
|
|
||||||
</ul>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let self = this;
|
let self = this;
|
||||||
return html`
|
return html`
|
||||||
@ -102,8 +93,12 @@ class TfTabConnectionsElement extends LitElement {
|
|||||||
</ul>
|
</ul>
|
||||||
<h2>Connections</h2>
|
<h2>Connections</h2>
|
||||||
<ul>
|
<ul>
|
||||||
${this.connections.filter(x => x.tunnel === undefined).map(x => html`
|
${this.connections.map(x => html`
|
||||||
<li>${this.render_connection(x)}</li>
|
<li>
|
||||||
|
<input type="button" @click=${() => tfrpc.rpc.closeConnection(x)} value="Close"></input>
|
||||||
|
<tf-user id=${x} .users=${this.users}></tf-user> ${this.render_connection_summary(x)}
|
||||||
|
${self.render_room_peers(x)}
|
||||||
|
</li>
|
||||||
`)}
|
`)}
|
||||||
</ul>
|
</ul>
|
||||||
<h2>Stored Connections (WIP)</h2>
|
<h2>Stored Connections (WIP)</h2>
|
||||||
|
Loading…
Reference in New Issue
Block a user