Show torrent file name based on magnet URI
parent
c908fa8855
commit
37f7af3778
|
|
@ -1,5 +1,6 @@
|
||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
import magnet from 'magnet-uri';
|
||||||
import * as requestActions from '../../redux/requestActions';
|
import * as requestActions from '../../redux/requestActions';
|
||||||
import { saveAs } from 'file-saver/FileSaver';
|
import { saveAs } from 'file-saver/FileSaver';
|
||||||
import { client } from './FileSharing';
|
import { client } from './FileSharing';
|
||||||
|
|
@ -96,6 +97,8 @@ class FileChatEntry extends Component
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<p>A new file was shared.</p>
|
<p>A new file was shared.</p>
|
||||||
|
|
||||||
|
<p>{magnet.decode(this.props.message.file.magnet).dn}</p>
|
||||||
|
|
||||||
<button onClick={this.download}>
|
<button onClick={this.download}>
|
||||||
Download
|
Download
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -7912,11 +7912,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"magnet-uri": {
|
"magnet-uri": {
|
||||||
"version": "5.1.8",
|
"version": "5.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/magnet-uri/-/magnet-uri-5.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/magnet-uri/-/magnet-uri-5.2.3.tgz",
|
||||||
"integrity": "sha512-rHCJ81C3W2MuLpb4c3JKshQtCbRZhgeKKNYy1YFBtLR3eAB0FjQ5thfCo16w/+VF9yN5tJDtDq4NHPtf9a328A==",
|
"integrity": "sha512-INWVwcpWfZTVM+Yb4EXVBpm0FTd8Q98Fn5x7nuHv1hkFDRELgdIM+eJ3zYLbNTFpFPYtHs6B+sx8exs29IYwgA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.0.1",
|
|
||||||
"thirty-two": "^1.0.1",
|
"thirty-two": "^1.0.1",
|
||||||
"uniq": "^1.0.1",
|
"uniq": "^1.0.1",
|
||||||
"xtend": "^4.0.0"
|
"xtend": "^4.0.0"
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
"fscreen": "^1.0.2",
|
"fscreen": "^1.0.2",
|
||||||
"hark": "^1.2.2",
|
"hark": "^1.2.2",
|
||||||
"js-cookie": "^2.2.0",
|
"js-cookie": "^2.2.0",
|
||||||
|
"magnet-uri": "^5.2.3",
|
||||||
"marked": "^0.4.0",
|
"marked": "^0.4.0",
|
||||||
"mediasoup-client": "^2.1.1",
|
"mediasoup-client": "^2.1.1",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue