diff --git a/src/www/views/servers_view/server_list/index.ts b/src/www/views/servers_view/server_list/index.ts
index 0accdc8e66..4f7523b2e0 100644
--- a/src/www/views/servers_view/server_list/index.ts
+++ b/src/www/views/servers_view/server_list/index.ts
@@ -11,64 +11,54 @@
limitations under the License.
*/
-import {computed, customElement, property} from '@polymer/decorators';
-import {html, PolymerElement} from '@polymer/polymer';
+import {css, html, LitElement} from 'lit';
+import {customElement, property} from 'lit/decorators.js';
import '../server_list_item/server_card';
import {ServerListItem} from '../server_list_item';
import {Localizer} from 'src/infrastructure/i18n';
@customElement('server-list')
-export class ServerList extends PolymerElement {
- static get template() {
- return html`
-
+ server-hero-card {
+ height: 400px;
+ }
+ `,
+ ];
-
-
-
-
-
-
-
-
-
- `;
- }
-
- // Need to declare localize function passed in from parent, or else
- // localize() calls within the template won't be updated.
-
- // @polymer/decorators doesn't support Function constructors...
- @property({type: Object}) localize: Localizer;
+ @property({type: Function}) localize: Localizer = msg => msg;
@property({type: Array}) servers: ServerListItem[] = [];
- @computed('servers')
- get hasSingleServer() {
- return this.servers.length === 1;
+ render() {
+ if (this.hasSingleServer) {
+ return html``;
+ } else {
+ return html`
+ ${this.servers.map(
+ server => html``
+ )}
+ `;
+ }
}
- getErrorMessage(errorMessageId: string) {
- if (typeof errorMessageId === 'string') {
- return this.localize(errorMessageId);
- }
+ private get hasSingleServer() {
+ return this.servers.length === 1;
}
}