diff --git a/modules/core/client/app/trans-string-en.js b/modules/core/client/app/trans-string-en.js index bcdb56f9..7faf21cf 100644 --- a/modules/core/client/app/trans-string-en.js +++ b/modules/core/client/app/trans-string-en.js @@ -306,11 +306,31 @@ RESET_PASSKEY_SUCCESSFULLY: 'Passkey reset successfully', RESET_PASSKEY_ERROR: 'Passkey reset failed', - //user account status + //user status STATUS_ACCOUNT: 'Account Status', STATUS_UPLOADED: 'Uploaded torrents', STATUS_SEEDING: 'Seeding torrents', STATUS_DOWNLOADING: 'Downloading torrents', + STATUS_FIELD: { + PICTURE: 'Profile picture', + USERNAME: 'Username', + FIRST_NAME: 'First name', + LAST_NAME: 'Last name', + DISPLAY_NAME: 'Display name', + EMAIL: 'Email', + PASSKEY: 'Passkey', + VIP_START_AT: 'Vip start at', + VIP_END_AT: 'Vip end at', + UPLOADED: 'Total uploaded', + DOWNLOADED: 'Total downloaded', + RATIO: 'Total ratio', + SCORE: 'Total score', + SEEDED: 'Seeded', + LEECHED: 'Leeched', + FINISHED: 'Finished', + DETAIL: 'Detail' + }, + //user message box MESSAGES_INBOX: 'Messages Inbox', //chat view diff --git a/modules/core/client/app/trans-string-zh.js b/modules/core/client/app/trans-string-zh.js index c1d0fa28..1fd6bd11 100644 --- a/modules/core/client/app/trans-string-zh.js +++ b/modules/core/client/app/trans-string-zh.js @@ -306,11 +306,32 @@ RESET_PASSKEY_SUCCESSFULLY: 'Passkey 重置成功', RESET_PASSKEY_ERROR: 'Passkey 重置失败', - //user account status + //user status STATUS_ACCOUNT: '帐户状态', STATUS_UPLOADED: '我上传的种子', STATUS_SEEDING: '正在做种的种子', STATUS_DOWNLOADING: '正在下载的种子', + STATUS_FIELD: { + PICTURE: '头像', + USERNAME: '用户名', + FIRST_NAME: '姓', + LAST_NAME: '名', + DISPLAY_NAME: '显示昵称', + EMAIL: '邮箱', + PASSKEY: 'Passkey', + VIP_START_AT: 'Vip 资格开始于', + VIP_END_AT: 'Vip 资格结束于', + UPLOADED: '总上传量', + DOWNLOADED: '总下载量', + RATIO: '总分享率', + SCORE: '总积分', + SEEDED: '正在做种', + LEECHED: '正在下载', + FINISHED: '下载完成', + DETAIL: '详情' + }, + + //user message box MESSAGES_INBOX: '消息收件箱', //chat view diff --git a/modules/core/client/less/mt.less b/modules/core/client/less/mt.less index dccfcbca..2d7ecd6e 100644 --- a/modules/core/client/less/mt.less +++ b/modules/core/client/less/mt.less @@ -223,6 +223,16 @@ body { } } +.torrent-up { + color: #33CC00; +} +.torrent-down { + color: #FF3300; +} +.torrent-finished { + color: #0366d6; +} + .hide-on-sm { @media (max-width: @screen-md-min) { display: none; @@ -631,6 +641,7 @@ body { .tab-status { .nav-tabs { > li { + cursor: pointer; > a { margin-right: 5px; padding: 10px 30px; @@ -797,3 +808,24 @@ body { color: #888; font-size: 12px; } + +.status-avatar { + border-radius: 3px; + height: 44px; + width: 44px; +} + +.status-divider { + height: 1px; + overflow: hidden; + background-color: #e5e5e5; + margin: 8px 0; +} + +.ratio-normal { + color: #0000cc; +} + +.ratio-warning { + color: #FF0000; +} diff --git a/modules/users/client/controllers/status/status.client.controller.js b/modules/users/client/controllers/status/status.client.controller.js new file mode 100644 index 00000000..de4656ce --- /dev/null +++ b/modules/users/client/controllers/status/status.client.controller.js @@ -0,0 +1,24 @@ +(function () { + 'use strict'; + + angular + .module('users') + .controller('StatusController', StatusController); + + StatusController.$inject = ['$scope', '$state', '$translate', '$timeout', 'Authentication', 'Notification', 'TorrentsService', + 'MeanTorrentConfig', '$window']; + + function StatusController($scope, $state, $translate, $timeout, Authentication, Notification, TorrentsService, MeanTorrentConfig, + $window) { + var vm = this; + vm.user = Authentication.user; + + /** + * If user is not signed in then redirect back home + */ + if (!Authentication.user) { + $state.go('authentication.signin'); + } + + } +}()); diff --git a/modules/users/client/views/status/account.client.view.html b/modules/users/client/views/status/account.client.view.html index 20cf1396..8f3b4154 100644 --- a/modules/users/client/views/status/account.client.view.html +++ b/modules/users/client/views/status/account.client.view.html @@ -1,7 +1,79 @@ -
-
+
+
+
+
{{ 'STATUS_FIELD.PICTURE' | translate}}:
+
+ +
+
{{ 'STATUS_FIELD.USERNAME' | translate}}:
+
{{ vm.user.username }}
+ + + + + + + +
{{ 'STATUS_FIELD.DISPLAY_NAME' | translate}}:
+
{{ vm.user.displayName }}
+ +
{{ 'STATUS_FIELD.EMAIL' | translate}}:
+
{{ vm.user.email }}
+ +
{{ 'STATUS_FIELD.PASSKEY' | translate}}:
+
{{ vm.user.passkey }}
+ +
+
+ {{ 'EDIT_PROFILE' | translate }} | + {{ 'BUTTON_DNATE' | translate }} +
+ +
  • + +
    +
    {{ 'STATUS_FIELD.VIP_START_AT' | translate}}:
    +
    {{ vm.user.vip_start_at | date: 'yyyy-MM-dd HH:mm:ss' }}
    + +
    {{ 'STATUS_FIELD.VIP_END_AT' | translate}}:
    +
    {{ vm.user.vip_end_at | date: 'yyyy-MM-dd HH:mm:ss' }}
    + +
  • +
    + +
    {{ 'STATUS_FIELD.UPLOADED' | translate}}:
    +
    + + {{ vm.user.uploaded | bytes:2 }} +
    + +
    {{ 'STATUS_FIELD.DOWNLOADED' | translate}}:
    +
    + + {{ vm.user.downloaded | bytes:2 }} +
    + +
    {{ 'STATUS_FIELD.RATIO' | translate}}:
    +
    {{ vm.user.ratio }}
    + +
    {{ 'STATUS_FIELD.SCORE' | translate}}:
    +
    {{ vm.user.score }}
    + +
  • + +
    {{ 'STATUS_FIELD.SEEDED' | translate}}:
    +
    {{ vm.user.seeded }} {{ 'STATUS_FIELD.DETAIL' | translate }}
    + +
    {{ 'STATUS_FIELD.LEECHED' | translate}}:
    +
    {{ vm.user.leeched }} {{ 'STATUS_FIELD.DETAIL' | translate }}
    + +
    {{ 'STATUS_FIELD.FINISHED' | translate}}:
    +
    {{ vm.user.finished }}
    + +
  • +
    diff --git a/modules/users/client/views/status/downloading.client.view.html b/modules/users/client/views/status/downloading.client.view.html index 20cf1396..c9d6ae64 100644 --- a/modules/users/client/views/status/downloading.client.view.html +++ b/modules/users/client/views/status/downloading.client.view.html @@ -1,4 +1,4 @@ -
    +
    diff --git a/modules/users/client/views/status/seeding.client.view.html b/modules/users/client/views/status/seeding.client.view.html index 20cf1396..c9d6ae64 100644 --- a/modules/users/client/views/status/seeding.client.view.html +++ b/modules/users/client/views/status/seeding.client.view.html @@ -1,4 +1,4 @@ -
    +
    diff --git a/modules/users/client/views/status/status.client.view.html b/modules/users/client/views/status/status.client.view.html index 346672ac..0f5955bd 100644 --- a/modules/users/client/views/status/status.client.view.html +++ b/modules/users/client/views/status/status.client.view.html @@ -1,11 +1,23 @@ -
    +
    diff --git a/modules/users/client/views/status/uploaded.client.view.html b/modules/users/client/views/status/uploaded.client.view.html index 20cf1396..c9d6ae64 100644 --- a/modules/users/client/views/status/uploaded.client.view.html +++ b/modules/users/client/views/status/uploaded.client.view.html @@ -1,4 +1,4 @@ -
    +