feat(torrents): add tip for copy torrent file link to clipboard

This commit is contained in:
OldHawk
2018-04-30 20:25:56 +08:00
parent 112a813848
commit 82e563aab5
4 changed files with 5 additions and 2 deletions

View File

@@ -345,6 +345,7 @@
DESC_MAKE_RSS_URL: 'This RSS url is make with above filter conditions, you can used it in the BT client (such as uTorrent) that supports the RSS subscription function to download torrent and resources automatic.',
COPY_TO_CLIPBOARD: 'Copy to clipboard',
COPY_LINK_TO_CLIPBOARD: 'Copy torrent file download link to clipboard',
COPY_TO_CLIPBOARD_SUCCESSFULLY: 'Copy data to clipboard successfully!',
PH_KEYWORD: 'Search keyword',
CLEAR_ALL_CONDITION: 'Clear All Condition',
MORE_TAGS: 'More Tags',

View File

@@ -345,6 +345,7 @@
DESC_MAKE_RSS_URL: '这个 RSS 地址是通过上面的过滤条件生成的,您可以使用支持 RSS 订阅功能的BT客户端如uTorrent来自动下载您想要的这些种子和资源文件.',
COPY_TO_CLIPBOARD: '复制到剪切板',
COPY_LINK_TO_CLIPBOARD: '复制种子文件下载连接到剪切板',
COPY_TO_CLIPBOARD_SUCCESSFULLY: '内容已复制到剪切板!',
PH_KEYWORD: '搜索关键字',
CLEAR_ALL_CONDITION: '清空所有条件',
MORE_TAGS: '显示更多标签',

View File

@@ -21,12 +21,13 @@ angular
};
}])
.directive('mtCopyToClipboard', ['mtCopy', function (mtCopy) {
.directive('mtCopyToClipboard', ['mtCopy', 'NotifycationService', function (mtCopy, NotifycationService) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
element.bind('click', function (e) {
mtCopy(attrs.mtCopyToClipboard);
NotifycationService.showNotify('info', '', 'COPY_TO_CLIPBOARD_SUCCESSFULLY');
});
}
};

View File

@@ -229,7 +229,7 @@
<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="{scale: 2, duration: '.3s'}"
mt-rotate-by-mouse="{duration: '.3s'}"
mt-copy-to-clipboard="{{vm.makeTorrentFileLink(item)}}"></i>
</h5>