feat(torrents): show torrent file link in all list page

This commit is contained in:
OldHawk
2018-05-01 11:10:46 +08:00
parent 334dc39ed8
commit 1956d60e31
19 changed files with 18 additions and 17 deletions

View File

@@ -203,6 +203,7 @@
<div class="media-body">
<h5 class="media-heading">
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
<span torrent-file-link="item" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>

View File

@@ -117,6 +117,7 @@
<div class="media-body">
<h5 class="media-heading">
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
<span torrent-file-link="item" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>

View File

@@ -187,6 +187,7 @@
<div class="media-body">
<h5 class="media-heading">
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
<span torrent-file-link="item" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>

View File

@@ -336,19 +336,6 @@
vm.rssUrl += vm.filterSale ? '&torrent_sale=' + vm.filterSale : '';
};
/**
* makeTorrentFileLink
* @param item
*/
vm.makeTorrentFileLink = function (item) {
var link = vm.appConfig.domain;
link += '/api/torrents/download';
link += '/' + item._id;
link += '/' + vm.user.passkey;
return link;
};
/**
* clearAllCondition
*/

View File

@@ -190,6 +190,7 @@
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
<span class="upload-by" ng-show="item.user.displayName"> (By:
<span user-info="item.user" info-name></span> <span maker-info="item.maker"></span>)</span>
<span torrent-file-link="item" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>

View File

@@ -227,10 +227,7 @@
<div class="media-body">
<h5 class="media-heading">
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
<i class="fa fa-link color-mt-base torrent-file-link" aria-hidden="true" title="{{'COPY_LINK_TO_CLIPBOARD' | translate}}"
ng-click="$event.stopPropagation();"
mt-rotate-by-mouse="{duration: '.3s'}"
mt-copy-to-clipboard="{{vm.makeTorrentFileLink(item)}}"></i>
<span torrent-file-link="item" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>

View File

@@ -175,6 +175,7 @@
<div class="media-body">
<h5 class="media-heading">
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
<span torrent-file-link="item" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>

View File

@@ -14,6 +14,7 @@
vm.DLS = DownloadService;
vm.TGI = TorrentGetInfoServices;
vm.user = user;
vm.authUser = Authentication.user;
vm.RTS = ResourcesTagsServices;
vm.itemsPerPageConfig = MeanTorrentConfig.meanTorrentConfig.itemsPerPage;

View File

@@ -14,6 +14,7 @@
vm.DLS = DownloadService;
vm.TGI = TorrentGetInfoServices;
vm.user = user;
vm.authUser = Authentication.user;
vm.RTS = ResourcesTagsServices;
vm.itemsPerPageConfig = MeanTorrentConfig.meanTorrentConfig.itemsPerPage;

View File

@@ -16,6 +16,7 @@
vm.DLS = DownloadService;
vm.TGI = TorrentGetInfoServices;
vm.user = user;
vm.authUser = Authentication.user;
vm.RTS = ResourcesTagsServices;
vm.searchTags = [];

View File

@@ -67,6 +67,7 @@
<span class="upload-by" ng-show="item.torrent.user.displayName"> (By:
<span user-info="item.torrent.user" info-name></span> <span
maker-info="item.torrent.maker"></span>)</span>
<span torrent-file-link="item.torrent" torrent-user="vm.authUser" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent.torrent_filename | filename}}</div>

View File

@@ -67,6 +67,7 @@
<span class="upload-by" ng-show="item.torrent.user.displayName"> (By:
<span user-info="item.torrent.user" info-name></span> <span
maker-info="item.torrent.maker"></span>)</span>
<span torrent-file-link="item.torrent" torrent-user="vm.authUser" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent.torrent_filename | filename}}</div>

View File

@@ -60,6 +60,7 @@
<div class="media-body">
<h5 class="media-heading">
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
<span torrent-file-link="item" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>

View File

@@ -66,6 +66,7 @@
<span class="upload-by" ng-show="item.torrent.user.displayName"> (By:
<span user-info="item.torrent.user" info-name></span> <span
maker-info="item.torrent.maker"></span>)</span>
<span torrent-file-link="item.torrent" torrent-user="vm.authUser" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent.torrent_filename | filename}}</div>

View File

@@ -66,6 +66,7 @@
<a ui-sref="torrents.view({torrentId: item.torrent._id})">{{vm.TGI.getTorrentDoubleTitle(item.torrent)}}</a>
<span class="upload-by" ng-show="item.torrent.user.displayName"> (By:
<span user-info="item.torrent.user" info-name></span> <span maker-info="item.torrent.maker"></span>)</span>
<span torrent-file-link="item.torrent" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent.torrent_filename | filename}}</div>

View File

@@ -66,6 +66,7 @@
<a ui-sref="torrents.view({torrentId: item.torrent._id})">{{vm.TGI.getTorrentDoubleTitle(item.torrent)}}</a>
<span class="upload-by" ng-show="item.torrent.user.displayName"> (By:
<span user-info="item.torrent.user" info-name></span> <span maker-info="item.torrent.maker"></span>)</span>
<span torrent-file-link="item.torrent" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent.torrent_filename | filename}}</div>

View File

@@ -60,6 +60,7 @@
<div class="media-body">
<h5 class="media-heading">
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
<span torrent-file-link="item" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>

View File

@@ -57,6 +57,7 @@
<a ui-sref="torrents.view({torrentId: item.torrent._id})">{{vm.TGI.getTorrentDoubleTitle(item.torrent)}}</a>
<span class="upload-by" ng-show="item.torrent.user.displayName"> (By:
<span user-info="item.torrent.user" info-name></span> <span maker-info="item.torrent.maker"></span>)</span>
<span torrent-file-link="item.torrent" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent.torrent_filename | filename}}</div>

View File

@@ -223,6 +223,7 @@
<div class="media-body">
<h5 class="media-heading">
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
<span torrent-file-link="item" torrent-user="vm.user" info-class="color-mt-base"></span>
</h5>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>