Close photo upload window, show toast when published

This commit is contained in:
2026-04-21 14:16:05 +04:00
parent a89ba904c8
commit 9828ad2714
2 changed files with 10 additions and 2 deletions

View File

@@ -551,7 +551,10 @@ export default class PlaceDetails extends Component {
{{#if this.isPhotoUploadModalOpen}}
<Modal @onClose={{this.closePhotoUploadModal}}>
<PlacePhotoUpload @place={{this.saveablePlace}} />
<PlacePhotoUpload
@place={{this.saveablePlace}}
@onClose={{this.closePhotoUploadModal}}
/>
</Modal>
{{/if}}

View File

@@ -183,11 +183,16 @@ export default class PlacePhotoUpload extends Component {
const event = await factory.sign(template);
await this.nostrRelay.publish(event);
this.status = 'Published successfully!';
this.toast.show('Photos published successfully');
this.status = '';
// Clear out the files so user can upload more or be done
this.files = [];
this.uploadedPhotos = [];
if (this.args.onClose) {
this.args.onClose();
}
} catch (e) {
this.error = 'Failed to publish: ' + e.message;
this.status = '';