feat(torrents): show resource screenshots image on torrent detail page

This commit is contained in:
OldHawk
2018-05-30 20:59:25 +08:00
parent b3a40f5d65
commit b7b295b2db
4 changed files with 17 additions and 10 deletions

View File

@@ -1317,7 +1317,7 @@
* @returns {*}
*/
vm.getOverviewMarkedContent = function (c) {
return marked(c, {sanitize: true});
return marked(c, {sanitize: false});
};
/**

View File

@@ -112,7 +112,7 @@
.img-container {
display: none;
margin-top: 30px;
margin-top: 10px;
@media (min-width: @screen-md) {
margin-left: 60px;
}

View File

@@ -307,6 +307,13 @@
if (item && item.resource_detail_info) {
result = item.resource_detail_info.overview || item.resource_detail_info.detail || null;
if (item.screenshots_image && item.screenshots_image.length > 0) {
angular.forEach(item.screenshots_image, function (si) {
var str = '<br/>![' + si + '](' + si + ')';
result += str;
});
}
}
return result;
}

View File

@@ -178,10 +178,10 @@
<div id="top_of_overview" ng-if="vm.TGI.getTorrentOverview(vm.torrentLocalInfo)">
<dt class="h-line">{{ 'TMDB_FIELDS.OVERVIEW' | translate}}</dt>
<dd class="h-line">
<div ng-if="vm.torrentLocalInfo.torrent_type=='movie' || vm.torrentLocalInfo.torrent_type=='tvserial'">
{{vm.TGI.getTorrentOverview(vm.torrentLocalInfo)}}
</div>
<div ng-if="vm.torrentLocalInfo.torrent_type!='movie' && vm.torrentLocalInfo.torrent_type!='tvserial'">
<!--<div ng-if="vm.torrentLocalInfo.torrent_type=='movie' || vm.torrentLocalInfo.torrent_type=='tvserial'">-->
<!--{{vm.TGI.getTorrentOverview(vm.torrentLocalInfo)}}-->
<!--</div>-->
<div>
<div torrent-image-list="true"
img-container="img_container_{{vm.torrentLocalInfo._id}}"
img-click-event="vm.onImageClick(event)">
@@ -201,10 +201,6 @@
</div>
</dl>
<div id="img_container_{{vm.torrentLocalInfo._id}}" class="img-container">
<legend class="xsmall-legend strong-legend" translate="TMDB_FIELDS.IMAGE_OVERVIEW"></legend>
</div>
<div class="cast-list" ng-if="vm.torrentLocalInfo.resource_detail_info.credits.cast.length > 0">
<legend class="xsmall-legend strong-legend" translate="TMDB_FIELDS.CAST"></legend>
<div class="row">
@@ -222,6 +218,10 @@
</div>
</div>
</div>
<div id="img_container_{{vm.torrentLocalInfo._id}}" class="img-container">
<legend class="xsmall-legend strong-legend" translate="TMDB_FIELDS.IMAGE_OVERVIEW"></legend>
</div>
</div>
</div>
</div>