From 54217ea5135a5215210dc0e2d7028a85bda703f4 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Mon, 19 Aug 2024 14:10:01 -0400 Subject: [PATCH 01/12] i think i need to migrate the server card first --- client/src/www/app/app.ts | 6 +- client/src/www/ui_components/app-root.js | 11 --- .../www/ui_components/server-rename-dialog.js | 69 ----------------- .../server_card/server_rename_dialog/index.ts | 77 +++++++++++++++++++ .../server_rename_dialog/stories.ts | 38 +++++++++ .../server_list_item/server_card/stories.ts | 27 +++---- 6 files changed, 130 insertions(+), 98 deletions(-) delete mode 100644 client/src/www/ui_components/server-rename-dialog.js create mode 100644 client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts create mode 100644 client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/stories.ts diff --git a/client/src/www/app/app.ts b/client/src/www/app/app.ts index c39f1a25dd..f69436e3f1 100644 --- a/client/src/www/app/app.ts +++ b/client/src/www/app/app.ts @@ -152,11 +152,7 @@ export class App { 'DisconnectPressed', this.disconnectServer.bind(this) ); - this.rootEl.addEventListener('ForgetPressed', this.forgetServer.bind(this)); - this.rootEl.addEventListener( - 'RenameRequested', - this.renameServer.bind(this) - ); + this.rootEl.addEventListener('ForgetPressed', this.forgetServer.bind(this));s this.rootEl.addEventListener( 'QuitPressed', this.quitApplication.bind(this) diff --git a/client/src/www/ui_components/app-root.js b/client/src/www/ui_components/app-root.js index 992c60813d..018af55782 100644 --- a/client/src/www/ui_components/app-root.js +++ b/client/src/www/ui_components/app-root.js @@ -53,7 +53,6 @@ import '../views/licenses_view'; // eslint-disable-next-line n/no-missing-import import '../views/servers_view'; -import './server-rename-dialog.js'; import './user-comms-dialog.js'; import {AppLocalizeBehavior} from '@polymer/app-localize-behavior/app-localize-behavior.js'; @@ -546,12 +545,6 @@ export class AppRoot extends mixinBehaviors( https://github.com/PolymerElements/paper-dialog/issues/152 and https://github.com/PolymerElements/app-layout/issues/295 Once those are fixed we can consider moving this into server-card.html --> - - - mwc-textfield { - margin-top: 0; - } - - -

[[localize('server-rename')]]

- -
- [[localize('cancel')]] - [[localize('save')]] -
-
- `, - - is: 'server-rename-dialog', - - properties: { - // Need to declare localize function passed in from parent, or else - // localize() calls within the template won't be updated. - localize: Function, - rootPath: String, - __serverName: String, - __serverId: String, - }, - - open: function (serverName, serverId) { - // Store the initial serverName so we can know if it changed, and - // store the serverId so we can emit the rename request event. - this.__serverName = serverName; - this.__serverId = serverId; - this.$.serverNameInput.value = serverName; - this.$.renameDialog.open(); - // Focus on serverNameInput, only after the dialog has been displayed. - afterNextRender(this, () => { - this.$.serverNameInput.focus(); - }); - }, - - _saveRename: function () { - const newName = this.$.serverNameInput.value; - if (newName !== this.__serverName) { - this.fire('RenameRequested', {serverId: this.__serverId, newName: newName}); - } - }, -}); diff --git a/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts new file mode 100644 index 0000000000..c7c3713cd3 --- /dev/null +++ b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts @@ -0,0 +1,77 @@ +/* + Copyright 2024 The Outline Authors + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +import {LitElement, html} from 'lit'; +import {customElement, property, state} from 'lit/decorators.js'; +import '@material/web/all.js'; + +@customElement('server-rename-dialog') +export class ServerRenameDialog extends LitElement { + @property({type: Boolean}) open: boolean = false; + @property({type: Function}) localize!: (key: string) => string; + @property({type: String}) serverId!: string; + @property({type: String}) serverName!: string; + + @state() private editedServerName: string | null = null; + + render() { + if (this.editedServerName === null) { + this.editedServerName = this.serverName; + } + + return html` + + + ${this.localize('server-rename')} + + + + ${this.localize('cancel')} + ${this.localize('save')} + + + `; + } + + private handleCancel() { + this.dispatchEvent( + new CustomEvent('CancelRenameRequested', {bubbles: true, composed: true}) + ); + + this.editedServerName = null; + } + + private handleRename() { + if (this.editedServerName === this.serverName) { + return; + } + + this.dispatchEvent( + new CustomEvent('RenameRequested', { + detail: {serverId: this.serverId, newName: this.editedServerName}, + bubbles: true, + composed: true, + }) + ); + + this.editedServerName = null; + } +} diff --git a/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/stories.ts b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/stories.ts new file mode 100644 index 0000000000..8405e6a583 --- /dev/null +++ b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/stories.ts @@ -0,0 +1,38 @@ +/* + Copyright 2024 The Outline Authors + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +import {html} from 'lit'; + +import './index'; +import {ServerRenameDialog} from './index'; +import {localize} from '../../../../../testing/localize'; + +export default { + title: 'Client/Servers View/Server List Item/Server Rename Dialog', + args: { + open: true, + serverId: 'my-server-id', + serverName: 'My Server', + }, +}; + +export const Example = ({open, serverId, serverName}: ServerRenameDialog) => { + return html` + + `; +}; diff --git a/client/src/www/views/servers_view/server_list_item/server_card/stories.ts b/client/src/www/views/servers_view/server_list_item/server_card/stories.ts index ec34aea793..ef9187d143 100644 --- a/client/src/www/views/servers_view/server_list_item/server_card/stories.ts +++ b/client/src/www/views/servers_view/server_list_item/server_card/stories.ts @@ -39,16 +39,17 @@ export default { }, }; -export const ServerRowCard = ({server}: ServerListItemElement) => - html` -
- -
- `; - -export const ServerHeroCard = ({server}: ServerListItemElement) => - html` -
- -
- `; +export const ServerRowCard = ({server}: ServerListItemElement) => html` +
+ +
+`; + +export const ServerHeroCard = ({server}: ServerListItemElement) => html` +
+ +
+`; From b819ae52c249d2f4d5bae71eccc8184f3dfd1772 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Tue, 20 Aug 2024 19:08:19 -0400 Subject: [PATCH 02/12] token adjustments --- client/resources/original_messages.json | 2 +- client/src/www/messages/en.json | 2 +- .../server_card/server_rename_dialog/index.ts | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/client/resources/original_messages.json b/client/resources/original_messages.json index 014bedab41..668c4c312e 100644 --- a/client/resources/original_messages.json +++ b/client/resources/original_messages.json @@ -335,7 +335,7 @@ }, "save": { "description": "The text on a button to save application settings.", - "message": "save" + "message": "Save" }, "server_access_key_detected": { "description": "A message indicating the application has detected a valid access key to be used to connect to a server.", diff --git a/client/src/www/messages/en.json b/client/src/www/messages/en.json index 313dc47094..5dfebcced4 100644 --- a/client/src/www/messages/en.json +++ b/client/src/www/messages/en.json @@ -68,7 +68,7 @@ "privacy-title": "Outline will never collect your personal information", "quit": "Quit", "reconnecting-server-state": "Reconnecting...", - "save": "save", + "save": "Save", "server-access-key-detected": "Access key detected", "server-access-key-label": "ss://access-key", "server-add": "Add server", diff --git a/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts index c7c3713cd3..2fb4471ee3 100644 --- a/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts +++ b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts @@ -11,7 +11,7 @@ limitations under the License. */ -import {LitElement, html} from 'lit'; +import {LitElement, html, css} from 'lit'; import {customElement, property, state} from 'lit/decorators.js'; import '@material/web/all.js'; @@ -24,6 +24,13 @@ export class ServerRenameDialog extends LitElement { @state() private editedServerName: string | null = null; + static styles = css` + :host { + --md-sys-color-primary: var(--outline-primary); + --md-sys-shape-corner-extra-large: 12px; + } + `; + render() { if (this.editedServerName === null) { this.editedServerName = this.serverName; From 261d211fa562d2a8d9fba5012948035ff867f406 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:50:46 -0400 Subject: [PATCH 03/12] cleanup: time to integrate --- .../servers_view/server_list_item/index.ts | 1 + .../server_list_item/server_card/index.ts | 33 ++++++++++++----- .../server_card/server_rename_dialog/index.ts | 36 +++++++++---------- 3 files changed, 43 insertions(+), 27 deletions(-) diff --git a/client/src/www/views/servers_view/server_list_item/index.ts b/client/src/www/views/servers_view/server_list_item/index.ts index 8d70bf6580..5657292138 100644 --- a/client/src/www/views/servers_view/server_list_item/index.ts +++ b/client/src/www/views/servers_view/server_list_item/index.ts @@ -46,4 +46,5 @@ export interface ServerListItemElement { localize: Localizer; menu: Ref; menuButton: Ref; + isRenameDialogOpen: boolean; } diff --git a/client/src/www/views/servers_view/server_list_item/server_card/index.ts b/client/src/www/views/servers_view/server_list_item/server_card/index.ts index d7e342bdb8..677bc650e5 100644 --- a/client/src/www/views/servers_view/server_list_item/server_card/index.ts +++ b/client/src/www/views/servers_view/server_list_item/server_card/index.ts @@ -15,10 +15,11 @@ import type {Menu} from '@material/web/menu/menu'; import {Localizer} from '@outline/infrastructure/i18n'; import {css, html, LitElement} from 'lit'; -import {customElement, property} from 'lit/decorators.js'; +import {customElement, property, state} from 'lit/decorators.js'; import {createRef, Ref, ref} from 'lit/directives/ref.js'; import '../../server_connection_indicator'; +import './server_rename_dialog'; import {ServerListItem, ServerListItemElement, ServerListItemEvent} from '..'; import {ServerConnectionState} from '../../server_connection_indicator'; @@ -154,14 +155,18 @@ const getSharedComponents = (element: ServerListItemElement & LitElement) => { }; const dispatchers = { - beginRename: () => + beginRename: () => (element.isRenameDialogOpen = true), + submitRename: (event: CustomEvent) => { + element.isRenameDialogOpen = false; + element.dispatchEvent( - new CustomEvent(ServerListItemEvent.RENAME, { - detail: {serverId: server.id, name: server.name}, + new CustomEvent('RenameRequested', { + detail: {serverId: event.detail.id, newName: event.detail.name}, bubbles: true, composed: true, }) - ), + ); + }, forget: () => element.dispatchEvent( new CustomEvent(ServerListItemEvent.FORGET, { @@ -213,7 +218,7 @@ const getSharedComponents = (element: ServerListItemElement & LitElement) => { `, menu: html` - + ${localize('server-rename')} @@ -243,6 +248,14 @@ const getSharedComponents = (element: ServerListItemElement & LitElement) => { `, + renameDialog: html` (element.isRenameDialogOpen = false)} + @submit=${dispatchers.submitRename} + >`, }, }; }; @@ -255,6 +268,8 @@ export class ServerRowCard extends LitElement implements ServerListItemElement { @property() server: ServerListItem; @property() localize: Localizer; + @state() isRenameDialogOpen = false; + menu: Ref = createRef(); menuButton: Ref = createRef(); @@ -299,7 +314,7 @@ export class ServerRowCard extends LitElement implements ServerListItemElement { ${elements.menuButton} ${elements.footer} - ${elements.menu} + ${elements.menu} ${elements.renameDialog} `; } } @@ -315,6 +330,8 @@ export class ServerHeroCard @property() server: ServerListItem; @property() localize: Localizer; + @state() isRenameDialogOpen = false; + menu: Ref = createRef(); menuButton: Ref = createRef(); @@ -401,7 +418,7 @@ export class ServerHeroCard ${elements.footer} - ${elements.menu} + ${elements.menu} ${elements.renameDialog} `; } } diff --git a/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts index 2fb4471ee3..5dda539e32 100644 --- a/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts +++ b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts @@ -27,7 +27,13 @@ export class ServerRenameDialog extends LitElement { static styles = css` :host { --md-sys-color-primary: var(--outline-primary); - --md-sys-shape-corner-extra-large: 12px; + --md-sys-shape-corner-extra-large: 2px; + --md-sys-shape-corner-full: 2px; + } + + fieldset { + border: none; + text-transform: uppercase; } `; @@ -37,45 +43,37 @@ export class ServerRenameDialog extends LitElement { } return html` - - - ${this.localize('server-rename')} - + +
${this.localize('server-rename')}
- +
${this.localize('cancel')} - ${this.localize('save')} - +
`; } private handleCancel() { - this.dispatchEvent( - new CustomEvent('CancelRenameRequested', {bubbles: true, composed: true}) - ); + this.dispatchEvent(new CustomEvent('cancel')); this.editedServerName = null; } private handleRename() { - if (this.editedServerName === this.serverName) { - return; - } - this.dispatchEvent( - new CustomEvent('RenameRequested', { - detail: {serverId: this.serverId, newName: this.editedServerName}, - bubbles: true, - composed: true, + new CustomEvent('submit', { + detail: {id: this.serverId, name: this.editedServerName}, }) ); From b36fba2487ff610a46964a1df6fe4c852e5129b5 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:10:08 -0400 Subject: [PATCH 04/12] done --- client/src/www/app/app.ts | 6 ++-- .../servers_view/server_list_item/index.ts | 2 +- .../server_list_item/server_card/index.ts | 2 +- .../server_card/server_rename_dialog/index.ts | 33 ++++++++++--------- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/client/src/www/app/app.ts b/client/src/www/app/app.ts index f69436e3f1..9ae48d440b 100644 --- a/client/src/www/app/app.ts +++ b/client/src/www/app/app.ts @@ -152,7 +152,7 @@ export class App { 'DisconnectPressed', this.disconnectServer.bind(this) ); - this.rootEl.addEventListener('ForgetPressed', this.forgetServer.bind(this));s + this.rootEl.addEventListener('ForgetPressed', this.forgetServer.bind(this)); this.rootEl.addEventListener( 'QuitPressed', this.quitApplication.bind(this) @@ -162,8 +162,8 @@ export class App { this.autoConnectDialogDismissed.bind(this) ); this.rootEl.addEventListener( - 'ShowServerRename', - this.rootEl.showServerRename.bind(this.rootEl) + 'RenameRequested', + this.renameServer.bind(this) ); this.rootEl.addEventListener( 'PrivacyTermsAcked', diff --git a/client/src/www/views/servers_view/server_list_item/index.ts b/client/src/www/views/servers_view/server_list_item/index.ts index 5657292138..e439b9a726 100644 --- a/client/src/www/views/servers_view/server_list_item/index.ts +++ b/client/src/www/views/servers_view/server_list_item/index.ts @@ -22,7 +22,7 @@ export enum ServerListItemEvent { CONNECT = 'ConnectPressed', DISCONNECT = 'DisconnectPressed', FORGET = 'ForgetPressed', - RENAME = 'ShowServerRename', + RENAME = 'RenameRequested', } /** diff --git a/client/src/www/views/servers_view/server_list_item/server_card/index.ts b/client/src/www/views/servers_view/server_list_item/server_card/index.ts index 677bc650e5..a0d2bc9cb5 100644 --- a/client/src/www/views/servers_view/server_list_item/server_card/index.ts +++ b/client/src/www/views/servers_view/server_list_item/server_card/index.ts @@ -160,7 +160,7 @@ const getSharedComponents = (element: ServerListItemElement & LitElement) => { element.isRenameDialogOpen = false; element.dispatchEvent( - new CustomEvent('RenameRequested', { + new CustomEvent(ServerListItemEvent.RENAME, { detail: {serverId: event.detail.id, newName: event.detail.name}, bubbles: true, composed: true, diff --git a/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts index 5dda539e32..3334cc6c75 100644 --- a/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts +++ b/client/src/www/views/servers_view/server_list_item/server_card/server_rename_dialog/index.ts @@ -11,8 +11,10 @@ limitations under the License. */ +import type {MdFilledTextField} from '@material/web/all.js'; + import {LitElement, html, css} from 'lit'; -import {customElement, property, state} from 'lit/decorators.js'; +import {customElement, property, state, query} from 'lit/decorators.js'; import '@material/web/all.js'; @customElement('server-rename-dialog') @@ -22,7 +24,9 @@ export class ServerRenameDialog extends LitElement { @property({type: String}) serverId!: string; @property({type: String}) serverName!: string; - @state() private editedServerName: string | null = null; + @state() internalServerName: string | null = null; + + @query('md-filled-text-field') textField: MdFilledTextField; static styles = css` :host { @@ -38,25 +42,28 @@ export class ServerRenameDialog extends LitElement { `; render() { - if (this.editedServerName === null) { - this.editedServerName = this.serverName; + if (this.internalServerName === null) { + this.internalServerName = this.serverName; } return html` - +
${this.localize('server-rename')}
{ + this.internalServerName = (e.target as HTMLInputElement).value; + }} >
- ${this.localize('cancel')} ${this.localize('save')}
@@ -64,19 +71,15 @@ export class ServerRenameDialog extends LitElement { `; } - private handleCancel() { + private handleClose() { this.dispatchEvent(new CustomEvent('cancel')); - - this.editedServerName = null; } private handleRename() { this.dispatchEvent( new CustomEvent('submit', { - detail: {id: this.serverId, name: this.editedServerName}, + detail: {id: this.serverId, name: this.internalServerName}, }) ); - - this.editedServerName = null; } } From 06d9ce0e4ddf5f48352c818cd3788efd5a26f3c0 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:12:15 -0400 Subject: [PATCH 05/12] Update original_messages.json --- client/resources/original_messages.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/resources/original_messages.json b/client/resources/original_messages.json index 668c4c312e..421edccf0a 100644 --- a/client/resources/original_messages.json +++ b/client/resources/original_messages.json @@ -335,7 +335,7 @@ }, "save": { "description": "The text on a button to save application settings.", - "message": "Save" + "message": "save" }, "server_access_key_detected": { "description": "A message indicating the application has detected a valid access key to be used to connect to a server.", @@ -607,4 +607,4 @@ "description": "Affirmative answer to a form question.", "message": "Yes" } -} \ No newline at end of file +} From f9a7aea57300ea40127926e4f00856bd9f834c11 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:12:34 -0400 Subject: [PATCH 06/12] Update original_messages.json From 7478d195460fcdc0ad9d04d9320051c9c60d4f69 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:12:52 -0400 Subject: [PATCH 07/12] Update original_messages.json From b3703279c081d3d65db0de26442b74fffcfa4708 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:13:32 -0400 Subject: [PATCH 08/12] Update en.json --- client/src/www/messages/en.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/www/messages/en.json b/client/src/www/messages/en.json index 5dfebcced4..f3e657f33d 100644 --- a/client/src/www/messages/en.json +++ b/client/src/www/messages/en.json @@ -68,7 +68,7 @@ "privacy-title": "Outline will never collect your personal information", "quit": "Quit", "reconnecting-server-state": "Reconnecting...", - "save": "Save", + "save": "save", "server-access-key-detected": "Access key detected", "server-access-key-label": "ss://access-key", "server-add": "Add server", @@ -114,4 +114,4 @@ "update-downloaded": "An updated version of Outline has been downloaded. It will be installed when you restart Outline.", "version": "Version {appVersion}", "yes": "Yes" -} \ No newline at end of file +} From 1a0f27cb7507359947c2c50b285ce29d0a9e3559 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:15:15 -0400 Subject: [PATCH 09/12] Update app.ts --- client/src/www/app/app.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/www/app/app.ts b/client/src/www/app/app.ts index 9ae48d440b..2c781924f9 100644 --- a/client/src/www/app/app.ts +++ b/client/src/www/app/app.ts @@ -153,6 +153,10 @@ export class App { this.disconnectServer.bind(this) ); this.rootEl.addEventListener('ForgetPressed', this.forgetServer.bind(this)); + this.rootEl.addEventListener( + 'RenameRequested', + this.renameServer.bind(this) + ); this.rootEl.addEventListener( 'QuitPressed', this.quitApplication.bind(this) @@ -161,10 +165,6 @@ export class App { 'AutoConnectDialogDismissed', this.autoConnectDialogDismissed.bind(this) ); - this.rootEl.addEventListener( - 'RenameRequested', - this.renameServer.bind(this) - ); this.rootEl.addEventListener( 'PrivacyTermsAcked', this.ackPrivacyTerms.bind(this) From 91788677e25075eb6a8fff671da8ac8a47853a20 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:23:00 -0400 Subject: [PATCH 10/12] Update index.ts --- .../views/servers_view/server_list_item/server_card/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/www/views/servers_view/server_list_item/server_card/index.ts b/client/src/www/views/servers_view/server_list_item/server_card/index.ts index a0d2bc9cb5..febc8db849 100644 --- a/client/src/www/views/servers_view/server_list_item/server_card/index.ts +++ b/client/src/www/views/servers_view/server_list_item/server_card/index.ts @@ -251,8 +251,8 @@ const getSharedComponents = (element: ServerListItemElement & LitElement) => { renameDialog: html` (element.isRenameDialogOpen = false)} @submit=${dispatchers.submitRename} >`, From 1c88766e915b035d2f97cd565819731c06ffe32f Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Thu, 22 Aug 2024 09:23:49 -0400 Subject: [PATCH 11/12] remove from test stub --- client/src/www/TODO.spec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/src/www/TODO.spec.ts b/client/src/www/TODO.spec.ts index 79c10169fc..70654b393b 100644 --- a/client/src/www/TODO.spec.ts +++ b/client/src/www/TODO.spec.ts @@ -36,7 +36,6 @@ import * as errorReporter from './shared/error_reporter'; import * as addServerView from './ui_components/add-server-view'; import * as appRoot from './ui_components/app-root.js'; import * as privacyView from './ui_components/privacy-view'; -import * as serverRenameDialog from './ui_components/server-rename-dialog'; import * as userCommsDialog from './ui_components/user-comms-dialog'; import * as aboutView from './views/about_view'; import * as languageView from './views/language_view'; @@ -54,7 +53,6 @@ describe('TODOs', () => { expect(languageView).toBeDefined(); expect(platform).toBeDefined(); expect(privacyView).toBeDefined(); - expect(serverRenameDialog).toBeDefined(); expect(server).toBeDefined(); expect(updater).toBeDefined(); expect(urlInterceptor).toBeDefined(); From a14a563756130c3cba1c073f8e93d9fa1624be29 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:28:46 -0400 Subject: [PATCH 12/12] use property expressions --- .../views/servers_view/server_list_item/server_card/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/www/views/servers_view/server_list_item/server_card/index.ts b/client/src/www/views/servers_view/server_list_item/server_card/index.ts index febc8db849..cc4bc99963 100644 --- a/client/src/www/views/servers_view/server_list_item/server_card/index.ts +++ b/client/src/www/views/servers_view/server_list_item/server_card/index.ts @@ -251,8 +251,8 @@ const getSharedComponents = (element: ServerListItemElement & LitElement) => { renameDialog: html` (element.isRenameDialogOpen = false)} @submit=${dispatchers.submitRename} >`,