From d6f4a61b26f4bc7f7ae0a33cbc04fc90e427b871 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Mon, 1 Apr 2024 13:33:53 +0100 Subject: [PATCH 1/9] chore(www): upgrade `servers-view` to Lit --- client/src/www/app/app.ts | 3 +- client/src/www/ui_components/app-root.js | 9 +- client/src/www/views/servers_view/index.ts | 162 +++++++++++---------- 3 files changed, 93 insertions(+), 81 deletions(-) diff --git a/client/src/www/app/app.ts b/client/src/www/app/app.ts index e5802c0633..27f2fecef7 100644 --- a/client/src/www/app/app.ts +++ b/client/src/www/app/app.ts @@ -122,7 +122,7 @@ export class App { document.addEventListener('resume', this.syncConnectivityStateToServerCards.bind(this)); // Register handlers for events fired by Polymer components. - this.rootEl.addEventListener('PromptAddServerRequested', this.requestPromptAddServer.bind(this)); + this.rootEl.$.serversView.addEventListener('add-server', this.requestPromptAddServer.bind(this)); this.rootEl.addEventListener('AddServerConfirmationRequested', this.requestAddServerConfirmation.bind(this)); this.rootEl.addEventListener('AddServerRequested', this.requestAddServer.bind(this)); this.rootEl.addEventListener('IgnoreServerRequested', this.requestIgnoreServer.bind(this)); @@ -300,7 +300,6 @@ export class App { } private requestPromptAddServer() { - this.rootEl.promptAddServer(); this.pullClipboardText(); } diff --git a/client/src/www/ui_components/app-root.js b/client/src/www/ui_components/app-root.js index f9183d4052..8241edcb07 100644 --- a/client/src/www/ui_components/app-root.js +++ b/client/src/www/ui_components/app-root.js @@ -339,7 +339,14 @@ export class AppRoot extends mixinBehaviors([AppLocalizeBehavior], PolymerElemen - +