Browse Source

Final fixes

master
Igor Zhukov 10 years ago
parent
commit
5c521a72ca
  1. 2
      app/css/app.css
  2. 31
      app/css/app_mobile.css
  3. BIN
      app/img/iphone_home120.png
  4. BIN
      app/img/iphone_startup.png
  5. 11
      app/index.html
  6. 26
      app/js/directives.js
  7. 2
      app/partials/chat_modal.html
  8. 12
      app/partials/contacts_modal.html
  9. 10
      app/partials/head.html
  10. 4
      app/partials/im.html
  11. 2
      app/partials/peer_select.html
  12. 2
      app/partials/settings_modal.html
  13. 2
      app/partials/user_modal.html
  14. 2
      app/webogram.appcache

2
app/css/app.css

@ -2129,7 +2129,7 @@ div.im_panel_own_photo {
margin-top: -7px; margin-top: -7px;
margin-left: 43px; margin-left: 43px;
} }
.status_online { .icon-online {
background: #6DBF69; background: #6DBF69;
border: 1px solid #FFF; border: 1px solid #FFF;
display: block; display: block;

31
app/css/app_mobile.css

@ -181,14 +181,21 @@ html {
.navbar-quick-media-back h4 { .navbar-quick-media-back h4 {
margin: 9px 0 12px 0; margin: 9px 0 12px 0;
} }
.navbar-quick-profile-back h4,
.navbar-quick-group-back h4 {
font-weight: bold;
}
.navbar-quick-profile-back small, .navbar-quick-profile-back small,
.navbar-quick-group-back small { .navbar-quick-group-back small {
font-size: 12px; font-size: 13px;
color: #FFF;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
margin-left: 0; margin-left: 0;
} }
.navbar-quick-profile-back .status_online,
.navbar-quick-group-back .status_online {
color: #FFF;
}
.navbar-menu { .navbar-menu {
display: none; display: none;
@ -499,7 +506,7 @@ a.im_message_video_thumb {
padding: 0 8px; padding: 0 8px;
} }
.im_content_message_wrap { .im_content_message_wrap {
font-size: 1.2em; font-size: 15px;
float: left; float: left;
position: relative; position: relative;
max-width: 80%; max-width: 80%;
@ -795,6 +802,7 @@ a.im_message_from_photo {
border-radius: 0 !important; border-radius: 0 !important;
padding-right: 11px; padding-right: 11px;
} }
.im_dialog_wrap:last-child a.im_dialog { .im_dialog_wrap:last-child a.im_dialog {
border-bottom: 0; border-bottom: 0;
} }
@ -807,20 +815,20 @@ a.im_message_from_photo {
.im_dialog_peer, .im_dialog_peer,
.im_dialog_message { .im_dialog_message {
font-size: 1.2em; font-size: 1.3em;
} }
.im_dialog_peer { .im_dialog_peer {
margin-bottom: 7px; margin-bottom: 7px;
margin-top: 5px; margin-top: 5px;
} }
.im_dialog_meta { .im_dialog_meta {
margin-top: 5px; margin-top: 6px;
} }
.im_dialog_date, .im_dialog_date,
a.im_dialog:hover .im_dialog_date, a.im_dialog:hover .im_dialog_date,
a.im_dialog_selected .im_dialog_date { a.im_dialog_selected .im_dialog_date {
color: #b3b3b3; color: #b3b3b3;
font-size: 13px; font-size: 12px;
margin-right: 3px; margin-right: 3px;
} }
.im_dialog_badge { .im_dialog_badge {
@ -837,7 +845,9 @@ a.im_dialog:hover .im_dialog_unread,
a.im_dialog_selected .im_dialog_unread { a.im_dialog_selected .im_dialog_unread {
background: #7cacc7; background: #7cacc7;
} }
.im_dialog_message_text { .im_dialog_message_text,
a.im_dialog:hover .im_dialog_message_text,
a.im_dialog_selected .im_dialog_message_text {
color: #8f8f8f; color: #8f8f8f;
} }
@ -1011,7 +1021,7 @@ a.im_message_fwd_author {
vertical-align: text-top; vertical-align: text-top;
background: url(../img/icons/IconsetW.png) -12px -68px no-repeat; background: url(../img/icons/IconsetW.png) -12px -68px no-repeat;
background-size: 42px 891px; background-size: 42px 891px;
opacity: 1; opacity: 0.8;
} }
.is_1x .icon-camera { .is_1x .icon-camera {
background-image: url(../img/icons/IconsetW_1x.png); background-image: url(../img/icons/IconsetW_1x.png);
@ -1071,11 +1081,14 @@ a.im_message_fwd_author {
min-height: 32px; min-height: 32px;
max-height: 150px; max-height: 150px;
margin-bottom: 0; margin-bottom: 0;
font-size: 15px;
} }
.emoji-wysiwyg-editor:empty { .emoji-wysiwyg-editor:empty {
background: #f1f1f1; background: #f1f1f1;
border-color: #f1f1f1; border-color: #f1f1f1;
content: attr(placeholder); }
.emoji-wysiwyg-editor:empty:before {
color: #999;
} }
.emoji-wysiwyg-editor:active, .emoji-wysiwyg-editor:active,
.emoji-wysiwyg-editor:focus { .emoji-wysiwyg-editor:focus {

BIN
app/img/iphone_home120.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
app/img/iphone_startup.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

11
app/index.html

@ -2,7 +2,7 @@
<html lang="en" ng-app="myApp" manifest="webogram.appcache" ng-csp=""> <html lang="en" ng-app="myApp" manifest="webogram.appcache" ng-csp="">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Webogram</title> <title>Webogram</title>
<!-- build:css css/app.css --> <!-- build:css css/app.css -->
@ -15,15 +15,16 @@
<link rel="icon" href="favicon.ico" type="image/x-icon" /> <link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="img/icons/icon90.png"> <link rel="apple-touch-icon" href="img/iphone_home120.png">
<link rel="apple-touch-icon" sizes="90x90" href="img/icons/icon90.png"> <link rel="apple-touch-icon" sizes="120x120" href="img/iphone_home120.png">
<link rel="apple-touch-icon" sizes="120x120" href="img/icons/icon120.png"> <link rel="apple-touch-startup-image" media="(device-width: 320px)" href="img/iphone_startup.png">
<meta name="apple-mobile-web-app-title" content="Webogram"> <meta name="apple-mobile-web-app-title" content="Telegram Web">
<meta name="mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta property="og:title" content="Webogram"> <meta property="og:title" content="Webogram">
<meta property="og:url" content="http://zhukov.github.io/webogram/"> <meta property="og:url" content="http://zhukov.github.io/webogram/">
<meta property="og:image" content="http://zhukov.github.io/webogram/img/logo_share.png"> <meta property="og:image" content="http://zhukov.github.io/webogram/img/logo_share.png">

26
app/js/directives.js

@ -1584,7 +1584,7 @@ angular.module('myApp.directives', ['myApp.filters'])
} }
}) })
.directive('myUserStatus', function ($filter, AppUsersManager) { .directive('myUserStatus', function ($filter, $rootScope, AppUsersManager) {
var statusFilter = $filter('userStatus'); var statusFilter = $filter('userStatus');
@ -1593,10 +1593,24 @@ angular.module('myApp.directives', ['myApp.filters'])
}; };
function link($scope, element, attrs) { function link($scope, element, attrs) {
var userID = $scope.$eval(attrs.myUserStatus), var userID,
user = AppUsersManager.getUser(userID); update = function () {
var user = AppUsersManager.getUser(userID);
element
.html(statusFilter(user))
.toggleClass('status_online', user.status && user.status._ == 'userStatusOnline');
};
element.html(statusFilter(user)); $scope.$watch(attrs.myUserStatus, function (newUserID) {
console.log(attrs.myUserStatus, newUserID);
userID = newUserID;
update();
});
$rootScope.$on('user_update', function (e, updUserID) {
if (userID == updUserID) {
update();
}
});
} }
}) })
@ -1608,7 +1622,7 @@ angular.module('myApp.directives', ['myApp.filters'])
scope: { scope: {
userID: '=myUserPhotolink' userID: '=myUserPhotolink'
}, },
template: '<img my-load-thumb thumb="photo" /><i class="icon status_online" ng-if="::showStatus" ng-show="user.status._ == \'userStatusOnline\'"></i>' template: '<img my-load-thumb thumb="photo" /><i class="icon icon-online" ng-if="::showStatus" ng-show="user.status._ == \'userStatusOnline\'"></i>'
}; };
function link($scope, element, attrs) { function link($scope, element, attrs) {
@ -1618,9 +1632,11 @@ angular.module('myApp.directives', ['myApp.filters'])
$scope.user = AppUsersManager.getUser($scope.userID); $scope.user = AppUsersManager.getUser($scope.userID);
} }
if (element[0].tagName == 'A') {
element.on('click', function (e) { element.on('click', function (e) {
$rootScope.openUser($scope.userID); $rootScope.openUser($scope.userID);
}); });
}
if (attrs.imgClass) { if (attrs.imgClass) {
$(element[0].firstChild).addClass(attrs.imgClass) $(element[0].firstChild).addClass(attrs.imgClass)

2
app/partials/chat_modal.html

@ -88,7 +88,7 @@
<div class="chat_modal_participant_name"> <div class="chat_modal_participant_name">
<a my-user-link="participant.user_id"></a> <a my-user-link="participant.user_id"></a>
</div> </div>
<div class="chat_modal_participant_status" my-user-status="participant.user_id"></div> <div class="chat_modal_participant_status" my-user-status="::participant.user_id"></div>
</div> </div>
</div> </div>

12
app/partials/contacts_modal.html

@ -44,17 +44,9 @@
<i ng-if="multiSelect" class="icon icon-contact-tick"></i> <i ng-if="multiSelect" class="icon icon-contact-tick"></i>
<div class="contacts_modal_contact_photo pull-left"> <div class="contacts_modal_contact_photo pull-left" my-user-photolink="contact.userID" status="true" img-class="contacts_modal_contact_photo"></div>
<img
class="contacts_modal_contact_photo"
my-load-thumb
thumb="contact.userPhoto"
/>
<i class="icon status_online" ng-show="contact.user.status._ == 'userStatusOnline'"></i>
</div>
<div class="contacts_modal_contact_name" ng-bind-html="contact.user.rFullName"></div> <div class="contacts_modal_contact_name" ng-bind-html="contact.user.rFullName"></div>
<div class="contacts_modal_contact_status" ng-bind="contact.user | userStatus"></div> <div class="contacts_modal_contact_status" my-user-status="::contact.userID"></div>
</a> </a>
</li> </li>

10
app/partials/head.html

@ -75,10 +75,10 @@
<div class="navbar-quick-back-title"> <div class="navbar-quick-back-title">
<h4 ng-bind-html="historyPeer.data.rFullName"></h4> <h4 ng-bind-html="historyPeer.data.rFullName"></h4>
<small ng-switch="historyState.typing.length"> <small ng-switch="historyState.typing.length">
<span ng-switch-when="1"> <span ng-switch-when="1" class="status_online">
typing<span my-loading-dots></span> typing<span my-loading-dots></span>
</span> </span>
<span ng-switch-default ng-bind="historyPeer.data | userStatus"></span> <span ng-switch-default my-user-status="historyPeer.id"></span>
</small> </small>
</div> </div>
</a> </a>
@ -92,13 +92,13 @@
<ng-pluralize ng-switch-when="0" count="historyPeer.data.participants_count" <ng-pluralize ng-switch-when="0" count="historyPeer.data.participants_count"
when="{'0': 'No members', 'one': '1 member', 'other': '{} members'}"> when="{'0': 'No members', 'one': '1 member', 'other': '{} members'}">
</ng-pluralize> </ng-pluralize>
<span ng-switch-when="1"> <span ng-switch-when="1" class="status_online">
<span my-user-link="historyState.typing[0]" short="true"></span> is typing<span my-loading-dots></span> <span my-user-link="historyState.typing[0]" short="true"></span> is typing<span my-loading-dots></span>
</span> </span>
<span ng-switch-when="2"> <span ng-switch-when="2" class="status_online">
<span my-user-link="historyState.typing[0]" short="true"></span>, <span my-user-link="historyState.typing[1]" short="true"></span><span my-loading-dots></span> <span my-user-link="historyState.typing[0]" short="true"></span>, <span my-user-link="historyState.typing[1]" short="true"></span><span my-loading-dots></span>
</span> </span>
<span ng-switch-default> <span ng-switch-default class="status_online">
<span my-user-link="historyState.typing[0]" short="true"></span>+{{historyState.typing.length - 1}}<span my-loading-dots></span> <span my-user-link="historyState.typing[0]" short="true"></span>+{{historyState.typing.length - 1}}<span my-loading-dots></span>
</span> </span>
</small> </small>

4
app/partials/im.html

@ -69,7 +69,7 @@
<span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span> <span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span>
</div> </div>
<div class="im_dialog_message"> <div class="im_dialog_message">
<span class="im_dialog_message_text" ng-bind="contact.user | userStatus"></span> <span class="im_dialog_message_text" my-user-status="::contact.userID"></span>
</div> </div>
</div> </div>
</a> </a>
@ -132,7 +132,7 @@
<h4 ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()"> <h4 ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()">
<div ng-switch-when="true"> <div ng-switch-when="true">
<span ng-bind-html="historyPeer.data.rFullName"></span> <span ng-bind-html="historyPeer.data.rFullName"></span>
<small class="im_peer_online" ng-bind="historyPeer.data | userStatus"></small> <small class="im_peer_online" my-user-status="historyPeer.id"></small>
</div> </div>
<div ng-switch-default> <div ng-switch-default>
<span ng-bind-html="historyPeer.data.rTitle"></span> <span ng-bind-html="historyPeer.data.rTitle"></span>

2
app/partials/peer_select.html

@ -36,7 +36,7 @@
<span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span> <span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span>
</div> </div>
<div class="im_dialog_message"> <div class="im_dialog_message">
<span class="im_dialog_message_text" ng-bind="contact.user | userStatus"></span> <span class="im_dialog_message_text" my-user-status="::contact.userID"></span>
</div> </div>
</div> </div>
</a> </a>

2
app/partials/settings_modal.html

@ -17,7 +17,7 @@
<div class="user_modal_info_wrap clearfix"> <div class="user_modal_info_wrap clearfix">
<h4 class="user_modal_header" ng-bind-html="profile.rFullName"></h4> <h4 class="user_modal_header" ng-bind-html="profile.rFullName"></h4>
<p class="user_modal_status" ng-bind="profile | userStatus"></p> <p class="user_modal_status" my-user-status="::profile.id"></p>
<div class="user_modal_actions_wrap clearfix"> <div class="user_modal_actions_wrap clearfix">
<span class="btn btn-primary user_modal_main_btn" ng-if="!photo.updating"> <span class="btn btn-primary user_modal_main_btn" ng-if="!photo.updating">

2
app/partials/user_modal.html

@ -16,7 +16,7 @@
<div class="user_modal_info_wrap clearfix"> <div class="user_modal_info_wrap clearfix">
<h4 class="user_modal_header" ng-bind="user | userName"></h4> <h4 class="user_modal_header" ng-bind="user | userName"></h4>
<p class="user_modal_status" ng-if="user.status" ng-bind="user | userStatus"></p> <p class="user_modal_status" ng-if="user.status" my-user-status="::user.id"></p>
<div class="user_modal_actions_wrap clearfix"> <div class="user_modal_actions_wrap clearfix">
<button class="btn btn-primary user_modal_main_btn" ng-click="goToHistory()">Send message</button> <button class="btn btn-primary user_modal_main_btn" ng-click="goToHistory()">Send message</button>

2
app/webogram.appcache

@ -1,6 +1,6 @@
CACHE MANIFEST CACHE MANIFEST
# 26 # 28
NETWORK: NETWORK:
* *

Loading…
Cancel
Save