Wire up attachment saving

This commit is contained in:
Daniel Gasienica 2018-04-15 00:42:43 -04:00
parent 593976fe21
commit 86da80fd23
2 changed files with 5 additions and 5 deletions

View file

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

View file

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