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

31
app/css/app_mobile.css

@ -181,14 +181,21 @@ html { @@ -181,14 +181,21 @@ html {
.navbar-quick-media-back h4 {
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-group-back small {
font-size: 12px;
color: #FFF;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
margin-left: 0;
}
.navbar-quick-profile-back .status_online,
.navbar-quick-group-back .status_online {
color: #FFF;
}
.navbar-menu {
display: none;
@ -499,7 +506,7 @@ a.im_message_video_thumb { @@ -499,7 +506,7 @@ a.im_message_video_thumb {
padding: 0 8px;
}
.im_content_message_wrap {
font-size: 1.2em;
font-size: 15px;
float: left;
position: relative;
max-width: 80%;
@ -795,6 +802,7 @@ a.im_message_from_photo { @@ -795,6 +802,7 @@ a.im_message_from_photo {
border-radius: 0 !important;
padding-right: 11px;
}
.im_dialog_wrap:last-child a.im_dialog {
border-bottom: 0;
}
@ -807,20 +815,20 @@ a.im_message_from_photo { @@ -807,20 +815,20 @@ a.im_message_from_photo {
.im_dialog_peer,
.im_dialog_message {
font-size: 1.2em;
font-size: 1.3em;
}
.im_dialog_peer {
margin-bottom: 7px;
margin-top: 5px;
}
.im_dialog_meta {
margin-top: 5px;
margin-top: 6px;
}
.im_dialog_date,
a.im_dialog:hover .im_dialog_date,
a.im_dialog_selected .im_dialog_date {
color: #b3b3b3;
font-size: 13px;
font-size: 12px;
margin-right: 3px;
}
.im_dialog_badge {
@ -837,7 +845,9 @@ a.im_dialog:hover .im_dialog_unread, @@ -837,7 +845,9 @@ a.im_dialog:hover .im_dialog_unread,
a.im_dialog_selected .im_dialog_unread {
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;
}
@ -1011,7 +1021,7 @@ a.im_message_fwd_author { @@ -1011,7 +1021,7 @@ a.im_message_fwd_author {
vertical-align: text-top;
background: url(../img/icons/IconsetW.png) -12px -68px no-repeat;
background-size: 42px 891px;
opacity: 1;
opacity: 0.8;
}
.is_1x .icon-camera {
background-image: url(../img/icons/IconsetW_1x.png);
@ -1071,11 +1081,14 @@ a.im_message_fwd_author { @@ -1071,11 +1081,14 @@ a.im_message_fwd_author {
min-height: 32px;
max-height: 150px;
margin-bottom: 0;
font-size: 15px;
}
.emoji-wysiwyg-editor:empty {
background: #f1f1f1;
border-color: #f1f1f1;
content: attr(placeholder);
}
.emoji-wysiwyg-editor:empty:before {
color: #999;
}
.emoji-wysiwyg-editor:active,
.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 @@ @@ -2,7 +2,7 @@
<html lang="en" ng-app="myApp" manifest="webogram.appcache" ng-csp="">
<head>
<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>
<!-- build:css css/app.css -->
@ -15,15 +15,16 @@ @@ -15,15 +15,16 @@
<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" sizes="90x90" href="img/icons/icon90.png">
<link rel="apple-touch-icon" sizes="120x120" href="img/icons/icon120.png">
<link rel="apple-touch-icon" href="img/iphone_home120.png">
<link rel="apple-touch-icon" sizes="120x120" href="img/iphone_home120.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="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta property="og:title" content="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">

32
app/js/directives.js

@ -1584,7 +1584,7 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -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');
@ -1593,10 +1593,24 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -1593,10 +1593,24 @@ angular.module('myApp.directives', ['myApp.filters'])
};
function link($scope, element, attrs) {
var userID = $scope.$eval(attrs.myUserStatus),
user = AppUsersManager.getUser(userID);
var 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']) @@ -1608,7 +1622,7 @@ angular.module('myApp.directives', ['myApp.filters'])
scope: {
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) {
@ -1618,9 +1632,11 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -1618,9 +1632,11 @@ angular.module('myApp.directives', ['myApp.filters'])
$scope.user = AppUsersManager.getUser($scope.userID);
}
element.on('click', function (e) {
$rootScope.openUser($scope.userID);
});
if (element[0].tagName == 'A') {
element.on('click', function (e) {
$rootScope.openUser($scope.userID);
});
}
if (attrs.imgClass) {
$(element[0].firstChild).addClass(attrs.imgClass)

2
app/partials/chat_modal.html

@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
<div class="chat_modal_participant_name">
<a my-user-link="participant.user_id"></a>
</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>

12
app/partials/contacts_modal.html

@ -44,17 +44,9 @@ @@ -44,17 +44,9 @@
<i ng-if="multiSelect" class="icon icon-contact-tick"></i>
<div class="contacts_modal_contact_photo pull-left">
<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_photo pull-left" my-user-photolink="contact.userID" status="true" img-class="contacts_modal_contact_photo"></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>
</li>

10
app/partials/head.html

@ -75,10 +75,10 @@ @@ -75,10 +75,10 @@
<div class="navbar-quick-back-title">
<h4 ng-bind-html="historyPeer.data.rFullName"></h4>
<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>
</span>
<span ng-switch-default ng-bind="historyPeer.data | userStatus"></span>
<span ng-switch-default my-user-status="historyPeer.id"></span>
</small>
</div>
</a>
@ -92,13 +92,13 @@ @@ -92,13 +92,13 @@
<ng-pluralize ng-switch-when="0" count="historyPeer.data.participants_count"
when="{'0': 'No members', 'one': '1 member', 'other': '{} members'}">
</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>
<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>
<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>
</small>

4
app/partials/im.html

@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
<span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span>
</div>
<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>
</a>
@ -132,7 +132,7 @@ @@ -132,7 +132,7 @@
<h4 ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()">
<div ng-switch-when="true">
<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 ng-switch-default>
<span ng-bind-html="historyPeer.data.rTitle"></span>

2
app/partials/peer_select.html

@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
<span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span>
</div>
<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>
</a>

2
app/partials/settings_modal.html

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
<div class="user_modal_info_wrap clearfix">
<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">
<span class="btn btn-primary user_modal_main_btn" ng-if="!photo.updating">

2
app/partials/user_modal.html

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
<div class="user_modal_info_wrap clearfix">
<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">
<button class="btn btn-primary user_modal_main_btn" ng-click="goToHistory()">Send message</button>

2
app/webogram.appcache

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

Loading…
Cancel
Save