Migrating schema pt2
This commit is contained in:
parent
10dd0c8167
commit
90d5d23e44
@ -55,7 +55,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
|
|
||||||
$scope.credentials = {phone_country: '', phone_country_name: '', phone_number: '', phone_full: ''};
|
$scope.credentials = {phone_country: '', phone_country_name: '', phone_number: '', phone_full: ''};
|
||||||
$scope.progress = {};
|
$scope.progress = {};
|
||||||
$scope.callPending = {};
|
$scope.nextPending = {};
|
||||||
$scope.about = {};
|
$scope.about = {};
|
||||||
|
|
||||||
$scope.chooseCountry = function () {
|
$scope.chooseCountry = function () {
|
||||||
@ -158,38 +158,20 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
initPhoneCountry();
|
initPhoneCountry();
|
||||||
|
|
||||||
|
|
||||||
var callTimeout;
|
var nextTimeout;
|
||||||
var updatePasswordTimeout = false;
|
var updatePasswordTimeout = false;
|
||||||
|
|
||||||
function saveAuth (result) {
|
function saveAuth (result) {
|
||||||
MtpApiManager.setUserAuth(options.dcID, {
|
MtpApiManager.setUserAuth(options.dcID, {
|
||||||
id: result.user.id
|
id: result.user.id
|
||||||
});
|
});
|
||||||
$timeout.cancel(callTimeout);
|
$timeout.cancel(nextTimeout);
|
||||||
|
|
||||||
$location.url('/im');
|
$location.url('/im');
|
||||||
};
|
};
|
||||||
|
|
||||||
function callCheck () {
|
|
||||||
$timeout.cancel(callTimeout);
|
|
||||||
if ($scope.credentials.viaApp) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!(--$scope.callPending.remaining)) {
|
|
||||||
$scope.callPending.success = false;
|
|
||||||
MtpApiManager.invokeApi('auth.sendCall', {
|
|
||||||
phone_number: $scope.credentials.phone_full,
|
|
||||||
phone_code_hash: $scope.credentials.phone_code_hash
|
|
||||||
}, options).then(function () {
|
|
||||||
$scope.callPending.success = true;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
callTimeout = $timeout(callCheck, 1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.sendCode = function () {
|
$scope.sendCode = function () {
|
||||||
$timeout.cancel(callTimeout);
|
$timeout.cancel(nextTimeout);
|
||||||
|
|
||||||
ErrorService.confirm({
|
ErrorService.confirm({
|
||||||
type: 'LOGIN_PHONE_CORRECT',
|
type: 'LOGIN_PHONE_CORRECT',
|
||||||
@ -204,26 +186,18 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
|
|
||||||
var authKeyStarted = tsNow();
|
var authKeyStarted = tsNow();
|
||||||
MtpApiManager.invokeApi('auth.sendCode', {
|
MtpApiManager.invokeApi('auth.sendCode', {
|
||||||
|
flags: 0,
|
||||||
phone_number: $scope.credentials.phone_full,
|
phone_number: $scope.credentials.phone_full,
|
||||||
sms_type: 5,
|
|
||||||
api_id: Config.App.id,
|
api_id: Config.App.id,
|
||||||
api_hash: Config.App.hash,
|
api_hash: Config.App.hash,
|
||||||
lang_code: navigator.language || 'en'
|
lang_code: navigator.language || 'en'
|
||||||
}, options).then(function (sentCode) {
|
}, options).then(function (sentCode) {
|
||||||
$scope.progress.enabled = false;
|
$scope.progress.enabled = false;
|
||||||
|
|
||||||
$scope.credentials.phone_code_hash = sentCode.phone_code_hash;
|
|
||||||
$scope.credentials.phone_occupied = sentCode.phone_registered;
|
|
||||||
$scope.credentials.viaApp = sentCode._ == 'auth.sentAppCode';
|
|
||||||
$scope.callPending.remaining = sentCode.send_call_timeout || 60;
|
|
||||||
$scope.error = {};
|
$scope.error = {};
|
||||||
$scope.about = {};
|
$scope.about = {};
|
||||||
|
$scope.credentials.phone_code_hash = sentCode.phone_code_hash;
|
||||||
callCheck();
|
applySentCode(sentCode);
|
||||||
|
|
||||||
onContentLoaded(function () {
|
|
||||||
$scope.$broadcast('ui_height');
|
|
||||||
});
|
|
||||||
|
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
$scope.progress.enabled = false;
|
$scope.progress.enabled = false;
|
||||||
@ -246,28 +220,71 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.sendSms = function () {
|
function applySentCode(sentCode) {
|
||||||
if (!$scope.credentials.viaApp) {
|
$scope.credentials.type = sentCode.type;
|
||||||
|
$scope.nextPending.type = sentCode.next_type || false;
|
||||||
|
$scope.nextPending.remaining = sentCode.timeout || false;
|
||||||
|
|
||||||
|
nextTimeoutCheck();
|
||||||
|
|
||||||
|
onContentLoaded(function () {
|
||||||
|
$scope.$broadcast('ui_height');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.sendNext = function () {
|
||||||
|
if (!$scope.nextPending.type ||
|
||||||
|
$scope.nextPending.remaining > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
delete $scope.credentials.viaApp;
|
MtpApiManager.invokeApi('auth.resendCode', {
|
||||||
MtpApiManager.invokeApi('auth.sendSms', {
|
|
||||||
phone_number: $scope.credentials.phone_full,
|
phone_number: $scope.credentials.phone_full,
|
||||||
phone_code_hash: $scope.credentials.phone_code_hash
|
phone_code_hash: $scope.credentials.phone_code_hash
|
||||||
}, options).then(callCheck);
|
}, options).then(applySentCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
function nextTimeoutCheck () {
|
||||||
|
$timeout.cancel(nextTimeout);
|
||||||
|
if (!$scope.nextPending.type ||
|
||||||
|
$scope.nextPending.remaining === false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!(--$scope.nextPending.remaining)) {
|
||||||
|
$scope.nextPending.success = false;
|
||||||
|
$scope.sendNext();
|
||||||
|
} else {
|
||||||
|
nextTimeout = $timeout(nextTimeoutCheck, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.editPhone = function () {
|
$scope.editPhone = function () {
|
||||||
$timeout.cancel(callTimeout);
|
$timeout.cancel(nextTimeout);
|
||||||
|
|
||||||
|
if ($scope.credentials.phone_full &&
|
||||||
|
$scope.credentials.phone_code_hash) {
|
||||||
|
MtpApiManager.invokeApi('auth.cancelCode', {
|
||||||
|
phone_number: $scope.credentials.phone_full,
|
||||||
|
phone_code_hash: $scope.credentials.phone_code_hash
|
||||||
|
}, options);
|
||||||
|
}
|
||||||
|
|
||||||
delete $scope.credentials.phone_code_hash;
|
delete $scope.credentials.phone_code_hash;
|
||||||
delete $scope.credentials.phone_unoccupied;
|
delete $scope.credentials.phone_unoccupied;
|
||||||
delete $scope.credentials.phone_code_valid;
|
delete $scope.credentials.phone_code_valid;
|
||||||
delete $scope.credentials.viaApp;
|
delete $scope.nextPending.remaining;
|
||||||
delete $scope.callPending.remaining;
|
delete $scope.nextPending.success;
|
||||||
delete $scope.callPending.success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.$watch('credentials.phone_code', function (newVal) {
|
||||||
|
if (newVal &&
|
||||||
|
newVal.match(/^\d+$/) &&
|
||||||
|
$scope.credentials.type &&
|
||||||
|
$scope.credentials.type.length &&
|
||||||
|
newVal.length == $scope.credentials.type.length) {
|
||||||
|
$scope.logIn();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$scope.logIn = function (forceSignUp) {
|
$scope.logIn = function (forceSignUp) {
|
||||||
var method = 'auth.signIn', params = {
|
var method = 'auth.signIn', params = {
|
||||||
phone_number: $scope.credentials.phone_full,
|
phone_number: $scope.credentials.phone_full,
|
||||||
@ -3080,9 +3097,9 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
.controller('VideoModalController', function ($scope, $rootScope, $modalInstance, PeersSelectService, AppMessagesManager, AppVideoManager, AppPeersManager, ErrorService) {
|
.controller('VideoModalController', function ($scope, $rootScope, $modalInstance, PeersSelectService, AppMessagesManager, AppDocsManager, AppPeersManager, ErrorService) {
|
||||||
|
|
||||||
$scope.video = AppVideoManager.wrapForFull($scope.videoID);
|
$scope.video = AppDocsManager.wrapVideoForFull($scope.docID);
|
||||||
|
|
||||||
$scope.progress = {enabled: false};
|
$scope.progress = {enabled: false};
|
||||||
$scope.player = {};
|
$scope.player = {};
|
||||||
@ -3109,7 +3126,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.download = function () {
|
$scope.download = function () {
|
||||||
AppVideoManager.saveVideoFile($scope.videoID);
|
AppDocsManager.saveDocFile($scope.docID);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on('history_delete', function (e, historyUpdate) {
|
$scope.$on('history_delete', function (e, historyUpdate) {
|
||||||
|
@ -579,24 +579,6 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.directive('myMessageVideo', function(AppDocsManager) {
|
|
||||||
return {
|
|
||||||
scope: {
|
|
||||||
'media': '=myMessageVideo',
|
|
||||||
'messageId': '=messageId'
|
|
||||||
},
|
|
||||||
templateUrl: templateUrl('message_attach_video'),
|
|
||||||
link: function ($scope, element, attrs) {
|
|
||||||
AppDocsManager.updateDocDownloaded($scope.media.video.id);
|
|
||||||
$scope.videoSave = function () {
|
|
||||||
AppDocsManager.saveDocFile($scope.media.video.id);
|
|
||||||
};
|
|
||||||
$scope.videoOpen = function () {
|
|
||||||
AppDocsManager.openVideo($scope.media.video.id, $scope.messageId);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
})
|
|
||||||
.directive('myMessageDocument', function(AppDocsManager) {
|
.directive('myMessageDocument', function(AppDocsManager) {
|
||||||
return {
|
return {
|
||||||
scope: {
|
scope: {
|
||||||
@ -615,6 +597,9 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
}
|
}
|
||||||
AppDocsManager.openDoc($scope.media.document.id, $scope.messageId);
|
AppDocsManager.openDoc($scope.media.document.id, $scope.messageId);
|
||||||
};
|
};
|
||||||
|
$scope.videoOpen = function () {
|
||||||
|
AppDocsManager.openVideo($scope.media.document.id, $scope.messageId);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -260,7 +260,9 @@ angular.module('myApp.services')
|
|||||||
dialog.top_message > maxSeenID
|
dialog.top_message > maxSeenID
|
||||||
) {
|
) {
|
||||||
var notifyPeer = message.flags & 16 ? message.from_id : peerID;
|
var notifyPeer = message.flags & 16 ? message.from_id : peerID;
|
||||||
if (message.pFlags.unread && !message.pFlags.out) {
|
if (message.pFlags.unread &&
|
||||||
|
!message.pFlags.out &&
|
||||||
|
!message.pFlags.silent) {
|
||||||
NotificationsManager.getPeerMuted(notifyPeer).then(function (muted) {
|
NotificationsManager.getPeerMuted(notifyPeer).then(function (muted) {
|
||||||
if (!muted) {
|
if (!muted) {
|
||||||
notifyAboutMessage(message);
|
notifyAboutMessage(message);
|
||||||
@ -1188,14 +1190,16 @@ angular.module('myApp.services')
|
|||||||
}
|
}
|
||||||
|
|
||||||
apiMessage.date -= serverTimeOffset;
|
apiMessage.date -= serverTimeOffset;
|
||||||
if (apiMessage.fwd_date) {
|
|
||||||
apiMessage.fwd_date -= serverTimeOffset;
|
var fwdHeader = apiMessage.fwd_from;
|
||||||
|
if (fwdHeader) {
|
||||||
|
apiMessage.fwdFromID = fwdHeader.from_id ? fwdHeader.from_id : -fwdHeader.channel_id;
|
||||||
|
fwdHeader.date -= serverTimeOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
apiMessage.toID = toPeerID;
|
apiMessage.toID = toPeerID;
|
||||||
apiMessage.fromID = apiMessage.from_id || toPeerID;
|
apiMessage.fromID = apiMessage.from_id || toPeerID;
|
||||||
if (apiMessage.fwd_from_id) {
|
|
||||||
apiMessage.fwdFromID = AppPeersManager.getPeerID(apiMessage.fwd_from_id);
|
|
||||||
}
|
|
||||||
if (apiMessage.via_bot_id > 0) {
|
if (apiMessage.via_bot_id > 0) {
|
||||||
apiMessage.viaBotID = apiMessage.via_bot_id;
|
apiMessage.viaBotID = apiMessage.via_bot_id;
|
||||||
}
|
}
|
||||||
@ -2387,10 +2391,6 @@ angular.module('myApp.services')
|
|||||||
sticker = true;
|
sticker = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'messageMediaVideo':
|
|
||||||
thumbPhotoSize = message.media.video.thumb;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2746,7 +2746,9 @@ angular.module('myApp.services')
|
|||||||
newDialogsHandlePromise = $timeout(handleNewDialogs, 0);
|
newDialogsHandlePromise = $timeout(handleNewDialogs, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inboxUnread && ($rootScope.selectedPeerID != peerID || $rootScope.idle.isIDLE)) {
|
if (inboxUnread &&
|
||||||
|
($rootScope.selectedPeerID != peerID || $rootScope.idle.isIDLE) &&
|
||||||
|
!message.pFlags.silent) {
|
||||||
|
|
||||||
var notifyPeer = message.flags & 16 ? message.from_id : peerID;
|
var notifyPeer = message.flags & 16 ? message.from_id : peerID;
|
||||||
var notifyPeerToHandle = notificationsToHandle[notifyPeer];
|
var notifyPeerToHandle = notificationsToHandle[notifyPeer];
|
||||||
|
@ -94,6 +94,17 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
}
|
}
|
||||||
|
|
||||||
var userID = apiUser.id;
|
var userID = apiUser.id;
|
||||||
|
var result = users[userID];
|
||||||
|
|
||||||
|
if (apiUser.pFlags === undefined) {
|
||||||
|
apiUser.pFlags = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (apiUser.pFlags.min) {
|
||||||
|
if (result !== undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (apiUser.phone) {
|
if (apiUser.phone) {
|
||||||
apiUser.rPhone = $filter('phoneNumber')(apiUser.phone);
|
apiUser.rPhone = $filter('phoneNumber')(apiUser.phone);
|
||||||
@ -114,10 +125,6 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
usernames[searchUsername] = userID;
|
usernames[searchUsername] = userID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (apiUser.pFlags === undefined) {
|
|
||||||
apiUser.pFlags = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
apiUser.sortName = apiUser.pFlags.deleted ? '' : SearchIndexManager.cleanSearchText(apiUser.first_name + ' ' + (apiUser.last_name || ''));
|
apiUser.sortName = apiUser.pFlags.deleted ? '' : SearchIndexManager.cleanSearchText(apiUser.first_name + ' ' + (apiUser.last_name || ''));
|
||||||
|
|
||||||
var nameWords = apiUser.sortName.split(' ');
|
var nameWords = apiUser.sortName.split(' ');
|
||||||
@ -191,8 +198,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
return users[id] && users[id].pFlags.bot;
|
return users[id] && users[id].pFlags.bot;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasUser(id) {
|
function hasUser(id, allowMin) {
|
||||||
return angular.isObject(users[id]);
|
var user = users[id];
|
||||||
|
return angular.isObject(user) && (!allowMin || !user.pFlags.min);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUserPhoto(id) {
|
function getUserPhoto(id) {
|
||||||
@ -592,6 +600,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
}
|
}
|
||||||
apiChat.rTitle = RichTextProcessor.wrapRichText(apiChat.title, {noLinks: true, noLinebreaks: true}) || _('chat_title_deleted');
|
apiChat.rTitle = RichTextProcessor.wrapRichText(apiChat.title, {noLinks: true, noLinebreaks: true}) || _('chat_title_deleted');
|
||||||
|
|
||||||
|
var result = chats[apiChat.id];
|
||||||
var titleWords = SearchIndexManager.cleanSearchText(apiChat.title || '').split(' ');
|
var titleWords = SearchIndexManager.cleanSearchText(apiChat.title || '').split(' ');
|
||||||
var firstWord = titleWords.shift();
|
var firstWord = titleWords.shift();
|
||||||
var lastWord = titleWords.pop();
|
var lastWord = titleWords.pop();
|
||||||
@ -602,16 +611,21 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
if (apiChat.pFlags === undefined) {
|
if (apiChat.pFlags === undefined) {
|
||||||
apiChat.pFlags = {};
|
apiChat.pFlags = {};
|
||||||
}
|
}
|
||||||
|
if (apiChat.pFlags.min) {
|
||||||
|
if (result !== undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (apiChat.username) {
|
if (apiChat.username) {
|
||||||
var searchUsername = SearchIndexManager.cleanUsername(apiChat.username);
|
var searchUsername = SearchIndexManager.cleanUsername(apiChat.username);
|
||||||
usernames[searchUsername] = apiChat.id;
|
usernames[searchUsername] = apiChat.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chats[apiChat.id] === undefined) {
|
if (result === undefined) {
|
||||||
chats[apiChat.id] = apiChat;
|
result = chats[apiChat.id] = apiChat;
|
||||||
} else {
|
} else {
|
||||||
safeReplaceObject(chats[apiChat.id], apiChat);
|
safeReplaceObject(result, apiChat);
|
||||||
$rootScope.$broadcast('chat_update', apiChat.id);
|
$rootScope.$broadcast('chat_update', apiChat.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -653,7 +667,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
case 'invite':
|
case 'invite':
|
||||||
if (chat._ == 'channel') {
|
if (chat._ == 'channel') {
|
||||||
if (chat.pFlags.megagroup) {
|
if (chat.pFlags.megagroup) {
|
||||||
if (!chat.pFlags.editor) {
|
if (!chat.pFlags.editor &&
|
||||||
|
!(action == 'invite' && chat.pFlags.democracy)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -717,8 +732,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasChat (id) {
|
function hasChat (id, allowMin) {
|
||||||
return angular.isObject(chats[id]);
|
var chat = chats[id];
|
||||||
|
return angular.isObject(chat) && (!allowMin || !chat.pFlags.min);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChatPhoto(id) {
|
function getChatPhoto(id) {
|
||||||
@ -1778,7 +1794,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
apiDoc.duration = attribute.duration;
|
apiDoc.duration = attribute.duration;
|
||||||
apiDoc.w = attribute.w;
|
apiDoc.w = attribute.w;
|
||||||
apiDoc.h = attribute.h;
|
apiDoc.h = attribute.h;
|
||||||
apiDoc.type = 'video';
|
if (apiDoc.thumb) {
|
||||||
|
apiDoc.type = 'video';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'documentAttributeSticker':
|
case 'documentAttributeSticker':
|
||||||
apiDoc.sticker = true;
|
apiDoc.sticker = true;
|
||||||
@ -1794,7 +1812,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
apiDoc.stickerSetInput = attribute.stickerset;
|
apiDoc.stickerSetInput = attribute.stickerset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (apiDoc.mime_type == 'image/webp') {
|
if (apiDoc.thumb && apiDoc.mime_type == 'image/webp') {
|
||||||
apiDoc.type = 'sticker';
|
apiDoc.type = 'sticker';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1804,8 +1822,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
break;
|
break;
|
||||||
case 'documentAttributeAnimated':
|
case 'documentAttributeAnimated':
|
||||||
if ((apiDoc.mime_type == 'image/gif' || apiDoc.mime_type == 'video/mp4') &&
|
if ((apiDoc.mime_type == 'image/gif' || apiDoc.mime_type == 'video/mp4') &&
|
||||||
apiDoc.thumb &&
|
apiDoc.thumb) {
|
||||||
apiDoc.thumb._ == 'photoSize') {
|
|
||||||
apiDoc.type = 'gif';
|
apiDoc.type = 'gif';
|
||||||
}
|
}
|
||||||
apiDoc.animated = true;
|
apiDoc.animated = true;
|
||||||
@ -1846,7 +1863,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
if (doc.file_name) {
|
if (doc.file_name) {
|
||||||
return doc.file_name;
|
return doc.file_name;
|
||||||
}
|
}
|
||||||
var fileExt = '.' + doc.mime_type.split('.')[1];
|
var fileExt = '.' + doc.mime_type.split('/')[1];
|
||||||
if (fileExt == '.octet-stream') {
|
if (fileExt == '.octet-stream') {
|
||||||
fileExt = '';
|
fileExt = '';
|
||||||
}
|
}
|
||||||
@ -2005,7 +2022,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
function saveDocFile (docID) {
|
function saveDocFile (docID) {
|
||||||
var doc = docs[docID],
|
var doc = docs[docID],
|
||||||
historyDoc = docsForHistory[docID] || doc || {},
|
historyDoc = docsForHistory[docID] || doc || {},
|
||||||
mimeType = video.mime_type || 'video/mp4',
|
mimeType = doc.mime_type,
|
||||||
fileName = getFileName(doc),
|
fileName = getFileName(doc),
|
||||||
ext = (fileName.split('.', 2) || [])[1] || '';
|
ext = (fileName.split('.', 2) || [])[1] || '';
|
||||||
|
|
||||||
@ -2728,8 +2745,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
to_id: AppPeersManager.getOutputPeer(toID),
|
to_id: AppPeersManager.getOutputPeer(toID),
|
||||||
date: updateMessage.date,
|
date: updateMessage.date,
|
||||||
message: updateMessage.message,
|
message: updateMessage.message,
|
||||||
fwd_from_id: updateMessage.fwd_from_id,
|
fwd_from: updateMessage.fwd_from,
|
||||||
fwd_date: updateMessage.fwd_date,
|
|
||||||
reply_to_msg_id: updateMessage.reply_to_msg_id,
|
reply_to_msg_id: updateMessage.reply_to_msg_id,
|
||||||
entities: updateMessage.entities
|
entities: updateMessage.entities
|
||||||
},
|
},
|
||||||
@ -2932,13 +2948,14 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (update._ == 'updateNewMessage') {
|
if (update._ == 'updateNewMessage' ||
|
||||||
|
update._ == 'updateNewChannelMessage') {
|
||||||
var message = update.message;
|
var message = update.message;
|
||||||
var fwdPeerID = message.fwd_from_id ? AppPeersManager.getPeerID(message.fwd_from_id) : 0;
|
|
||||||
var toPeerID = AppPeersManager.getPeerID(message.to_id);
|
var toPeerID = AppPeersManager.getPeerID(message.to_id);
|
||||||
if (message.from_id && !AppUsersManager.hasUser(message.from_id) ||
|
var fwdHeader = message.fwdHeader || {};
|
||||||
fwdPeerID > 0 && !AppUsersManager.hasUser(fwdPeerID) ||
|
if (message.from_id && !AppUsersManager.hasUser(message.from_id, message.pFlags.post) ||
|
||||||
fwdPeerID < 0 && !AppChatsManager.hasChat(-fwdPeerID) ||
|
fwdHeader.from_id && !AppUsersManager.hasUser(fwdHeader.from_id, !!fwdHeader.channel_id) ||
|
||||||
|
fwdHeader.channel_id && !AppChatsManager.hasChat(fwdHeader.channel_id) ||
|
||||||
toPeerID > 0 && !AppUsersManager.hasUser(toPeerID) ||
|
toPeerID > 0 && !AppUsersManager.hasUser(toPeerID) ||
|
||||||
toPeerID < 0 && !AppChatsManager.hasChat(-toPeerID)) {
|
toPeerID < 0 && !AppChatsManager.hasChat(-toPeerID)) {
|
||||||
console.warn(dT(), 'Short update not enough data', message);
|
console.warn(dT(), 'Short update not enough data', message);
|
||||||
|
@ -2348,7 +2348,7 @@ a.im_message_fwd_photo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.im_history_loading {
|
.im_history_loading {
|
||||||
width: 60px;
|
width: 35px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
|
||||||
|
@ -15,16 +15,17 @@
|
|||||||
<div ng-switch-when="true">
|
<div ng-switch-when="true">
|
||||||
<span class="im_reply_message_media" ng-if="singleMessage.media" ng-switch="singleMessage.media._">
|
<span class="im_reply_message_media" ng-if="singleMessage.media" ng-switch="singleMessage.media._">
|
||||||
<span ng-switch-when="messageMediaPhoto" my-i18n="conversation_media_photo"></span>
|
<span ng-switch-when="messageMediaPhoto" my-i18n="conversation_media_photo"></span>
|
||||||
<span ng-switch-when="messageMediaVideo" my-i18n="conversation_media_video"></span>
|
<span ng-switch-when="messageMediaDocument" ng-switch="singleMessage.media.document.type || false">
|
||||||
<span ng-switch-when="messageMediaDocument" ng-switch="::singleMessage.media.document.sticker || false">
|
<span ng-switch-when="sticker">
|
||||||
<span ng-switch-when="1" my-i18n="conversation_media_sticker"></span>
|
|
||||||
<span ng-switch-when="2">
|
|
||||||
<span ng-bind-html="singleMessage.media.document.stickerEmoji"></span>
|
<span ng-bind-html="singleMessage.media.document.stickerEmoji"></span>
|
||||||
(<my-i18n msgid="conversation_media_sticker"></my-i18n>)
|
<my-i18n msgid="conversation_media_sticker"></my-i18n>
|
||||||
</span>
|
</span>
|
||||||
|
<span ng-switch-when="video" my-i18n="conversation_media_video"></span>
|
||||||
|
<span ng-switch-when="gif" my-i18n="conversation_media_gif"></span>
|
||||||
|
<span ng-switch-when="audio" my-i18n="conversation_media_audio"></span>
|
||||||
|
<span ng-switch-when="voice" my-i18n="conversation_media_audio"></span>
|
||||||
<span ng-switch-default ng-bind="singleMessage.media.document.file_name"></span>
|
<span ng-switch-default ng-bind="singleMessage.media.document.file_name"></span>
|
||||||
</span>
|
</span>
|
||||||
<span ng-switch-when="messageMediaAudio" my-i18n="conversation_media_audio"></span>
|
|
||||||
<span ng-switch-when="messageMediaGeo" my-i18n="conversation_media_location"></span>
|
<span ng-switch-when="messageMediaGeo" my-i18n="conversation_media_location"></span>
|
||||||
<span ng-switch-when="messageMediaVenue" my-i18n="conversation_media_location"></span>
|
<span ng-switch-when="messageMediaVenue" my-i18n="conversation_media_location"></span>
|
||||||
<span ng-switch-when="messageMediaContact" my-i18n="conversation_media_contact"></span>
|
<span ng-switch-when="messageMediaContact" my-i18n="conversation_media_contact"></span>
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
|
|
||||||
<div class="im_history_empty_wrap" ng-show="state.empty" ng-switch="state.mayBeHasMore">
|
<div class="im_history_empty_wrap" ng-show="state.empty" ng-switch="state.mayBeHasMore">
|
||||||
<div ng-switch-when="true" class="im_history_loading" my-vertical-position="0.3" padding="true">
|
<div ng-switch-when="true" class="im_history_loading" my-vertical-position="0.3" padding="true">
|
||||||
<div my-arc-progress stroke="5" width="50"></div>
|
<div my-arc-progress stroke="4" width="32"></div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-switch-default class="im_history_empty" my-vertical-position="0.25" padding="true" my-i18n="im_no_messages"></div>
|
<div ng-switch-default class="im_history_empty" my-vertical-position="0.25" padding="true" my-i18n="im_no_messages"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,26 +56,32 @@
|
|||||||
<form name="myLoginForm" ng-if="credentials.phone_code_hash && !credentials.phone_code_valid" ng-submit="logIn()">
|
<form name="myLoginForm" ng-if="credentials.phone_code_hash && !credentials.phone_code_valid" ng-submit="logIn()">
|
||||||
<h3 class="login_phone_head"><span ng-bind="credentials.phone_country"></span> <span ng-bind="credentials.phone_number"></span></h3>
|
<h3 class="login_phone_head"><span ng-bind="credentials.phone_country"></span> <span ng-bind="credentials.phone_number"></span></h3>
|
||||||
<div class="login_edit_phone"><a ng-click="editPhone()" my-i18n="login_edit_number"></a></div>
|
<div class="login_edit_phone"><a ng-click="editPhone()" my-i18n="login_edit_number"></a></div>
|
||||||
<div ng-switch="credentials.viaApp">
|
|
||||||
<div ng-switch-when="true">
|
|
||||||
<p class="login_smscode_lead" my-i18n="login_enter_code_label_md"></p>
|
|
||||||
<p class="login_smscode_lead">
|
|
||||||
<a ng-click="sendSms()" my-i18n="login_code_not_received"></a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div ng-switch-default>
|
|
||||||
<p class="login_smscode_lead" my-i18n="login_enter_sms_code_label_md"></p>
|
|
||||||
|
|
||||||
<p class="login_smscode_lead">
|
<div ng-switch="credentials.type._">
|
||||||
<span ng-show="callPending.remaining > 0" my-i18n="login_call_remaining">
|
<p ng-switch-when="auth.sentCodeTypeApp" class="login_smscode_lead" my-i18n="login_enter_code_label_md"></p>
|
||||||
<my-i18n-param name="remaining">{{callPending.remaining | duration}}</my-i18n-param>
|
<p ng-switch-default class="login_smscode_lead" my-i18n="login_enter_sms_code_label_md"></p>
|
||||||
</span>
|
|
||||||
<span ng-show="!callPending.remaining && !callPending.success" my-i18n="login_calling"></span>
|
|
||||||
<span ng-show="!callPending.remaining && callPending.success" my-i18n="login_number_dialed"></span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div ng-if="nextPending.type" ng-switch="nextPending.remaining === false">
|
||||||
|
<p ng-switch-when="true" class="login_smscode_lead">
|
||||||
|
<a ng-click="sendNext()" my-i18n="login_code_not_received"></a>
|
||||||
|
</p>
|
||||||
|
<p ng-switch-default class="login_smscode_lead">
|
||||||
|
<span ng-show="nextPending.remaining > 0" my-i18n="login_call_remaining">
|
||||||
|
<my-i18n-param name="remaining" ng-bind="nextPending.remaining | duration"></my-i18n-param>
|
||||||
|
</span>
|
||||||
|
<span ng-show="!nextPending.remaining" my-i18n="login_calling"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-if="credentials.type._ == 'auth.sentCodeTypeCall'">
|
||||||
|
<p class="login_smscode_lead">
|
||||||
|
<span my-i18n="login_number_dialed"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="md-input-group md-input-group-centered" ng-class="{'md-input-error': error.field == 'phone_code'}" my-labeled-input ng-switch="error.field == 'phone_code'">
|
<div class="md-input-group md-input-group-centered" ng-class="{'md-input-error': error.field == 'phone_code'}" my-labeled-input ng-switch="error.field == 'phone_code'">
|
||||||
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_sms_code"></label>
|
<label ng-switch-when="true" class="md-input-label" my-i18n="login_incorrect_sms_code"></label>
|
||||||
<label ng-switch-default class="md-input-label" my-i18n="login_number_input_placeholder"></label>
|
<label ng-switch-default class="md-input-label" my-i18n="login_number_input_placeholder"></label>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<span class="copyonly"><span my-i18n="message_forwarded_message"></span>: </span>
|
<span class="copyonly"><span my-i18n="message_forwarded_message"></span>: </span>
|
||||||
<a class="im_message_fwd_photo pull-left" my-peer-photolink="::historyMessage.fwdFromID" img-class="im_message_fwd_photo"></a>
|
<a class="im_message_fwd_photo pull-left" my-peer-photolink="::historyMessage.fwdFromID" img-class="im_message_fwd_photo"></a>
|
||||||
<div class="im_message_fwd_author_wrap">
|
<div class="im_message_fwd_author_wrap">
|
||||||
<a class="im_message_fwd_author" my-peer-link="historyMessage.fwdFromID"></a><a ng-if="::historyMessage.viaBotID" class="im_message_fwd_via" ng-click="selectInlineBot(historyMessage.viaBotID, $event)"><span class="copyonly"> </span><span my-i18n="message_via_bot"><my-i18n-param name="bot"><span class="im_message_fwd_author" my-peer-link="historyMessage.viaBotID" username="true" no-watch="true"></span></my-i18n-param></span></a><span class="copyonly"> [</span><span class="im_message_fwd_date" ng-bind="::historyMessage.fwd_date | dateOrTime"></span><span class="copyonly">] </span>
|
<a class="im_message_fwd_author" my-peer-link="historyMessage.fwdFromID"></a><a ng-if="::historyMessage.viaBotID" class="im_message_fwd_via" ng-click="selectInlineBot(historyMessage.viaBotID, $event)"><span class="copyonly"> </span><span my-i18n="message_via_bot"><my-i18n-param name="bot"><span class="im_message_fwd_author" my-peer-link="historyMessage.viaBotID" username="true" no-watch="true"></span></my-i18n-param></span></a><span class="copyonly"> [</span><span class="im_message_fwd_date" ng-bind="::historyMessage.fwd_from.date | dateOrTime"></span><span class="copyonly">] </span>
|
||||||
<span class="im_message_views_inline" ng-if="::historyMessage.views > 0">
|
<span class="im_message_views_inline" ng-if="::historyMessage.views > 0">
|
||||||
<i class="icon-message-views"></i><span class="im_message_views_cnt" my-message-views="historyMessage.mid"></span>
|
<i class="icon-message-views"></i><span class="im_message_views_cnt" my-message-views="historyMessage.mid"></span>
|
||||||
</span>
|
</span>
|
||||||
@ -67,18 +67,14 @@
|
|||||||
<div ng-if="::historyMessage.media || historyMessage.mid < 0 ? true : false" class="im_message_media" ng-switch="historyMessage.media._">
|
<div ng-if="::historyMessage.media || historyMessage.mid < 0 ? true : false" class="im_message_media" ng-switch="historyMessage.media._">
|
||||||
|
|
||||||
<div ng-switch-when="messageMediaPhoto" my-message-photo="historyMessage.media" message-id="historyMessage.mid"></div>
|
<div ng-switch-when="messageMediaPhoto" my-message-photo="historyMessage.media" message-id="historyMessage.mid"></div>
|
||||||
<div ng-switch-when="messageMediaVideo" my-message-video="historyMessage.media" message-id="historyMessage.mid"></div>
|
|
||||||
<div ng-switch-when="messageMediaDocument" my-message-document="historyMessage.media" message-id="historyMessage.mid"></div>
|
<div ng-switch-when="messageMediaDocument" my-message-document="historyMessage.media" message-id="historyMessage.mid"></div>
|
||||||
<div ng-switch-when="messageMediaAudio" class="im_message_audio" my-audio-player audio="historyMessage.media.audio" message="historyMessage"></div>
|
|
||||||
<div ng-switch-when="messageMediaGeo" my-message-geo="historyMessage.media"></div>
|
<div ng-switch-when="messageMediaGeo" my-message-geo="historyMessage.media"></div>
|
||||||
<div ng-switch-when="messageMediaVenue" my-message-venue="historyMessage.media"></div>
|
<div ng-switch-when="messageMediaVenue" my-message-venue="historyMessage.media"></div>
|
||||||
<div ng-switch-when="messageMediaContact" class="im_message_contact" my-message-contact></div>
|
<div ng-switch-when="messageMediaContact" class="im_message_contact" my-message-contact></div>
|
||||||
<div ng-switch-when="messageMediaWebPage" class="im_message_webpage" my-message-webpage="historyMessage.media.webpage" message-id="historyMessage.mid"></div>
|
<div ng-switch-when="messageMediaWebPage" class="im_message_webpage" my-message-webpage="historyMessage.media.webpage" message-id="historyMessage.mid"></div>
|
||||||
<div ng-switch-when="messageMediaPending" my-message-pending></div>
|
<div ng-switch-when="messageMediaPending" my-message-pending></div>
|
||||||
<div ng-switch-when="messageMediaUnsupported">
|
<div ng-switch-when="messageMediaUnsupported">
|
||||||
<div class="im_message_text">
|
<div class="im_message_text">The message is not supported on your version of Telegram Web. Update the app to view: <a href="https://web.telegram.org" target="_blank">web.telegram.org</a>.</div>
|
||||||
The message is not supported on your version of Telegram Web. Update the app to view: <a href="https://web.telegram.org">web.telegram.org</a>.
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,6 +12,41 @@
|
|||||||
<div my-audio-player audio="media.document"></div>
|
<div my-audio-player audio="media.document"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div ng-switch-when="video" class="im_message_video im_message_document_thumbed">
|
||||||
|
<a class="im_message_video_thumb" ng-click="videoOpen()" ng-style="::{width: media.document.thumb.width + 'px'}">
|
||||||
|
<span class="im_message_video_duration nocopy" data-content="{{::media.document.duration | duration}}"></span>
|
||||||
|
<i class="icon icon-videoplay"></i>
|
||||||
|
<img
|
||||||
|
class="im_message_video_thumb im_message_video_thumb_blurred"
|
||||||
|
my-load-thumb
|
||||||
|
thumb="media.document.thumb"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="im_message_document_info">
|
||||||
|
<div class="im_message_document_name_wrap">
|
||||||
|
<span class="copyonly">[</span><span class="im_message_document_name" my-i18n="message_attach_video_video"></span><span class="copyonly"> <span ng-bind="::media.document.duration | duration"></span>]</span>
|
||||||
|
<span class="im_message_document_size" ng-if="!media.document.progress.enabled" ng-bind="::media.document.size | formatSize"></span>
|
||||||
|
<span class="im_message_document_size" ng-if="media.document.progress.enabled" ng-bind="media.document.progress | formatSizeProgress"></span>
|
||||||
|
</div>
|
||||||
|
<div class="im_message_document_actions noselect" ng-if="!media.document.progress.enabled">
|
||||||
|
<a href="" ng-click="docSave()" ng-switch="media.document.downloaded">
|
||||||
|
<span class="nocopy" ng-switch-when="true" my-i18n="message_attach_video_save"></span>
|
||||||
|
<span class="nocopy" ng-switch-default my-i18n="message_attach_video_download"></span>
|
||||||
|
</a>
|
||||||
|
<a class="nocopy" href="" ng-click="videoOpen()" my-i18n="message_attach_video_play"></a>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix im_message_cancelable_progress_wrap" ng-if="media.document.progress.enabled">
|
||||||
|
<a class="im_message_media_progress_cancel pull-right nocopy" ng-click="media.document.progress.cancel()" my-i18n="modal_cancel"></a>
|
||||||
|
<div class="im_message_download_progress_wrap">
|
||||||
|
<div class="progress tg_down_progress">
|
||||||
|
<div class="progress-bar progress-bar-success" ng-style="{width: media.document.progress.percent + '%'}"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div ng-switch-default class="im_message_document clearfix" ng-class="{im_message_document_thumbed: !!media.document.thumb, im_message_document_progress: media.document.progress.enabled}">
|
<div ng-switch-default class="im_message_document clearfix" ng-class="{im_message_document_thumbed: !!media.document.thumb, im_message_document_progress: media.document.progress.enabled}">
|
||||||
|
|
||||||
<a ng-if="::!media.document.thumb" class="im_message_file_button" ng-click="docOpen()" ng-class="{im_message_file_button_dl_doc: media.document.downloaded}">
|
<a ng-if="::!media.document.thumb" class="im_message_file_button" ng-click="docOpen()" ng-class="{im_message_file_button_dl_doc: media.document.downloaded}">
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
<div class="im_message_video im_message_document_thumbed">
|
|
||||||
<a class="im_message_video_thumb" ng-click="videoOpen()" ng-style="::{width: media.video.thumb.width + 'px'}">
|
|
||||||
<span class="im_message_video_duration nocopy" data-content="{{::media.video.duration | duration}}"></span>
|
|
||||||
<i class="icon icon-videoplay"></i>
|
|
||||||
<img
|
|
||||||
class="im_message_video_thumb im_message_video_thumb_blurred"
|
|
||||||
my-load-thumb
|
|
||||||
thumb="media.video.thumb"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<div class="im_message_document_info">
|
|
||||||
<div class="im_message_document_name_wrap">
|
|
||||||
<span class="copyonly">[</span><span class="im_message_document_name" my-i18n="message_attach_video_video"></span><span class="copyonly"> <span ng-bind="::media.video.duration | duration"></span>]</span>
|
|
||||||
<span class="im_message_document_size" ng-if="!media.video.progress.enabled" ng-bind="::media.video.size | formatSize"></span>
|
|
||||||
<span class="im_message_document_size" ng-if="media.video.progress.enabled" ng-bind="media.video.progress | formatSizeProgress"></span>
|
|
||||||
</div>
|
|
||||||
<div class="im_message_document_actions noselect" ng-if="!media.video.progress.enabled">
|
|
||||||
<a href="" ng-click="videoSave()" ng-switch="media.video.downloaded">
|
|
||||||
<span class="nocopy" ng-switch-when="true" my-i18n="message_attach_video_save"></span>
|
|
||||||
<span class="nocopy" ng-switch-default my-i18n="message_attach_video_download"></span>
|
|
||||||
</a>
|
|
||||||
<a class="nocopy" href="" ng-click="videoOpen()" my-i18n="message_attach_video_play"></a>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix im_message_cancelable_progress_wrap" ng-if="media.video.progress.enabled">
|
|
||||||
<a class="im_message_media_progress_cancel pull-right nocopy" ng-click="media.video.progress.cancel()" my-i18n="modal_cancel"></a>
|
|
||||||
<div class="im_message_download_progress_wrap">
|
|
||||||
<div class="progress tg_down_progress">
|
|
||||||
<div class="progress-bar progress-bar-success" ng-style="{width: media.video.progress.percent + '%'}"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div ng-if="::media.rCaption" class="im_message_video_caption" ng-bind-html="::media.rCaption"></div>
|
|
@ -66,24 +66,28 @@
|
|||||||
<form name="myLoginForm" ng-if="credentials.phone_code_hash && !credentials.phone_code_valid" ng-submit="logIn()">
|
<form name="myLoginForm" ng-if="credentials.phone_code_hash && !credentials.phone_code_valid" ng-submit="logIn()">
|
||||||
<h3 class="login_phone_head"><span ng-bind="credentials.phone_country"></span> <span ng-bind="credentials.phone_number"></span></h3>
|
<h3 class="login_phone_head"><span ng-bind="credentials.phone_country"></span> <span ng-bind="credentials.phone_number"></span></h3>
|
||||||
<div class="login_edit_phone"><a ng-click="editPhone()" my-i18n="login_edit_number"></a></div>
|
<div class="login_edit_phone"><a ng-click="editPhone()" my-i18n="login_edit_number"></a></div>
|
||||||
<div ng-switch="credentials.viaApp">
|
|
||||||
<div ng-switch-when="true">
|
|
||||||
<p class="login_smscode_lead" my-i18n="login_enter_code_label_md"></p>
|
|
||||||
<p class="login_smscode_lead">
|
|
||||||
<a ng-click="sendSms()" my-i18n="login_code_not_received"></a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div ng-switch-default>
|
|
||||||
<p class="login_smscode_lead" my-i18n="login_enter_sms_code_label_md"></p>
|
|
||||||
|
|
||||||
<p class="login_smscode_lead">
|
<div ng-switch="credentials.type._">
|
||||||
<span ng-show="callPending.remaining > 0" my-i18n="login_call_remaining">
|
<p ng-switch-when="auth.sentCodeTypeApp" class="login_smscode_lead" my-i18n="login_enter_code_label_md"></p>
|
||||||
<my-i18n-param name="remaining">{{callPending.remaining | duration}}</my-i18n-param>
|
<p ng-switch-default class="login_smscode_lead" my-i18n="login_enter_sms_code_label_md"></p>
|
||||||
</span>
|
</div>
|
||||||
<span ng-show="!callPending.remaining && !callPending.success" my-i18n="login_calling"></span>
|
|
||||||
<span ng-show="!callPending.remaining && callPending.success" my-i18n="login_number_dialed"></span>
|
<div ng-if="nextPending.type" ng-switch="nextPending.remaining === false">
|
||||||
</p>
|
<p ng-switch-when="true" class="login_smscode_lead">
|
||||||
</div>
|
<a ng-click="sendNext()" my-i18n="login_code_not_received"></a>
|
||||||
|
</p>
|
||||||
|
<p ng-switch-default class="login_smscode_lead">
|
||||||
|
<span ng-show="nextPending.remaining > 0" my-i18n="login_call_remaining">
|
||||||
|
<my-i18n-param name="remaining" ng-bind="nextPending.remaining | duration"></my-i18n-param>
|
||||||
|
</span>
|
||||||
|
<span ng-show="!nextPending.remaining" my-i18n="login_calling"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-if="credentials.type._ == 'auth.sentCodeTypeCall'">
|
||||||
|
<p class="login_smscode_lead">
|
||||||
|
<span my-i18n="login_number_dialed"></span>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md-input-group md-input-group-centered" ng-class="{'md-input-error': error.field == 'phone_code'}" my-labeled-input ng-switch="error.field == 'phone_code'">
|
<div class="md-input-group md-input-group-centered" ng-class="{'md-input-error': error.field == 'phone_code'}" my-labeled-input ng-switch="error.field == 'phone_code'">
|
||||||
|
@ -59,9 +59,7 @@
|
|||||||
<div ng-if="::historyMessage.media || historyMessage.mid < 0 ? true : false" class="im_message_media" ng-switch="historyMessage.media._">
|
<div ng-if="::historyMessage.media || historyMessage.mid < 0 ? true : false" class="im_message_media" ng-switch="historyMessage.media._">
|
||||||
|
|
||||||
<div ng-switch-when="messageMediaPhoto" my-message-photo="historyMessage.media" message-id="historyMessage.mid"></div>
|
<div ng-switch-when="messageMediaPhoto" my-message-photo="historyMessage.media" message-id="historyMessage.mid"></div>
|
||||||
<div ng-switch-when="messageMediaVideo" my-message-video="historyMessage.media" message-id="historyMessage.mid"></div>
|
|
||||||
<div ng-switch-when="messageMediaDocument" my-message-document="historyMessage.media" message-id="historyMessage.mid"></div>
|
<div ng-switch-when="messageMediaDocument" my-message-document="historyMessage.media" message-id="historyMessage.mid"></div>
|
||||||
<div ng-switch-when="messageMediaAudio" class="im_message_audio" my-audio-player audio="historyMessage.media.audio" message="historyMessage"></div>
|
|
||||||
<div ng-switch-when="messageMediaGeo" my-message-geo="historyMessage.media"></div>
|
<div ng-switch-when="messageMediaGeo" my-message-geo="historyMessage.media"></div>
|
||||||
<div ng-switch-when="messageMediaVenue" my-message-venue="historyMessage.media"></div>
|
<div ng-switch-when="messageMediaVenue" my-message-venue="historyMessage.media"></div>
|
||||||
<div ng-switch-when="messageMediaContact" class="im_message_contact" my-message-contact></div>
|
<div ng-switch-when="messageMediaContact" class="im_message_contact" my-message-contact></div>
|
||||||
|
@ -12,6 +12,18 @@
|
|||||||
<div my-audio-player audio="media.document"></div>
|
<div my-audio-player audio="media.document"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div ng-switch-when="video" class="im_message_video im_message_document_thumbed">
|
||||||
|
<a class="im_message_video_thumb" href="" ng-click="videoOpen()" ng-style="::{width: media.document.thumb.width + 'px'}">
|
||||||
|
<span class="im_message_video_duration" ng-bind="::media.document.duration | duration"></span>
|
||||||
|
<i class="icon icon-videoplay"></i>
|
||||||
|
<img
|
||||||
|
class="im_message_video_thumb im_message_video_thumb_blurred"
|
||||||
|
my-load-thumb
|
||||||
|
thumb="media.document.thumb"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div ng-switch-default class="im_message_document clearfix" ng-class="{im_message_document_thumbed: !!media.document.thumb, im_message_document_progress: media.document.progress.enabled}">
|
<div ng-switch-default class="im_message_document clearfix" ng-class="{im_message_document_thumbed: !!media.document.thumb, im_message_document_progress: media.document.progress.enabled}">
|
||||||
|
|
||||||
<a ng-if="::!media.document.thumb" class="im_message_file_button" ng-click="docOpen()" ng-class="{im_message_file_button_dl_doc: media.document.downloaded}">
|
<a ng-if="::!media.document.thumb" class="im_message_file_button" ng-click="docOpen()" ng-class="{im_message_file_button_dl_doc: media.document.downloaded}">
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
<div class="im_message_video im_message_document_thumbed">
|
|
||||||
<a class="im_message_video_thumb" href="" ng-click="videoOpen()" ng-style="::{width: media.video.thumb.width + 'px'}">
|
|
||||||
<span class="im_message_video_duration" ng-bind="::media.video.duration | duration"></span>
|
|
||||||
<i class="icon icon-videoplay"></i>
|
|
||||||
<img
|
|
||||||
class="im_message_video_thumb im_message_video_thumb_blurred"
|
|
||||||
my-load-thumb
|
|
||||||
thumb="media.video.thumb"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div ng-if="::media.rCaption" class="im_message_video_caption" ng-bind-html="::media.rCaption"></div>
|
|
Loading…
x
Reference in New Issue
Block a user