mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-04 14:29:05 +02:00
feat(torrents): set upload button disabled status when submit on torrent upload page
This commit is contained in:
2
config/env/torrents.js
vendored
2
config/env/torrents.js
vendored
@@ -1160,7 +1160,7 @@ module.exports = {
|
||||
* @resourcesLanguage: settings for language of dropdown resource info
|
||||
*/
|
||||
tmdbConfig: {
|
||||
key: 'this is access key from tmdb',
|
||||
key: '7888f0042a366f63289ff571b68b7ce0',
|
||||
tmdbHome: 'https://www.themoviedb.org',
|
||||
tmdbMovieLinkUrl: 'https://www.themoviedb.org/movie/',
|
||||
tmdbTvserialLinkUrl: 'https://www.themoviedb.org/tv/',
|
||||
|
||||
@@ -537,7 +537,7 @@
|
||||
TORRENTS_SUBMIT_UPLOAD: '8. Agree the rules and submit your resources',
|
||||
SUBMIT_BUTTON: 'OK, SUBMIT NOW',
|
||||
CANCEL_BUTTON: 'NO, CANCEL IT',
|
||||
AGREE_RULES: 'I agree and already read all the rules, <a href="/about/rules">read here</a>',
|
||||
AGREE_RULES: 'I agree and already read all the rules, <a href="/about/manual/userRules">read here</a>',
|
||||
DOWNLOAD_TORRENT: 'Download Torrent',
|
||||
|
||||
ENTER_MUSIC_TITLE: '3. Please enter the artist name and music/album title',
|
||||
|
||||
@@ -537,7 +537,7 @@
|
||||
TORRENTS_SUBMIT_UPLOAD: '8. 同意上传协议,并提交',
|
||||
SUBMIT_BUTTON: '已备妥,现在提交',
|
||||
CANCEL_BUTTON: '算了,以后再说',
|
||||
AGREE_RULES: '我已阅读并同意站内所有协议条款,<a href="/about/rules">协议条款</a>',
|
||||
AGREE_RULES: '我已阅读并同意站内所有协议条款,<a href="/about/manual/userRules">协议条款</a>',
|
||||
DOWNLOAD_TORRENT: '下载种子',
|
||||
|
||||
ENTER_MUSIC_TITLE: '3. 请输入艺人名称和音乐/专辑标题',
|
||||
|
||||
@@ -491,6 +491,8 @@
|
||||
* createMovieTorrent
|
||||
*/
|
||||
vm.createMovieTorrent = function () {
|
||||
vm.isCreating = true;
|
||||
|
||||
var l = vm.getTorrentSize();
|
||||
var t = vm.getResourceTag();
|
||||
|
||||
@@ -517,10 +519,12 @@
|
||||
});
|
||||
|
||||
function successCallback(res) {
|
||||
vm.isCreating = false;
|
||||
vm.showUploadedPopup(res);
|
||||
}
|
||||
|
||||
function errorCallback(res) {
|
||||
vm.isCreating = false;
|
||||
vm.error_msg = res.data.message;
|
||||
Notification.error({message: res.data.message, title: '<i class="glyphicon glyphicon-remove"></i> Torrent created error!'});
|
||||
}
|
||||
@@ -530,6 +534,8 @@
|
||||
* createTvTorrent
|
||||
*/
|
||||
vm.createTVTorrent = function () {
|
||||
vm.isCreating = true;
|
||||
|
||||
var l = vm.getTorrentSize();
|
||||
var t = vm.getResourceTag();
|
||||
|
||||
@@ -558,10 +564,12 @@
|
||||
});
|
||||
|
||||
function successCallback(res) {
|
||||
vm.isCreating = false;
|
||||
vm.showUploadedPopup(res);
|
||||
}
|
||||
|
||||
function errorCallback(res) {
|
||||
vm.isCreating = false;
|
||||
vm.error_msg = res.data.message;
|
||||
Notification.error({message: res.data.message, title: '<i class="glyphicon glyphicon-remove"></i> Torrent created error!'});
|
||||
}
|
||||
@@ -571,6 +579,8 @@
|
||||
* createCustomTorrentTorrent
|
||||
*/
|
||||
vm.createCustomTorrentTorrent = function () {
|
||||
vm.isCreating = true;
|
||||
|
||||
var l = vm.getTorrentSize();
|
||||
var t = vm.getResourceTag();
|
||||
|
||||
@@ -620,10 +630,12 @@
|
||||
});
|
||||
|
||||
function successCallback(res) {
|
||||
vm.isCreating = false;
|
||||
vm.showUploadedPopup(res);
|
||||
}
|
||||
|
||||
function errorCallback(res) {
|
||||
vm.isCreating = false;
|
||||
vm.error_msg = res.data.message;
|
||||
Notification.error({message: res.data.message, title: '<i class="glyphicon glyphicon-remove"></i> Torrent created error!'});
|
||||
}
|
||||
|
||||
@@ -94,9 +94,13 @@
|
||||
</div>
|
||||
<div class="col-sm-4 col-sm-offset-4">
|
||||
<button class="btn btn-lg btn-block btn-success" ng-click="vm.create()"
|
||||
ng-disabled="!vm.agreeRules">{{ 'SUBMIT_BUTTON' | translate}}
|
||||
ng-disabled="!vm.agreeRules || vm.isCreating">
|
||||
<i class="fa fa-spinner fa-spin"
|
||||
ng-if="vm.isCreating"></i> {{ 'SUBMIT_BUTTON' | translate}}
|
||||
</button>
|
||||
<button class="btn btn-lg btn-block btn-warning" ng-click="vm.cancel()">{{ 'CANCEL_BUTTON' | translate}}
|
||||
<button class="btn btn-lg btn-block btn-warning"
|
||||
ng-disabled="vm.isCreating"
|
||||
ng-click="vm.cancel()">{{ 'CANCEL_BUTTON' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-10 text-center">
|
||||
|
||||
Reference in New Issue
Block a user