diff --git a/modules/core/client/app/trans-string-en.js b/modules/core/client/app/trans-string-en.js index 5333c5a8..6bb1704b 100644 --- a/modules/core/client/app/trans-string-en.js +++ b/modules/core/client/app/trans-string-en.js @@ -477,8 +477,9 @@ TORRENTS_UPLOAD_FAILED: 'Failed to upload file', TORRENTS_NO_FILE_SELECTED: 'No file selected', BUTTON_UPLOADED_POPUP_CLOSE: 'OK', + BUTTON_UNSHOW_NEXT_TIME: 'I know, don`t show this next time', POPUP_UPLOADED_TOOLTIP: 'The torrent is uploaded successfully and is waiting for the administrator to review. The new torrent file with your Passkey will be automatically downloaded after you click the "OK" button, and you can use this new torrent file to start seeding.', - TORRENT_DOWNLOADING_FILENAME: 'Downloading file name:', + TORRENT_DOWNLOADING_FILENAME: 'Downloading file name: ', SELECT_RESOURCE_TYPE: '2. Please select the resource type', SELECT_TORRENT_FILE: '1. Please select the torrent file', diff --git a/modules/core/client/app/trans-string-zh.js b/modules/core/client/app/trans-string-zh.js index 6fad5d75..d4898eeb 100644 --- a/modules/core/client/app/trans-string-zh.js +++ b/modules/core/client/app/trans-string-zh.js @@ -477,8 +477,9 @@ TORRENTS_UPLOAD_FAILED: '文件上传失败', TORRENTS_NO_FILE_SELECTED: '请选择种子文件后再做尝试', BUTTON_UPLOADED_POPUP_CLOSE: '确定', - POPUP_UPLOADED_TOOLTIP: '种子上传成功并等待管理员的审核,带有您 Passkey 的种子文件会在您点击 "确定" 按钮后被自动下载,然后您就可以使用这个新的种子文件开始做种了。', - TORRENT_DOWNLOADING_FILENAME: '种子文件名:', + BUTTON_UNSHOW_NEXT_TIME: '我知道了,下次不用再提示了!', + POPUP_UPLOADED_TOOLTIP: '种子上传成功并等待管理员的审核,带有您 Passkey 的种子文件会在您点击 "确定" 按钮后被自动下载,然后您就可以使用这个自动下载的种子文件开始做种了。', + TORRENT_DOWNLOADING_FILENAME: '种子文件名: ', SELECT_RESOURCE_TYPE: '2. 请选择上传资源类型', SELECT_TORRENT_FILE: '1. 请选择种子文件', diff --git a/modules/torrents/client/controllers/uploads.client.controller.js b/modules/torrents/client/controllers/uploads.client.controller.js index eb0cf0a7..cbc639f3 100644 --- a/modules/torrents/client/controllers/uploads.client.controller.js +++ b/modules/torrents/client/controllers/uploads.client.controller.js @@ -7,11 +7,11 @@ TorrentsUploadController.$inject = ['$scope', '$state', '$translate', '$timeout', 'Authentication', 'MeanTorrentConfig', 'Upload', 'Notification', 'TorrentsService', 'getStorageLangService', '$filter', 'DownloadService', 'DebugConsoleService', 'NotifycationService', 'SideOverlay', - '$templateRequest', 'marked', '$rootScope']; + '$templateRequest', 'marked', '$rootScope', 'localStorageService']; function TorrentsUploadController($scope, $state, $translate, $timeout, Authentication, MeanTorrentConfig, Upload, Notification, TorrentsService, getStorageLangService, $filter, DownloadService, mtDebug, NotifycationService, SideOverlay, - $templateRequest, marked, $rootScope) { + $templateRequest, marked, $rootScope, localStorageService) { var vm = this; vm.announceConfig = MeanTorrentConfig.meanTorrentConfig.announce; vm.tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig; @@ -47,6 +47,7 @@ vm.videoNfo = ''; vm.customTorrent = {}; + $rootScope.uploadPopupNotShowNextTime = localStorageService.get('upload_popup_not_show_next_time'); $rootScope.announceConfig = vm.announceConfig; /** * document.ready @@ -62,7 +63,11 @@ blur: false, escape: false, closetransitionend: function () { - // Notification.success({message: ' Torrent created successfully!'}); + console.log($scope.uploadPopupNotShowNextTime); + if ($scope.uploadPopupNotShowNextTime) { + localStorageService.set('upload_popup_not_show_next_time', true); + } + if (vm.downloadingTorrent) { vm.downloadTorrent(vm.downloadingTorrent._id); } @@ -70,6 +75,11 @@ document.body.scrollTop = document.documentElement.scrollTop = 0; } }); + + if ($scope.uploadPopupNotShowNextTime) { + $('#uploaded_popup_wrapper').remove(); + $('#uploaded_popup_background').remove(); + } }); /** @@ -671,9 +681,13 @@ vm.showUploadedPopup = function (t) { vm.downloadingTorrent = t; $rootScope.downloadingTorrent = t; - $timeout(function () { - $('#uploaded_popup').popup('show'); - }, 10); + + $rootScope.uploadPopupNotShowNextTime = localStorageService.get('upload_popup_not_show_next_time'); + if (!$rootScope.uploadPopupNotShowNextTime) { + $timeout(function () { + $('#uploaded_popup').popup('show'); + }, 10); + } }; /** diff --git a/modules/torrents/client/less/torrents.less b/modules/torrents/client/less/torrents.less index 11ccf8f8..c64efb39 100644 --- a/modules/torrents/client/less/torrents.less +++ b/modules/torrents/client/less/torrents.less @@ -208,8 +208,8 @@ pre.prettyprint { width: 80%; top: 20%; border-radius: 4px; - h3, - .h3 { + h4, + .h4 { line-height: 1.6 !important; } } diff --git a/modules/torrents/client/views/uploads-torrents.client.view.html b/modules/torrents/client/views/uploads-torrents.client.view.html index 19fcb549..0c7938ee 100644 --- a/modules/torrents/client/views/uploads-torrents.client.view.html +++ b/modules/torrents/client/views/uploads-torrents.client.view.html @@ -1,8 +1,8 @@ -
+
-

+

@@ -775,14 +775,20 @@