Fix editing browser profile metadata (#1812)

- Fixes browser profile metadata form submission
- Fixes rendering of browser profile description in list view
- Changes label to "metadata" for consistency with other features
This commit is contained in:
sua yoo 2024-05-21 16:34:17 -07:00 committed by GitHub
parent 040d1b70d4
commit 0d53771a81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 13 deletions

View File

@ -300,7 +300,7 @@ export class BrowserProfilesDetail extends LiteElement {
name="pencil" name="pencil"
></sl-icon> ></sl-icon>
<span class="inline-block pr-2 align-middle" <span class="inline-block pr-2 align-middle"
>${msg("Edit Name & Description")}</span >${msg("Edit Metadata")}</span
> >
</li> </li>
<li <li
@ -602,7 +602,8 @@ export class BrowserProfilesDetail extends LiteElement {
} }
private async onSubmitEdit(e: SubmitEvent) { private async onSubmitEdit(e: SubmitEvent) {
e.preventDefault; e.preventDefault();
this.isSubmittingProfileChange = true; this.isSubmittingProfileChange = true;
const formData = new FormData(e.target as HTMLFormElement); const formData = new FormData(e.target as HTMLFormElement);

View File

@ -133,7 +133,7 @@ export class BrowserProfilesList extends LiteElement {
</sl-tooltip> </sl-tooltip>
</btrix-table-cell> </btrix-table-cell>
<btrix-table-cell <btrix-table-cell
class="flex-col items-start justify-center pl-0" class="flex-col items-center justify-center pl-0"
rowClickTarget="a" rowClickTarget="a"
> >
<a <a
@ -143,13 +143,11 @@ export class BrowserProfilesList extends LiteElement {
> >
${data.name} ${data.name}
</a> </a>
<div class="w-full text-xs text-neutral-500"> ${data.description
<div class="truncate"> ? html`<div class="w-full text-xs text-neutral-500">
${data.description} ${data.description} ${data.description} <div class="truncate">${data.description}</div>
${data.description} ${data.description} ${data.description} </div>`
${data.description} : nothing}
</div>
</div>
</btrix-table-cell> </btrix-table-cell>
<btrix-table-cell class="whitespace-nowrap"> <btrix-table-cell class="whitespace-nowrap">
<sl-format-date <sl-format-date
@ -163,9 +161,9 @@ export class BrowserProfilesList extends LiteElement {
></sl-format-date> ></sl-format-date>
</btrix-table-cell> </btrix-table-cell>
<btrix-table-cell>${data.origins.join(", ")}</btrix-table-cell> <btrix-table-cell>${data.origins.join(", ")}</btrix-table-cell>
<btrix-table-cell class="px-1" <btrix-table-cell class="px-1">
>${this.renderActions(data)}</btrix-table-cell ${this.renderActions(data)}
> </btrix-table-cell>
</btrix-table-row> </btrix-table-row>
`; `;
}; };