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

View File

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