Close photo upload window, show toast when published
This commit is contained in:
@@ -551,7 +551,10 @@ export default class PlaceDetails extends Component {
|
|||||||
|
|
||||||
{{#if this.isPhotoUploadModalOpen}}
|
{{#if this.isPhotoUploadModalOpen}}
|
||||||
<Modal @onClose={{this.closePhotoUploadModal}}>
|
<Modal @onClose={{this.closePhotoUploadModal}}>
|
||||||
<PlacePhotoUpload @place={{this.saveablePlace}} />
|
<PlacePhotoUpload
|
||||||
|
@place={{this.saveablePlace}}
|
||||||
|
@onClose={{this.closePhotoUploadModal}}
|
||||||
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|||||||
@@ -183,11 +183,16 @@ export default class PlacePhotoUpload extends Component {
|
|||||||
const event = await factory.sign(template);
|
const event = await factory.sign(template);
|
||||||
await this.nostrRelay.publish(event);
|
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
|
// Clear out the files so user can upload more or be done
|
||||||
this.files = [];
|
this.files = [];
|
||||||
this.uploadedPhotos = [];
|
this.uploadedPhotos = [];
|
||||||
|
|
||||||
|
if (this.args.onClose) {
|
||||||
|
this.args.onClose();
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.error = 'Failed to publish: ' + e.message;
|
this.error = 'Failed to publish: ' + e.message;
|
||||||
this.status = '';
|
this.status = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user