Wire up attachment saving

pull/1/head
Daniel Gasienica 7 years ago
parent 593976fe21
commit 86da80fd23

@ -119,13 +119,13 @@
const props = { const props = {
imageURL: this.objectUrl, imageURL: this.objectUrl,
save: () => this.saveFile(),
// implicit: `close`
}; };
this.lightboxView = new Whisper.ReactWrapperView({ this.lightboxView = new Whisper.ReactWrapperView({
Component: Signal.Components.Lightbox, Component: Signal.Components.Lightbox,
props, props,
onClose: () => { onClose: () => Signal.Backbone.Views.Lightbox.hide(),
Signal.Backbone.Views.Lightbox.hide();
},
}); });
Signal.Backbone.Views.Lightbox.show(this.lightboxView.el); Signal.Backbone.Views.Lightbox.show(this.lightboxView.el);
}, },

@ -7,7 +7,7 @@ import classNames from 'classnames';
interface Props { interface Props {
imageURL?: string; imageURL?: string;
onClose: () => void; save: () => void;
close: () => void; close: () => void;
} }
@ -64,7 +64,7 @@ export class Lightbox extends React.Component<Props, {}> {
</div> </div>
<div style={styles.controls}> <div style={styles.controls}>
<IconButton type="close" onClick={this.props.close} /> <IconButton type="close" onClick={this.props.close} />
<IconButton type="save" /> <IconButton type="save" onClick={this.props.save} />
</div> </div>
</div> </div>
); );

Loading…
Cancel
Save