Skip to content

Commit

Permalink
modify uploads function
Browse files Browse the repository at this point in the history
  • Loading branch information
taobataoma committed Apr 1, 2017
1 parent e2ec5b7 commit a661e09
Show file tree
Hide file tree
Showing 12 changed files with 297 additions and 31 deletions.
3 changes: 2 additions & 1 deletion config/assets/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module.exports = {
// bower:css
'public/lib/bootstrap/dist/css/bootstrap.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.css',
'public/lib/angular-ui-notification/dist/angular-ui-notification.css'
'public/lib/angular-ui-notification/dist/angular-ui-notification.css',
'public/lib/Ionicons/css/ionicons.css'
// endbower
],
js: [
Expand Down
1 change: 1 addition & 0 deletions config/assets/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
'public/lib/angular-ui-notification/dist/angular-ui-notification.min.css',
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
'public/lib/Ionicons/css/ionicons.min.css'
// endbower
],
js: [
Expand Down
2 changes: 1 addition & 1 deletion config/env/torrents.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = {
{name: 'INDIA', icon: ''},
{name: 'ARAB', icon: ''}
]
},
}
],
checkbox: [
{
Expand Down
71 changes: 70 additions & 1 deletion modules/core/client/app/trans-string-cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@
TMDB_ID_REQUIRED: '请输入 TMDB ID',
TMDB_MOVIE_INFO: 'TMDB 视频信息',
TMDB_IS_LOADING: '正在检索视频信息,请稍候...',
SELECT_TAGS: '请为资源选择合适的标签',
TORRENTS_SUBMIT_UPLOADS: '同意上传协议,并提交',
SUBMIT_BUTTON: '已备妥,现在提交',
AGREE_RULES: '我已阅读并同意站内所有协议条款,<a href="#">协议条款</a>',

//footer view
MIT_PROTOCOL: '本项目源码受 <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a> 开源协议保护',
GIT_REPO: 'Power by &copy;meanTottent,<a href="https://github.com/taobataoma/meanTorrent" target="_blank">GitHub 源码仓库</a>',

///////////////////////the movie db fields////////////////////////////////
TMDB_FIELDS: {
Expand Down Expand Up @@ -102,8 +109,70 @@
VOTE_UNIT: '人',
BACKDROP_PATH: '背景海报',
POSTER_PATH: '海报',

CAST: '主演:'
},

/////////////////////////resources tag fields///////////////////////////////////
RESOURCESTAGS: {
TYPE: {
SELF: '类型',
BLU_RAY: 'BLU_RAY',
REMUX: 'REMUX',
ENCODE: 'ENCODE'
},

RESOLUTION: {
SELF: '解析度',
S4K: '4K',
S1080P: '1080P',
S720P: '720P'
},

VIDEO: {
SELF: '视频编码',
AVC: 'AVC',
X265: 'X265',
X264: 'X264'
},

AUDIO: {
SELF: '音频编码',
AAC: 'AAC',
DTS: 'DTS',
DTS_HD: 'DTS HD',
ATMOS_TRUEHD: 'Atmos TrueHD'
},

THREED: {
SELF: '2D/3D',
T2D: '2D',
T3D: '3D',
T2D_3D: '2D-3D'
},

RANKING: {
SELF: '排行榜',
IMDB_TOP100: 'IMDB TOP100',
IMDB_TOP250: 'IMDB TOP250',
DOUBAN_TOP100: '豆瓣 TOP100',
DOUBAN_TOP250: '豆瓣 TOP250'
},

REGION: {
SELF: '地区',
CHINA: '中国',
JAPAN: '日本',
KOREA: '韩国',
INDIA: '印度',
ARAB: '阿拉伯'
},

MODIFY: {
SELF: '后期编辑',
DIY: 'DIY',
GUOPEI: '国配',
ZHONGZI: '中字'
}
}
};

Expand Down
71 changes: 70 additions & 1 deletion modules/core/client/app/trans-string-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@
TMDB_ID_REQUIRED: 'Please enter TMDB ID',
TMDB_MOVIE_INFO: 'The movie info from TMDB',
TMDB_IS_LOADING: 'Loading the movie info, please wait...',
SELECT_TAGS: 'Please select any tags for the resources',
TORRENTS_SUBMIT_UPLOADS: 'Agree the rules and submit your resources',
SUBMIT_BUTTON: 'OK, SUBMIT NOW',
AGREE_RULES: 'I agree and already read all the rules, <a href="#">read here</a>',

//footer view
MIT_PROTOCOL: 'The source of this project is protected by <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a> open source protocol',
GIT_REPO: 'Power by &copy;meanTottent,<a href="https://github.com/taobataoma/meanTorrent" target="_blank">view on GitHub</a>',

///////////////////////the movie db fields////////////////////////////////
TMDB_FIELDS: {
Expand Down Expand Up @@ -102,8 +109,70 @@
VOTE_UNIT: 'users',
BACKDROP_PATH: 'backdrop_path',
POSTER_PATH: 'poster_path',

CAST: 'cast:'
},

/////////////////////////resources tag fields///////////////////////////////////
RESOURCESTAGS: {
TYPE: {
SELF: 'Type',
BLU_RAY: 'BLU_RAY',
REMUX: 'REMUX',
ENCODE: 'ENCODE'
},

RESOLUTION: {
SELF: 'Resolution',
S4K: '4K',
S1080P: '1080P',
S720P: '720P'
},

VIDEO: {
SELF: 'Video Codec',
AVC: 'AVC',
X265: 'X265',
X264: 'X264'
},

AUDIO: {
SELF: 'Audio Codec',
AAC: 'AAC',
DTS: 'DTS',
DTS_HD: 'DTS HD',
ATMOS_TRUEHD: 'Atmos TrueHD'
},

THREED: {
SELF: '2D/3D',
T2D: '2D',
T3D: '3D',
T2D_3D: '2D-3D'
},

RANKING: {
SELF: 'Ranking',
IMDB_TOP100: 'IMDB TOP100',
IMDB_TOP250: 'IMDB TOP250',
DOUBAN_TOP100: 'Douban TOP100',
DOUBAN_TOP250: 'Douban TOP250'
},

REGION: {
SELF: 'Region',
CHINA: 'China',
JAPAN: 'Japan',
KOREA: 'Korea',
INDIA: 'India',
ARAB: 'Arab'
},

MODIFY: {
SELF: 'Modify',
DIY: 'DIY',
GUOPEI: 'Mandarin',
ZHONGZI: 'Chinese Subtitle'
}
}
};

