mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-09-20 01:56:33 +00:00
torrent active filename layout
This commit is contained in:
parent
380963fe94
commit
e3a570f7ab
@ -419,6 +419,10 @@ header.footer .header-content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.torrent video {
|
||||
|
||||
}
|
||||
|
||||
.torrent .details {
|
||||
background: var(--main-color);
|
||||
}
|
||||
|
@ -34,7 +34,11 @@ class Torrent extends Component {
|
||||
if (this.state.activeFilePath === file.path) {
|
||||
return base.find('video, audio').get(0).play();
|
||||
};
|
||||
this.setState({activeFilePath: file.path});
|
||||
let splitPath;
|
||||
if (!isVideo(file)) {
|
||||
splitPath = file.path.split('/');
|
||||
}
|
||||
this.setState({activeFilePath: file.path, splitPath});
|
||||
let autoplay, muted;
|
||||
if (clicked) {
|
||||
autoplay = true;
|
||||
@ -78,7 +82,11 @@ class Torrent extends Component {
|
||||
<a href="" onClick=${e => this.openTorrentClicked(e)}>Show attachment</a>
|
||||
`:''}
|
||||
${s.torrenting && !s.torrent ? html`<p>Loading attachment...</p>`:''}
|
||||
<p class="info">${s.activeFilePath}</p>
|
||||
<div class="info">
|
||||
${s.splitPath ? s.splitPath.map(
|
||||
(str, i) => i === s.splitPath.length - 1 ? html`<p><b>${str}</b></p>` : html`<p>${str}</p>`
|
||||
):''}
|
||||
</div>
|
||||
<div class="player"></div>
|
||||
<a href=${this.props.torrentId} style="margin-right:7px;">Magnet link</a>
|
||||
${t && t.files ? html`
|
||||
|
Loading…
Reference in New Issue
Block a user