prettier
This commit is contained in:
		@@ -105,14 +105,16 @@ class TfTabConnectionsElement extends LitElement {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	render_connection(connection) {
 | 
						render_connection(connection) {
 | 
				
			||||||
		let requests = Object.values(connection.requests.reduce(function(accumulator, value) {
 | 
							let requests = Object.values(
 | 
				
			||||||
 | 
								connection.requests.reduce(function (accumulator, value) {
 | 
				
			||||||
				let key = `${value.name}:${Math.sign(value.request_number)}`;
 | 
									let key = `${value.name}:${Math.sign(value.request_number)}`;
 | 
				
			||||||
				if (!accumulator[key]) {
 | 
									if (!accumulator[key]) {
 | 
				
			||||||
					accumulator[key] = Object.assign({count: 0}, value);
 | 
										accumulator[key] = Object.assign({count: 0}, value);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				accumulator[key].count++;
 | 
									accumulator[key].count++;
 | 
				
			||||||
				return accumulator;
 | 
									return accumulator;
 | 
				
			||||||
		}, {}));
 | 
								}, {})
 | 
				
			||||||
 | 
							);
 | 
				
			||||||
		return html`
 | 
							return html`
 | 
				
			||||||
			<button
 | 
								<button
 | 
				
			||||||
				class="w3-button w3-theme-d1"
 | 
									class="w3-button w3-theme-d1"
 | 
				
			||||||
@@ -124,9 +126,20 @@ class TfTabConnectionsElement extends LitElement {
 | 
				
			|||||||
			${connection.tunnel !== undefined
 | 
								${connection.tunnel !== undefined
 | 
				
			||||||
				? '🚇'
 | 
									? '🚇'
 | 
				
			||||||
				: html`(${connection.host}:${connection.port})`}
 | 
									: html`(${connection.host}:${connection.port})`}
 | 
				
			||||||
			<div>${requests.map(x => html`
 | 
								<div>
 | 
				
			||||||
				<span class="w3-tag w3-small">${x.request_number > 0 ? '🟩' : '🟥'} ${x.name} <span class="w3-badge w3-white" style=${x.count > 1 ? undefined : 'display: none'}>${x.count}</span></span>
 | 
									${requests.map(
 | 
				
			||||||
			`)}</div>
 | 
										(x) => html`
 | 
				
			||||||
 | 
											<span class="w3-tag w3-small"
 | 
				
			||||||
 | 
												>${x.request_number > 0 ? '🟩' : '🟥'} ${x.name}
 | 
				
			||||||
 | 
												<span
 | 
				
			||||||
 | 
													class="w3-badge w3-white"
 | 
				
			||||||
 | 
													style=${x.count > 1 ? undefined : 'display: none'}
 | 
				
			||||||
 | 
													>${x.count}</span
 | 
				
			||||||
 | 
												></span
 | 
				
			||||||
 | 
											>
 | 
				
			||||||
 | 
										`
 | 
				
			||||||
 | 
									)}
 | 
				
			||||||
 | 
								</div>
 | 
				
			||||||
			<ul>
 | 
								<ul>
 | 
				
			||||||
				${this.connections
 | 
									${this.connections
 | 
				
			||||||
					.filter((x) => x.tunnel === this.connections.indexOf(connection))
 | 
										.filter((x) => x.tunnel === this.connections.indexOf(connection))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user