Expand Down
26 changes: 26 additions & 0 deletions modules/core/client/css/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,32 @@ a:hover .header-profile-image {
line-height: 2;
}

.dl-horizontal .h-line .tradio {
margin-top: 6px;
}

.dl-horizontal .h-line .radio-inline {
min-width: 100px;
}

.dl-horizontal .h-line .tcheckbox {
margin-top: 8px;
}

.dl-horizontal .h-line .checkbox-inline {
min-width: 150px;
}

.cast-xs-info {
font-size: 10px;
}

.view-footer{
color: #aaa;
font-size: 12px;
}

.view-footer .icon {
font-size: 20px;
margin-right: 15px;
}
10 changes: 8 additions & 2 deletions modules/core/client/views/footer.client.view.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<div class="container-fluid" style="background-color: #2a2730; padding-top: 30px; padding-bottom: 30px; margin-top: 150px;">
<div class="container">
<div class="row">
<div class="col-sm-8 col-sm-offset-2 myfooter">
<div class="row view-footer">
<div class="col-sm-7 col-sm-offset-1">
<ul>
<li translate="GIT_REPO"></li>
<li translate="MIT_PROTOCOL"></li>
</ul>
</div>
<div class="col-sm-3 text-right">
<i class="icon ion-social-github"></i>
<i class="icon ion-social-nodejs"></i>
<i class="icon ion-social-html5-outline"></i>
<i class="icon ion-social-css3-outline"></i>
</div>
</div>
</div>
</div>
3 changes: 2 additions & 1 deletion modules/core/server/controllers/core.server.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ exports.renderIndex = function (req, res) {
res.render('modules/core/server/views/index', {
user: JSON.stringify(safeUserObject),
sharedConfig: JSON.stringify(config.shared),
announce: JSON.stringify(config.announce)
announce: JSON.stringify(config.announce),
resourcesTags: JSON.stringify(config.resourcesTags)
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
.controller('TorrentsUploadsController', TorrentsUploadsController);

TorrentsUploadsController.$inject = ['$scope', '$state', '$translate', '$timeout', 'Authentication', 'AnnounceConfig', 'Upload', 'Notification',
'TorrentsService'];
'TorrentsService', 'ResourcesTagsConfig'];

function TorrentsUploadsController($scope, $state, $translate, $timeout, Authentication, AnnounceConfig, Upload, Notification,
TorrentsService) {
TorrentsService, ResourcesTagsConfig) {
var vm = this;
vm.announce = AnnounceConfig.announce;
vm.resourcesTags = ResourcesTagsConfig.resourcesTags;
vm.rule_items = [];
vm.movieinfoarray = [];
vm.user = Authentication.user;
Expand Down Expand Up @@ -122,7 +123,7 @@
// vm.movieinfoarray.push(nv);
// }
//}
console.log(vm.movieinfo);
//console.log(vm.movieinfo);
}, function (err) {
vm.tmdb_info_ok = false;
vm.tmdb_isloading = false;
Expand Down
19 changes: 19 additions & 0 deletions modules/torrents/client/services/resources-tags.client.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(function () {
'use strict';

// Authentication service for user variables

angular
.module('torrents.services')
.factory('ResourcesTagsConfig', ResourcesTagsConfig);

ResourcesTagsConfig.$inject = ['$window'];

function ResourcesTagsConfig($window) {
var config = {
resourcesTags: $window.resourcesTags
};

return config;
}
}());
Loading

0 comments on commit a661e09

Please sign in to comment.