Browse Source

Improved mobile fonts, photo view

master
Igor Zhukov 11 years ago
parent
commit
bafab6e250
  1. 3
      app/css/app.css
  2. 25
      app/css/app_mobile.css
  3. 55
      app/js/controllers.js
  4. 2
      app/js/services.js

3
app/css/app.css

@ -103,6 +103,9 @@ input[type="number"] {
.ios_standalone .tg_page_head .navbar > .container { .ios_standalone .tg_page_head .navbar > .container {
margin-top: 20px; margin-top: 20px;
} }
.ios_standalone .modal.page_modal {
border-top: 20px solid #497495;
}
.tg_page_head .navbar > .container .navbar-brand { .tg_page_head .navbar > .container .navbar-brand {
padding: 9px 15px; padding: 9px 15px;
opacity: 0.9; opacity: 0.9;

25
app/css/app_mobile.css

@ -158,14 +158,23 @@ html {
float: left; float: left;
margin: 0; margin: 0;
} }
.navbar-offline > li > a {
padding-right: 0;
padding-left: 0;
}
.navbar_offline .tg_head_logo_text { .navbar_offline .tg_head_logo_text {
display: none; display: none;
} }
.navbar-offline-text {
padding-left: 0px;
}
.tg_page_head .navbar_offline > .container .navbar-brand { .tg_page_head .navbar_offline > .container .navbar-brand {
margin-right: 0; margin-right: 0;
} }
.navbar_offline .navbar-quick-nav li > a > h4, .navbar_offline .navbar-quick-nav li > a > h4,
.navbar_offline .navbar-quick-nav li > a > small { .navbar_offline .navbar-quick-nav li > a > small,
.navbar_offline .im_head_attach,
.navbar_offline .navbar-search-wrap {
display: none; display: none;
} }
@ -225,7 +234,12 @@ html {
} }
.im_content_message_wrap { .im_content_message_wrap {
margin-left: 0; margin-left: 0;
font-size: 1.2em;
} }
.form-control {
font-size: 1.2em;
}
.im_history_typing { .im_history_typing {
padding: 0 15px 0 56px; padding: 0 15px 0 56px;
} }
@ -337,7 +351,7 @@ html {
.im_dialog_peer, .im_dialog_peer,
.im_dialog_message { .im_dialog_message {
font-size: 1.1em; font-size: 1.2em;
} }
.im_dialog_peer { .im_dialog_peer {
margin-bottom: 5px; margin-bottom: 5px;
@ -426,14 +440,14 @@ html {
border: 0; border: 0;
color: #1877c3; color: #1877c3;
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 15px;
padding: 6px 6px; padding: 0 6px;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
width: 45px; width: 45px;
min-width: 0; min-width: 0;
line-height: 18px; line-height: 32px;
} }
.im_submit:hover { .im_submit:hover {
color: #1877c3; color: #1877c3;
@ -452,7 +466,6 @@ html {
.emoji-wysiwyg-editor { .emoji-wysiwyg-editor {
min-height: 32px; min-height: 32px;
max-height: 150px; max-height: 150px;
padding-right: 30px;
} }
.emoji-menu { .emoji-menu {

55
app/js/controllers.js

@ -1255,13 +1255,44 @@ angular.module('myApp.controllers', [])
$scope.photo = AppPhotosManager.wrapForFull($scope.photoID); $scope.photo = AppPhotosManager.wrapForFull($scope.photoID);
$scope.nav = {}; $scope.nav = {};
if (!$scope.messageID) { if (!$scope.messageID || Config.Navigator.mobile) {
$scope.nav.next = function () { $scope.nav.next = function () {
$modalInstance.close(); $modalInstance.close();
} }
}
if (!$scope.messageID) {
return; return;
} }
$scope.forward = function () {
var messageID = $scope.messageID;
PeersSelectService.selectPeer({confirm_type: 'FORWARD_PEER'}).then(function (peerString) {
var peerID = AppPeersManager.getPeerID(peerString);
AppMessagesManager.forwardMessages(peerID, [messageID]).then(function () {
$rootScope.$broadcast('history_focus', {peerString: peerString});
});
});
};
$scope.download = function () {
AppPhotosManager.downloadPhoto($scope.photoID);
};
if (Config.Navigator.mobile) {
$scope.canForward = true;
return;
}
$scope.delete = function () {
var messageID = $scope.messageID;
ErrorService.confirm({type: 'MESSAGE_DELETE'}).then(function () {
AppMessagesManager.deleteMessages([messageID]);
});
};
var peerID = AppMessagesManager.getMessagePeer(AppMessagesManager.getMessage($scope.messageID)), var peerID = AppMessagesManager.getMessagePeer(AppMessagesManager.getMessage($scope.messageID)),
inputPeer = AppPeersManager.getInputPeerByID(peerID), inputPeer = AppPeersManager.getInputPeerByID(peerID),
inputQuery = '', inputQuery = '',
@ -1344,28 +1375,6 @@ angular.module('myApp.controllers', [])
movePosition(+1); movePosition(+1);
}; };
$scope.forward = function () {
var messageID = $scope.messageID;
PeersSelectService.selectPeer({confirm_type: 'FORWARD_PEER'}).then(function (peerString) {
var peerID = AppPeersManager.getPeerID(peerString);
AppMessagesManager.forwardMessages(peerID, [messageID]).then(function () {
$rootScope.$broadcast('history_focus', {peerString: peerString});
});
});
};
$scope.delete = function () {
var messageID = $scope.messageID;
ErrorService.confirm({type: 'MESSAGE_DELETE'}).then(function () {
AppMessagesManager.deleteMessages([messageID]);
});
};
$scope.download = function () {
AppPhotosManager.downloadPhoto($scope.photoID);
};
$scope.$on('history_delete', function (e, historyUpdate) { $scope.$on('history_delete', function (e, historyUpdate) {
console.log(dT(), 'delete', historyUpdate); console.log(dT(), 'delete', historyUpdate);
if (historyUpdate.peerID == peerID) { if (historyUpdate.peerID == peerID) {

2
app/js/services.js

@ -2201,7 +2201,7 @@ angular.module('myApp.services', [])
} }
} }
if (full.width >= fullPhotoSize.w && full.height >= fullPhotoSize.h) { if (!Config.Navigator.mobile && full.width >= fullPhotoSize.w && full.height >= fullPhotoSize.h) {
full.width = fullPhotoSize.w; full.width = fullPhotoSize.w;
full.height = fullPhotoSize.h; full.height = fullPhotoSize.h;
} }

Loading…
Cancel
Save