v1.12.1 release changes (#2155)

- Fix collection dialog visibility (#2147) and button (#2154)
This commit is contained in:
sua yoo 2024-11-18 10:38:26 -08:00 committed by GitHub
parent ab9edfa064
commit 2cf75bd3f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -188,7 +188,7 @@ export class CollectionDetail extends BtrixElement {
> >
<sl-button <sl-button
size="small" size="small"
variant="primary" variant="danger"
@click=${async () => { @click=${async () => {
await this.deleteCollection(); await this.deleteCollection();
this.openDialogName = undefined; this.openDialogName = undefined;

View File

@ -160,8 +160,12 @@ export class CollectionsList extends BtrixElement {
<btrix-dialog <btrix-dialog
.label=${msg("Delete Collection?")} .label=${msg("Delete Collection?")}
?open=${this.openDialogName === "delete"} ?open=${this.openDialogName === "delete"}
@sl-show=${() => (this.isDialogVisible = true)}
@sl-hide=${() => (this.openDialogName = undefined)} @sl-hide=${() => (this.openDialogName = undefined)}
@sl-after-hide=${() => (this.isDialogVisible = false)} @sl-after-hide=${() => {
this.isDialogVisible = false;
this.selectedCollection = undefined;
}}
> >
${when( ${when(
this.isDialogVisible, this.isDialogVisible,
@ -178,7 +182,7 @@ export class CollectionsList extends BtrixElement {
> >
<sl-button <sl-button
size="small" size="small"
variant="primary" variant="danger"
@click=${async () => { @click=${async () => {
await this.deleteCollection(this.selectedCollection!); await this.deleteCollection(this.selectedCollection!);
this.openDialogName = undefined; this.openDialogName = undefined;
@ -678,7 +682,6 @@ export class CollectionsList extends BtrixElement {
}, },
); );
this.selectedCollection = undefined;
void this.fetchCollections(); void this.fetchCollections();
this.notify.toast({ this.notify.toast({